Documentation Index
Fetch the complete documentation index at: https://docs.meibel.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sessions & Chat
Sessions represent a conversation between a user and an agent. Each session maintains its own message history and context window. This guide covers creating sessions, sending messages (synchronously or via streaming), and retrieving conversation history.Create a session
Start a new conversation by creating a session tied to a specific agent.id, the agent_id it belongs to, and creation timestamps. Store the session id to send messages and retrieve history.
Send a chat message (synchronous)
Send a message and wait for the complete response. This is the simplest approach and works well when you do not need to display partial results.message, any citations referencing datasource content, and metadata such as token usage.
Stream a chat response (SSE)
For a more responsive user experience, stream the response as Server-Sent Events. Each event delivers a chunk of the assistant’s reply as it is generated.The streaming endpoint uses Server-Sent Events (SSE). Each event has a
type field — common types include content (text chunks), citations (source references), and done (stream finished).Get session message history
Retrieve all messages exchanged in a session, in chronological order.role (either "user" or "assistant"), the message content, and a timestamp.