Skip to main content
GET
/
api
/
agents
/
{agentId}
/
run-async
/
{runId}
/
result
cURL
curl -X GET "https://app.cotool.ai/api/agents/:agentId/run-async/:runId/result" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "finalAssistantMessage": "<string>",
  "allToolCallsMade": [
    {
      "type": "<string>",
      "toolCallId": "<string>",
      "toolName": "<string>",
      "args": "<unknown>"
    }
  ],
  "allToolResultsReceived": [
    {
      "type": "<string>",
      "toolCallId": "<string>",
      "toolName": "<string>",
      "result": "<unknown>",
      "isError": true
    }
  ],
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ],
  "structuredOutputResult": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cotool.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Path Parameters

agentId
string<uuid>
required

Unique identifier of the agent

runId
string<uuid>
required

Unique identifier of the asynchronous run to check status for

Response

200 - application/json

Successful response

Completed result of an asynchronous agent execution

finalAssistantMessage
string
required

The final text response from the assistant

allToolCallsMade
object[]
required

All tool calls made during the agent run

allToolResultsReceived
object[]
required

All tool results received during the agent run

messages
object[]
required

Complete message history from the agent run

structuredOutputResult

Structured output generated after the run, if available