Chat
Agent API
Chat
Send messages to your LeedAB agent via API
POST
Chat
Documentation Index
Fetch the complete documentation index at: https://docs.agent-mind.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Chat with your configured LeedAB agent programmatically. Your agent has access to all your memories, custom tools, and web search capabilities. Perfect for building chatbots, customer support systems, or any application that needs intelligent AI responses. Key Features:- Access to all your memories (with user_id segmentation for multi-tenant apps)
- All your custom tools available
- Web search and webpage reading built-in
- Streaming (SSE) or synchronous responses
- Persistent conversation history
Request Body
The message to send to the agent.
Continue an existing conversation. If not provided, a new conversation is created.
Important for multi-tenant apps: Segment memories by end-user. When provided, the agent’s
remember, recall, and forget tools only access memories tagged with this user_id. This lets you serve multiple end-users while keeping their data separate.Optional session identifier for grouping related conversations. Useful for filtering conversations later.
Additional context to include with the message. Key-value pairs that will be prepended to the message.
Whether to stream the response (Server-Sent Events) or return the complete response. Default is streaming.
Response
Non-Streaming Response (stream: false)
Returns the complete agent response as JSON.Streaming Response (stream: true)
Returns Server-Sent Events (SSE) with real-time agent output.Examples
Basic Chat
Multi-Tenant App (User Segmentation)
Useuser_id to give each of your end-users their own memory space:
Streaming Response
Continue Conversation
With External Context
Streaming Event Types
Whenstream: true, you’ll receive these event types:
| Type | Description |
|---|---|
thinking | Initial event with conversation/message IDs |
thinking_step | Agent’s reasoning process |
planning | Agent’s plan for the task |
code_action | Python code being executed |
tool_start | Tool invocation starting |
tool_end | Tool result |
complete | Final agent response |
error | Error message if something went wrong |