curl --request GET \
--url https://api.example.com/v1/chat/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/chat/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/chat/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/chat/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/chat/tasks/{task_id}"
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))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/chat/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/chat/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": 123,
"agent_id": 123,
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"input": "<string>",
"output": "<string>",
"error": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Chat Task
Return a snapshot of one task’s current state.
SDK clients call this to poll a previously-submitted task for
its status, latest output, or failure reason. The shape is
deliberately flat — detailed step-by-step execution data lives
behind GET /v1/chat/tasks/{task_id}/steps (commit F).
Args:
task_id: Path parameter; the target task’s primary key.
authed: (Agent, AgentApiKey) tuple.
db: SQLAlchemy session.
Returns:
:class:TaskInfoResponse with task_id, agent_id,
status, latest-turn input / output / error,
created_at, and completed_at (set only when the task
has reached a terminal state).
Raises: V1ApiError 401: missing / invalid / revoked key. V1ApiError 404: task missing or not owned by the calling agent.
curl --request GET \
--url https://api.example.com/v1/chat/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/chat/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/chat/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/chat/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/chat/tasks/{task_id}"
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))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/chat/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/chat/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"task_id": 123,
"agent_id": 123,
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"input": "<string>",
"output": "<string>",
"error": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
GET /v1/chat/tasks/{task_id} response.
Returns a snapshot of the task's current state from the tasks
row. input / output / error reflect the latest turn
only -- full transcript history is queryable via the /steps
endpoint's message type steps.
One of: pending / running / paused / completed / failed.
Latest-turn user input. Null if no message yet recorded.
Latest-turn assistant output. Populated when status reaches 'completed'; null while running or pending.
Last failure reason when status='failed'.
UTC timestamp when the task reached a terminal state (completed or failed). Null while still running.

