Skip to content

How Chat Works

Chat is the primary way you interact with agents. Every conversation is a chat session tied to a specific agent. Messages stream in real-time, and you can see tool usage as it happens.

Each chat has:

  • An agent: the AI agent that responds to your messages
  • A user: you, the person sending messages
  • An optional space: provides shared context from previous conversations in that space
  • A title: auto-generated from the first few messages

When you send a message, the agent processes it along with the conversation history, any relevant memory, and the space context. The response streams back token by token.

Each chat carries context from several sources:

  • Message history: all previous messages in the conversation
  • User memory: facts the platform remembers about you
  • Agent memory: facts specific to this agent
  • Space context: if the chat is in a space, summarized context from that space
  • Agent identity: the agent’s personality and configuration

When the history grows too long, the platform compacts it automatically. It summarizes older messages to free up context space while preserving recent messages in full. This happens transparently when context usage reaches the configured threshold (default: 80%).

Messages in a chat can have different roles:

RoleDescription
UserYour messages
AgentThe agent’s responses
ToolResultResults from tool executions
TaskCompletionNotifications when async tasks finish
ContactMessages from external contacts
LiveCallMessages during voice calls

When an agent uses a tool during a conversation, you see the tool call and its result inline in the chat. Some tools have special UI elements:

  • Human-in-the-loop: the agent can pause and ask you to take over (e.g., for CAPTCHAs or 2FA). You get a link to a browser debugger session.
  • Questions: the agent can present you with a question and a set of options to choose from.
  • Task completions: when a delegated or scheduled task finishes, the result appears in the originating chat.

The sidebar shows your active chats, sorted by most recent. You can switch between them freely.

ActionHow
ArchivePOST /api/chats/{id}/archive
UnarchivePOST /api/chats/{id}/unarchive
Update titlePUT /api/chats/{id}
DeleteDELETE /api/chats/{id}

Archived chats are hidden from the main list but can be viewed and restored later.

Messages can include file attachments. You can upload files in the chat interface, and agents can produce files as output using the produce_file tool.