Public A P I

Get Agent Run Result

GET
/v2/agents/{agent_id}/runs/{run_id}/result

Fetch the output of a completed run. The output is type: "text" (a prose answer) or type: "json" (structured data matching the output schema), plus trust metadata with per-claim citations for the answer.

While the run is still queued or running this endpoint returns 409; if the run failed or was cancelled it returns 422 with the run and error details.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

agent_id*Agent Id

Web Search Agent ID, format wsa_<uuid>.

Formatuuid
run_id*Run Id

Run ID, format task_run_<uuid>.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/runs/string/result"
{  "output": {    "content": "string",    "trust": {      "claims": [        {          "callout": 0,          "citations": [            {              "excerpts": [                "string"              ],              "extract_template_name": "string",              "source_category": "official",              "source_intent": "official",              "source_type": "primary",              "title": "string",              "url": "string"            }          ],          "confidence": "high",          "reasoning": "string"        }      ],      "confidence": "high",      "reasoning": "string",      "sources": [        {          "extract_template_name": "string",          "source_category": "official",          "source_intent": "official",          "title": "string",          "type": "primary",          "url": "string"        }      ]    },    "type": "text"  },  "run": {    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "effort": "low",    "error": {      "message": "string",      "ref_id": "string"    },    "id": "string",    "interaction_id": "string",    "is_active": true,    "prompt": "string",    "started_at": "2019-08-24T14:15:22Z",    "status": "queued",    "web_search_agent_id": "string"  }}