FruxonDocs
ApiAgent reviews

Sends a recommendation card's change back to the reviewer with the cases its test confirmed it worse in.

Only the cases that repeated when the card's latest test was checked again (`:recheck`) are sent: a case counts when the change did worse in at least two of its three verdicts. Leave some out with `excludedCases`, and tell the reviewer anything it should know in `note`. Name the check you read as `recheckId` (the card's `comparison.recheck.id`). The reviewer reads each case — the conversation before the turn, both replies with the tool calls behind them, and every verdict — with the agent's instructions and the versions of the change that already failed, then decides whether the change caused each worse reply. It answers `REVISED` with a rewritten change that still fixes the card's problem, `KEPT` when the change did not cause them, or `WITHDRAW_SUGGESTED` when the harm is the very thing the card asks for; the card stays open either way, and keeps the answer in `revisions`. A rewritten change is tested at once on the card's conversations, on every case a revision was shown, and on recent conversations the reviewer has never seen: `comparison` holds the runs, read like a `:compare`'s. When that test cannot start, `retestNotStarted` says why and the change stands untested. The reviewer runs on the model the agent's reviews use, and is charged to the review budget; reviews need not be on. Each check is answered once, and a change is rewritten at most twice. The call takes as long as a review, often half a minute. Agent admins only.

POST
/v1/tenants/{tenant}/agents/{agent}/recommendations/{recommendation}:revise
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The agent ID.

recommendation*string

The recommendation ID.

Formatuuid
tenant*string

The tenant identifier

The check you read, the cases to leave out, and a note.

recheckId?string

The check you read — the card's comparison.recheck.id — so the reviewer is sent the cases you saw, not those of a test or check another admin started since.

Formatuuid
excludedCases?|null

Case keys the check confirmed that the reviewer should not be sent, e.g. turn:123.

note?string|null

