Get agent
GET/v2/agents/{agentId}
Fetch one agent by its ID to read its name, type, status, model, instructions, language and settings.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Returns a single agent with its full configuration. Call it before you change an agent, to show its settings in your own tool, or to check whether it is still a draft or already live.
Request
GET /v2/agents/{agentId}
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
agentId |
string | Yes | The ID of the agent, starting with agt_. |
The call has no query parameters and no body. It works for agents in every status, so you can also read an agent that is still being built and has not been published yet.
Example request
curl https://api.askocto.co/v2/agents/agt_8f3k2m \
-H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch("https://api.askocto.co/v2/agents/agt_8f3k2m", {
headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})
if (!response.ok) {
const { error } = await response.json()
throw new Error(`${error.code}: ${error.message}`)
}
const agent = await response.json()
console.log(agent.name, agent.status)
Example response
A successful call returns 200 OK.
{
"id": "agt_8f3k2m",
"name": "Store support",
"type": "support",
"status": "live",
"model": "octo-balanced",
"instructions": "Answer questions about orders, shipping and returns.",
"language": "en",
"createdAt": "2026-03-14T09:30:00Z",
"updatedAt": "2026-03-20T14:05:00Z",
"settings": {
"visibility": "public",
"rateLimit": {
"enabled": true,
"message": "You are sending messages quickly. Please wait a moment."
},
"initialMessages": ["Hi, how can I help?"],
"suggestedMessages": ["Where is my order?"]
}
}
Response fields
The response is an agent object. The Agents overview describes every field, including the settings object. The sources, procedures and actions of the agent are not part of this response. Each of those has its own list, so this call stays small and fast enough to run before every change. Read them with List sources, List procedures and List actions.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized |
The API key is missing, malformed or deleted. |
| 404 | not_found |
No agent has this ID in your workspace. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |
See Error handling for the error object and retry rules.