Skip to content

HTTP and WebSocket API ​

The web UI does everything through this API, so you can script Crew with it too. The base URL is http://localhost:3000/api.

Agents ​

MethodPathWhat it does
GET/agentsLists agents, with status, memoryCount and effectiveModel.
POST/agentsCreates one: { name, role?, personality?, systemPrompt?, model?, avatar? }
GET/agents/:idGets one by id or by name.
PATCH/agents/:idUpdates one.
DELETE/agents/:idDeletes one along with its memory.
GET/agents/:id/exportExports JSON.
POST/agents/importImports JSON.

Chat ​

MethodPathWhat it does
POST/agents/:id/chatTakes { text } and returns the final assistant message. It blocks until the reply is done.
GET/agents/:id/messages?channel=webReturns the history.
DELETE/agents/:id/messagesClears the web chat.
bash
curl -s localhost:3000/api/agents/Lena/chat \
  -H 'content-type: application/json' \
  -d '{"text":"Write a haiku about SQLite"}' | jq -r .content

Memory and folders ​

MethodPathWhat it does
GET/agents/:id/memories?q=Lists memories, or searches them with q.
POST/agents/:id/memoriesAdds one: { content, type?, importance? }
DELETE/memories/:idDeletes one.
GET/agents/:id/foldersLists shared folders.
POST/agents/:id/foldersShares one: { path, mode: "ro" | "rw" }
DELETE/folders/:idStops sharing it.

System ​

GET /health, GET /status, GET /settings, PUT /settings, GET /templates, GET /tasks.

WebSocket at /ws ​

To chat, send:

json
{ "type": "chat", "agentId": "…", "text": "hi!" }

You receive a stream of events, and every connected client gets all of them:

ts
{ type: "status",  agentId, status: "idle" | "thinking" | "working" | "remembering" }
{ type: "token",   agentId, replyId, delta }
{ type: "tool",    agentId, replyId, name, args, result? }
{ type: "message", agentId, conversationId, message }
{ type: "memory",  agentId, memory }
{ type: "agents" }   // list changed

MIT License