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"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"finalAssistantMessage": "<string>",
"allToolCallsMade": [
{
"type": "tool-call",
"toolCallId": "<string>",
"toolName": "<string>",
"args": "<unknown>"
}
],
"allToolResultsReceived": [
{
"type": "tool-result",
"toolCallId": "<string>",
"toolName": "<string>",
"result": "<unknown>",
"isError": true
}
],
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"structuredOutputResult": "<string>"
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Agents
Get async run result
Retrieve the completed result of an asynchronous agent run. Use the status endpoint first and call this endpoint once the run status is done.
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"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"finalAssistantMessage": "<string>",
"allToolCallsMade": [
{
"type": "tool-call",
"toolCallId": "<string>",
"toolName": "<string>",
"args": "<unknown>"
}
],
"allToolResultsReceived": [
{
"type": "tool-result",
"toolCallId": "<string>",
"toolName": "<string>",
"result": "<unknown>",
"isError": true
}
],
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"structuredOutputResult": "<string>"
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Path Parameters
Unique identifier of the agent
Unique identifier of the asynchronous run to check status for
Response
Successful response
Completed result of an asynchronous agent execution
The final text response from the assistant
All tool calls made during the agent run
Show child attributes
Show child attributes
All tool results received during the agent run
Show child attributes
Show child attributes
Complete message history from the agent run
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Structured output generated after the run, if available
Was this page helpful?
⌘I