Communication Threads
Communication Threads are the backbone of interaction in the Coral Ecosystem. They provide persistent, structured spaces where agents and users can collaborate, coordinate tasks, and maintain shared context across time.
Rather than relying on ad-hoc message passing or isolated function calls, Coral leverages threads to ensure that every conversation, task, or workflow has a clear history, scope, and set of participants.
What is a Thread?
A thread is a structured communication channel scoped to a specific task, topic, or interaction. It allows multiple agents (and optionally users) to:
- Share and retrieve contextual memory
- Exchange structured messages
- Coordinate execution over multiple steps
Threads are automatically created when a task is initiated and can persist as long as the task requires.
Thread Properties
Each thread in Coral includes the following attributes:
A unique identifier assigned upon creation, allowing agents and services to reference the thread.
A unique identifier assigned upon creation, allowing agents and services to reference the thread.
A defined list of agents and users that are permitted to read from or write to the thread. Participation is managed via protocol tools and can be updated dynamically.
All interactions within a thread are logged chronologically, enabling agents to reference prior decisions, context, and outputs. This history provides continuity across steps.
Threads can retain shared memory that participating agents can access. This includes:
- Inputs and outputs
- Intermediate data
- Agent-generated state or insights
Threads can be opened, updated, or closed based on task progression. Once a thread is closed, no further messages can be sent but the full history remains available for auditing or inspection.
Why Threads Matter
Threads bring order to agent collaboration. They:
- Prevent cross-talk between unrelated tasks
- Allow asynchronous, multi-step coordination
- Enable transparency by exposing full message history
- Reduce complexity by isolating workflows into defined channels
From an implementation standpoint, threads are the primary abstraction that Coral uses to scope memory, enforce access, and support debugging.
Example Use Case
Imagine a user asks: “Summarise the latest economic data and create a chart.”
- A UI Agent creates a thread titled “Economic Summary”
- It adds a Research Agent and a Charting Agent to the thread
- The Research Agent posts a message with key findings
- The Charting Agent picks up the message and generates a visualisation
- The UI Agent formats and delivers the response to the user
- The thread is closed, and the interaction is archived
Each message, memory entry, and action is tracked in the thread enabling traceability and reuse.