Overview
The Agent API provides a session-based conversational backend for Neurologyca chat experiences. A typical integration creates a session, reloads session history when needed, and sends each user message to the ADK orchestrator to receive the assistant reply plus per-agent execution traces.
Integration pattern
- Authentication: Send a bearer token with agent framework requests using
Authorization: Bearer <token>. - Base URL resolution: The web client reads
VITE_AGENT_CHAT_BACKEND_SERVERfirst, then falls back toVITE_WEBSOCKET_SERVERorVITE_BACKEND_SERVER. If the configured URL usesws:orwss:, the client normalizes it tohttp:orhttps:for API requests. If the configured URL does not already end with/api/v1, the client appends that path automatically. - Session endpoints:
POST /api/v1/sessions,GET /api/v1/sessions, andGET /api/v1/sessions/{session_id}/history - Primary message endpoint:
POST /api/v1/adk/message
Recommended integration flow
- Authenticate the user in your client application.
- Read the auth token and send it on agent API requests as
Authorization: Bearer <token>. - For a new client integration, call
POST /api/v1/auth/firebaseafter sign-in so the backend can create or sync the user record. If the user is not already provisioned, the session endpoints return401 User not found. Please sync your account first. - Create a chat session with
POST /api/v1/sessions. - Load existing sessions with
GET /api/v1/sessionsand hydrate a specific conversation withGET /api/v1/sessions/{session_id}/history. - Send each message to
POST /api/v1/adk/messagewithsession_id,content, and the client-sideconversation_historyarray. - Render the returned
contentas the assistant message and optionally useagent_tracesto show progress, latency, or per-agent summaries in the UI.
Core endpoints
Example integration
Notes
- The Agent Framework endpoints use bearer auth. This is separate from the public SoftSkills API flow documented elsewhere in these docs, which currently uses API keys.
- Current web integrations use
POST /api/v1/adk/messageinstead ofPOST /api/v1/conversation/messagebecause the ADK route returns the multi-agent traces used for the chat UI. - The backend exposes additional routes in
agents-backend, but this page and the Agent API reference focus on the core session and messaging contract used by the current web integrations.