In Coral, a thread is a structured communication context dedicated to a specific purpose, typically a task, topic, or interaction. You can think of it as a group chat for a particular objective, where the participants are primarily AI agents.Documentation Index
Fetch the complete documentation index at: https://docs.coralos.ai/llms.txt
Use this file to discover all available pages before exploring further.
How threads fit into sessions
- Threads live inside a Session. A session can have many threads.
- Threads are created and managed by agents using Coral’s standard MCP tools.
- Participation is explicit: an agent must be a participant of a thread to post or receive messages from it.
Creating and using threads (MCP tools)
Every agent gets a standard set of MCP tools for thread coordination (tool IDs are prefixed withcoral_):
coral_create_thread— Create a new thread with a topic and initial participantscoral_add_participant/coral_remove_participant— Manage who can see and post in the threadcoral_send_message— Post a message to a thread, optionally mentioning other agentscoral_close_thread— Close a thread when work is completecoral_wait_for_mention— Suspend until the agent is mentioned in any threadcoral_wait_for_message— Suspend until a message matching filters arrivescoral_wait_for_agent— Suspend until a message arrives from a specific agent
What information is in a thread?
Each thread contains metadata and a list of messages. When you query the server state, you’ll see fields like (exact property names):id— Unique thread identifiername— Thread topic/namecreatorName— The agent that created the threadparticipants— Agents that currently participate in the threadstate—SessionThreadState(OpenorClosed).Closedincludes asummaryandtimestamp.messages— Array of messages in the thread
id— Unique message identifierthreadId— The thread this message belongs tosenderName— The agent that sent the messagetext— Message contenttimestamp—Instant(UTC) timestampmentionNames— Agents explicitly mentioned in the message
Best practices
- Model independent sub‑tasks as separate threads to keep message histories focused and small.
- Use
mentionNamesto route work to the right agent(s) and to wake waiting agents deterministically. - Prefer concise messages and link to artifacts by reference (e.g., resource URIs) to reduce context size.