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>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}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>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Path Parameters
Response
Successful response
Completed result of an asynchronous agent execution
Was this page helpful?
⌘I