Agent-api
About 497 wordsAbout 2 min
Generated from
docs/.vuepress/openapi.json. Refresh withnpm run gen:api. Back to overview.
GET /api/v1/agent-api/chats — List this agent’s chats
Tags: Agent-api
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
since | string | no | ISO-8601 timestamp; only chats updated after it. |
page | integer | no | |
per_page | integer | no |
Responses
| Status | Description |
|---|---|
200 | One page of chats, newest first. 25 per page by default. |
422 | since was not a parseable date. |
POST /api/v1/agent-api/chats — Start a chat with this agent
Tags: Agent-api
Responses
| Status | Description |
|---|---|
202 | The chat was queued. |
422 | The request body was not usable. |
POST /api/v1/agent-api/chats/{chatId}/answer — Answer the agent’s question
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Responses
| Status | Description |
|---|---|
202 | Answer recorded; the chat is queued again. |
404 | No such chat on this agent. |
409 | The chat is not awaiting input. |
POST /api/v1/agent-api/chats/{chatId}/approve — Approve pending tool calls
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Responses
| Status | Description |
|---|---|
202 | Approval recorded; the chat is queued again. |
404 | No such chat on this agent. |
409 | The chat is not pending approval. |
GET /api/v1/agent-api/chats/{chatId}/messages — User messages and answers only
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
since_sequence | integer | no |
Responses
| Status | Description |
|---|---|
200 | The conversation, tool calls omitted. |
404 | No such chat on this agent. |
POST /api/v1/agent-api/chats/{chatId}/messages — Continue a chat
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Responses
| Status | Description |
|---|---|
202 | The follow-up was queued. |
404 | No such chat on this agent. |
409 | The chat is not in a state that can be continued. |
POST /api/v1/agent-api/chats/{chatId}/reject — Reject pending tool calls
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Responses
| Status | Description |
|---|---|
202 | Rejection recorded. |
404 | No such chat on this agent. |
409 | The chat is not pending approval. |
GET /api/v1/agent-api/chats/{chatId}/status — Status and final answer
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Responses
| Status | Description |
|---|---|
200 | Status, answer, and any block. |
404 | No such chat on this agent. |
GET /api/v1/agent-api/chats/{chatId}/transcript — Everything the admin UI shows
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatId | integer | yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
since_sequence | integer | no |
Responses
| Status | Description |
|---|---|
200 | Tool calls, thinking, usage totals. |
404 | No such chat on this agent. |
POST /api/v1/agent-api/media — Upload a file for this agent
Tags: Agent-api
Responses
| Status | Description |
|---|---|
201 | The asset was ingested. |
400 | No file was sent under “file”. |
415 | The file type is not in the agent’s allowlist. |
GET /api/v1/agent-api/media/{mediaId} — Fetch a media asset this agent produced
Tags: Agent-api
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
mediaId | string | yes | |
mediaId | string | yes |
Responses
| Status | Description |
|---|---|
200 | The asset bytes. |
404 | No such asset, or not this agent’s to read. |