API reference · Agents
Read an agent's definition from the dashboard
GET/api/account/agents/{id}/definitionSigned in session
Hosted agent runs (lib/agent-runs.ts): the agent's definition runs a loop on the server, model call and tool calls, each step a job of its own. Every model call is a request by the agent's own key, billed to its wallet under its policy. An agent's own key may read itself; a header is named, never read back. A 404 while hosted runs are off on the deployment.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The agent's id; self on an agent's own key. |
Answer 200
The definition.
| Field | Type | What it is |
|---|---|---|
| object | string | One of "agent.definition". |
| agent_id | integer | |
| model | string | |
| instructions | string or null | |
| tools | array of object | |
| temperature | number or null | |
| max_output_tokens | integer or null | |
| limits | object | What a run gets when it asks for none, the deployment's caps applied. |
| limits. | integer | |
| limits. | integer | |
| limits. | integer | |
| updated | integer | Unix seconds. |
Errors
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.