Skip to main content

Endpoints

Chat (SSE Streaming)

POST /api/v1/agent/chat
Sends a message to Apollo Brain and receives a streaming response via Server-Sent Events (SSE). Request Body:
{
  "message": "What tasks are due this week?",
  "session_id": "optional-session-uuid",
  "context": {
    "current_page": "/tasks",
    "selected_project_id": "optional-project-uuid"
  }
}
SSE Events:
EventDescription
contentText token from the AI response
tool_callAI is calling a tool (includes tool name and arguments)
tool_resultResult of the tool execution
confirmation_requiredHITL — a write operation needs approval
doneStream complete
errorError occurred

Confirm Action

POST /api/v1/agent/confirm
Approve or reject a HITL confirmation request. Request Body:
{
  "session_id": "session-uuid",
  "confirmation_id": "confirmation-uuid",
  "approved": true
}

List Sessions

GET /api/v1/agent/sessions
Returns all chat sessions for the authenticated user.

Generate Title

POST /api/v1/agent/generate-title
Auto-generates a descriptive title for a chat session based on conversation content.

Memory Preferences

GET/POST /api/v1/agent/memory/preferences
Read or update the user’s AI memory preferences (procedural memory).