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.

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.”

  1. A UI Agent creates a thread titled “Economic Summary”
  2. It adds a Research Agent and a Charting Agent to the thread
  3. The Research Agent posts a message with key findings
  4. The Charting Agent picks up the message and generates a visualisation
  5. The UI Agent formats and delivers the response to the user
  6. The thread is closed, and the interaction is archived

Each message, memory entry, and action is tracked in the thread enabling traceability and reuse.