Documentation
¶
Overview ¶
Command triage is the structured-results example for resolute-harness-go: a bug-triage endpoint where the dispatch carries a resultSchema, the harness validates the run's final answer against it, and the corrective retry loop is visible in the record stream.
Run it keyless (a deterministic local provider stands in for the model — it deliberately answers in prose first and only conforms after the harness's schema feedback, so every dispatch demonstrates the loop):
go run ./examples/triage
Then, in another terminal:
# triage a bug and block for the validated JSON result:
curl -s 'localhost:8486/agents/triage/demo?wait=true' -d '{
"kind": "user",
"body": "clicking login crashes the app on v2.1",
"resultSchema": {
"type": "object",
"properties": {
"severity": {"type": "string", "enum": ["low", "medium", "high"]},
"component": {"type": "string"}
},
"required": ["severity", "component"],
"additionalProperties": false
}
}'
# the corrective turn is durable: the replay shows TWO user_message
# records (the prompt, then the harness's schema feedback) before the
# conforming answer:
curl -N localhost:8486/agents/triage/demo
# exhaust the retry budget: this provider never conforms when the bug
# report contains "prose only", so a budget of 1 settles
# failed/result_schema_invalid:
curl -s 'localhost:8486/agents/triage/demo?wait=true' -d '{
"kind": "user", "body": "prose only please", "resultRetries": 1,
"resultSchema": {"type":"object","properties":{"severity":{"type":"string"}},"required":["severity"],"additionalProperties":false}
}'
Set GEMINI_API_KEY (and optionally MODEL) to triage with the real model instead; real models usually conform on the first try, so the corrective turn only appears when they slip.
The example also wires durable subagents (HARNESS-15): a "researcher" lookup definition the triage agent may spawn via the injected task tool. The keyless stand-in providers never call it, so the runbook above behaves exactly as before; with a real model, a report that needs a lookup can fan out to a durable child run whose final answer lands as the task call's tool result.