WebSocket endpoint
WS /api/v1/solve
Connect to this endpoint to submit a question and stream the solver’s progress and final answer.
Initial message
Send this JSON object immediately after the connection opens.The question or problem to solve.
Name of the knowledge base to query.
An existing session ID to continue a conversation. Omit to start a new session.
Streaming messages
The server sends a sequence of typed JSON messages during execution.Message type. One of:
session, task_id, status, agent_status, token_stats, progress, log, result, error.Returned in the
session message. Use this to continue the conversation in a later connection.Returned in the
task_id message. Unique identifier for this run.Returned in
status, log, and error messages. Human-readable text.Returned in
agent_status messages. Name of the agent that changed state.Returned in
agent_status messages. Current state of the agent, e.g. running, done.Returned in
agent_status messages. Map of all agent names to their current status.Returned in
token_stats messages.Returned in the
result message. The full Markdown answer from the solver. Image references use /api/outputs/ URLs.Returned in the
result message. Absolute path to the output directory on the server.Returned in the
result message. The name component of the output directory (e.g. solve_20250101_120000).Returned in the
result message. Additional metadata from the solver run.Example
Session management endpoints
GET /api/v1/solve/sessions
List recent solver sessions.
Query parameters
Maximum number of sessions to return.
Response
GET /api/v1/solve/sessions/{session_id}
Get a specific session with its full message history.
Path parameters
Session identifier.
Response
404 if the session is not found.
DELETE /api/v1/solve/sessions/{session_id}
Delete a solver session.
Path parameters
Session identifier.
Response
404 if the session is not found.