Anything the reviewer should know, at most 1,000 characters.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/recommendations/497f6eca-6276-4993-bfeb-53cbbbba6f08:revise" \  -H "Content-Type: application/json" \  -d '{}'
{
  "recommendation": {
    "id": "00000000-0000-0000-0000-000000000000",
    "kind": "ADD_TOOLS",
    "category": "MISSING_CAPABILITY",
    "severity": "LOW",
    "status": "CANDIDATE",
    "title": "string",
    "summary": "string",
    "need": "string",
    "patch": {
      "tools": [],
      "instructionText": "string",
      "replaceAnchor": "string",
      "adviceMarkdown": "string",
      "feature": "string"
    },
    "evidenceCount": 0,
    "firstSeenAt": 0,
    "lastSeenAt": 0,
    "baseRevision": 0,
    "changedSince": 0,
    "changedAt": 0,
    "appliedRevision": 0,
    "previousRevision": 0,
    "appliedBy": "string",
    "appliedAt": 0,
    "dismissedBy": "string",
    "dismissedAt": 0,
    "dismissReason": "NOT_RELEVANT",
    "dismissNote": "string",
    "obsoleteReason": "string",
    "comparison": {
      "id": "00000000-0000-0000-0000-000000000000",
      "patchRevision": 0,
      "cardRunId": "00000000-0000-0000-0000-000000000000",
      "otherRunId": "00000000-0000-0000-0000-000000000000",
      "regressionRunId": "00000000-0000-0000-0000-000000000000",
      "cardTurns": [],
      "otherTurns": [],
      "regressionTurns": [],
      "sandboxRouting": {},
      "baseRevision": 0,
      "startedAt": 0,
      "startedBy": "string",
      "recheck": {
        "id": "00000000-0000-0000-0000-000000000000",
        "cardRunIds": [],
        "otherRunIds": [],
        "cases": [],
        "startedAt": 0,
        "startedBy": "string",
        "usedAt": null
      }
    },
    "patchRevision": 0,
    "revisions": [
      {
        "outcome": "UNSPECIFIED",
        "patchRevision": 0,
        "comparisonId": "00000000-0000-0000-0000-000000000000",
        "recheckId": "00000000-0000-0000-0000-000000000000",
        "previousKind": null,
        "previousPatch": null,
        "explanation": "string",
        "shownTurns": [],
        "cases": [],
        "comparison": null,
        "excludedCaseKeys": [],
        "note": "string",
        "revisedBy": "string",
        "revisedAt": 0,
        "recordId": null
      }
    ],
    "version": 0
  },
  "revision": {
    "outcome": "REVISED",
    "patchRevision": 0,
    "comparisonId": "00000000-0000-0000-0000-000000000000",
    "recheckId": "00000000-0000-0000-0000-000000000000",
    "previousKind": "ADD_TOOLS",
    "previousPatch": {
      "tools": [],
      "instructionText": "string",
      "replaceAnchor": "string",
      "adviceMarkdown": "string",
      "feature": "string"
    },
    "explanation": "string",
    "shownTurns": [
      {
        "caseKey": "string",
        "source": "UNSPECIFIED",
        "role": "UNSPECIFIED",
        "unitId": "00000000-0000-0000-0000-000000000000",
        "anchorMessageId": 0
      }
    ],
    "cases": [
      {
        "caseKey": "string",
        "cause": "UNSPECIFIED",
        "why": "string"
      }
    ],
    "comparison": {
      "id": "00000000-0000-0000-0000-000000000000",
      "patchRevision": 0,
      "cardRunId": "00000000-0000-0000-0000-000000000000",
      "otherRunId": "00000000-0000-0000-0000-000000000000",
      "regressionRunId": "00000000-0000-0000-0000-000000000000",
      "cardTurns": [],
      "otherTurns": [],
      "regressionTurns": [],
      "sandboxRouting": {},
      "baseRevision": 0,
      "startedAt": 0,
      "startedBy": "string",
      "recheck": {
        "id": "00000000-0000-0000-0000-000000000000",
        "cardRunIds": [],
        "otherRunIds": [],
        "cases": [],
        "startedAt": 0,
        "startedBy": "string",
        "usedAt": null
      }
    },
    "excludedCaseKeys": [
      "string"
    ],
    "note": "string",
    "revisedBy": "string",
    "revisedAt": 0,
    "recordId": "00000000-0000-0000-0000-000000000000"
  },
  "comparison": {
    "id": "00000000-0000-0000-0000-000000000000",
    "baseRevision": 0,
    "cardRun": {
      "id": "00000000-0000-0000-0000-000000000000",
      "agentId": "string",
      "kind": "DATASET",
      "datasetId": "00000000-0000-0000-0000-000000000000",
      "candidateRevision": 0,
      "candidateBaseRevision": 0,
      "candidateProposalId": "00000000-0000-0000-0000-000000000000",
      "candidateSnapshotSeqNo": 0,
      "deployedRevision": 0,
      "status": "PENDING",
      "score": 0,
      "deploymentRecommendation": "string",
      "summary": {
        "totalSamples": 0,
        "successfulEvaluations": 0,
        "failedEvaluations": 0,
        "averageLlmScore": 0,
        "scoreDistribution": {},
        "assessmentDistribution": {},
        "topConcerns": [],
        "keyImprovements": [],
        "pairwise": null,
        "runtime": null,
        "cost": null
      },
      "errorMessage": "string",
      "createdAt": 0,
      "modifiedAt": 0,
      "startedAt": 0,
      "completedAt": 0,
      "createdBy": "string"
    },
    "otherRun": {
      "id": "00000000-0000-0000-0000-000000000000",
      "agentId": "string",
      "kind": "DATASET",
      "datasetId": "00000000-0000-0000-0000-000000000000",
      "candidateRevision": 0,
      "candidateBaseRevision": 0,
      "candidateProposalId": "00000000-0000-0000-0000-000000000000",
      "candidateSnapshotSeqNo": 0,
      "deployedRevision": 0,
      "status": "PENDING",
      "score": 0,
      "deploymentRecommendation": "string",
      "summary": {
        "totalSamples": 0,
        "successfulEvaluations": 0,
        "failedEvaluations": 0,
        "averageLlmScore": 0,
        "scoreDistribution": {},
        "assessmentDistribution": {},
        "topConcerns": [],
        "keyImprovements": [],
        "pairwise": null,
        "runtime": null,
        "cost": null
      },
      "errorMessage": "string",
      "createdAt": 0,
      "modifiedAt": 0,
      "startedAt": 0,
      "completedAt": 0,
      "createdBy": "string"
    },
    "regressionRun": {
      "id": "00000000-0000-0000-0000-000000000000",
      "agentId": "string",
      "kind": "DATASET",
      "datasetId": "00000000-0000-0000-0000-000000000000",
      "candidateRevision": 0,
      "candidateBaseRevision": 0,
      "candidateProposalId": "00000000-0000-0000-0000-000000000000",
      "candidateSnapshotSeqNo": 0,
      "deployedRevision": 0,
      "status": "PENDING",
      "score": 0,
      "deploymentRecommendation": "string",
      "summary": {
        "totalSamples": 0,
        "successfulEvaluations": 0,
        "failedEvaluations": 0,
        "averageLlmScore": 0,
        "scoreDistribution": {},
        "assessmentDistribution": {},
        "topConcerns": [],
        "keyImprovements": [],
        "pairwise": null,
        "runtime": null,
        "cost": null
      },
      "errorMessage": "string",
      "createdAt": 0,
      "modifiedAt": 0,
      "startedAt": 0,
      "completedAt": 0,
      "createdBy": "string"
    }
  },
  "retestNotStarted": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}