Agent API (Sample)
The following specifications describe a standard API used by the Code Capsules chat window to communicate with the agent.
Send a message to the conversational AI agent and receive a complete response. For streaming responses, use the /message/stream endpoint instead.
API key for authentication
Timestamp of the message
2025-11-07T10:30:00ZSuccessful response from the AI agent
Bad request - Message content is required
Unauthorized - Invalid or missing authentication headers
Internal server error
Send a message to the conversational AI agent and receive a streaming response. The response is sent as Server-Sent Events (SSE) with each chunk containing the type and content.
API key for authentication
Timestamp of the message
2025-11-07T10:30:00ZSuccessful streaming response from the AI agent
Server-Sent Events stream containing message chunks
Bad request - Message is required
Unauthorized - Invalid or missing authentication headers
Internal server error
Retrieve the complete chat history for the currently authenticated user, including all previous conversations.
API key for authentication
Chat history retrieved successfully
Unauthorized - User not authenticated or missing user information
Internal server error
Add text content to the vector store for use in RAG (Retrieval-Augmented Generation) context retrieval.
API key for authentication
The text content to be added to the vector store
Context added successfully
Bad request - Context text is required
Unauthorized - Invalid or missing authentication headers
Internal server error
Fetch content from a URL and add it to the vector store for use in RAG (Retrieval-Augmented Generation) context retrieval.
API key for authentication
The URL to fetch content from
https://example.com/articleContext added successfully
Bad request - URL is required
Unauthorized - Invalid or missing authentication headers
Internal server error
Schemas
Last updated
Was this helpful?