Skip to content

API Reference ​

Base URL and Authentication ​

text
http://localhost:9090/api/v1

Registration, login, token refresh, and OAuth routes are public. The endpoints below require a JWT Bearer token:

bash
curl -H "Authorization: Bearer <token>" http://localhost:9090/api/v1/conversations

Public auth routes are POST /auth/register, POST /auth/login, POST /auth/refresh, GET /auth/oauth/:provider, and GET /auth/callback/:provider. Health checks are available at /health and /ready outside /api/v1.

Paths below are relative to /api/v1.

Chat and Files ​

MethodPathPurpose
GET, POST/conversationsList or create conversations
GET, PATCH, DELETE/conversations/:idRead, update, or delete a conversation
GET/conversations/:id/messagesList messages
POST/conversations/:id/messagesSend a message and wait for the response
POST/conversations/:id/messages/streamSend a message and receive an SSE stream
GET/modelsList available models
POST/images/generateGenerate an image
POST/uploadUpload an attachment
GET, DELETE/attachments/:idDownload or delete an attachment

Example non-streaming message:

bash
curl -X POST http://localhost:9090/api/v1/conversations/$CONVERSATION_ID/messages \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Hello, what can you help with?"}'

Streaming uses the separate /messages/stream endpoint, not a stream field. Attachments can be referenced by their IDs in message requests.

Per-user provider configurations are managed with GET/POST /user/ai-configs, GET/PUT/DELETE /user/ai-configs/:id, PUT /user/ai-configs/:id/default, and POST /user/ai-configs/:id/test.

Knowledge ​

MethodPathPurpose
GET, POST/knowledgeList or create knowledge bases
GET, PATCH, DELETE/knowledge/:idManage a knowledge base
GET, POST/knowledge/:id/documentsList documents or upload a document
DELETE/knowledge/:id/documents/:doc_idDelete a document
POST/knowledge/:id/searchRun similarity search in a knowledge base

Document upload uses multipart form data. Search results can be used as RAG context by chat.

Background Agents ​

Agent routes are available only when SANDBOX_ENABLED=true and Docker is available.

MethodPathPurpose
GET, POST/agentsList or create agents
GET, PATCH, DELETE/agents/:idManage an agent
POST/agents/:id/runStart an asynchronous run
GET/agents/:id/runsList runs for an agent
GET/agent-runs/:run_idGet {run, steps} for a run
POST/agent-runs/:run_id/cancelCancel a run

Start a run:

bash
curl -X POST http://localhost:9090/api/v1/agents/$AGENT_ID/run \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"task":"Inspect the workspace and summarize its files."}'

Poll GET /agent-runs/:run_id for status, result, and persisted steps. Pull-request delivery is not an API capability.

Responses ​

Successful JSON responses generally wrap their payload in data; list endpoints may also include meta pagination. Errors use a structured error object with an HTTP status code. SSE streaming responses use the streaming endpoint's event format rather than the JSON envelope.

Released under the MIT License.