Two APIs
Engine API
Stateless. Started by
agentctl serve. Port 8090. Takes a messages array, returns a response. No session management.Conversation API
Stateful. Started by
agent-manager. Port 8100. Manages conversations, history, and SSE streaming. Also serves the widget.Engine API
Base URL:http://localhost:8090
GET /health
POST /invoke
Send a complete conversation and get a response.
ctx and available to resolvers, tools, and hooks:
POST /stream
Same as /invoke but streams tokens as Server-Sent Events.
Conversation API
Base URL:http://localhost:8100
Manages multi-turn conversations with history persisted in SQLite (or Postgres via DATABASE_URL).
POST /conversations
Create a new conversation.
POST /conversations/{id}/messages
Send a message. Prior history is assembled automatically.
POST /conversations/{id}/messages/stream
Same as above but streams via SSE. Preferred by the widget.
GET /conversations/{id}/messages
Retrieve message history for a conversation.
Passing context to plugins
Any HTTP header you include is available inctx inside resolvers, tools, and hooks:
Authorization header is automatically parsed into run_context.auth_context.inbound_access_token.