Skip to main content
Back to all articles
AI Engineering 5 min readUpdated September 20, 2026

When Every Agent Passes State to Every Other Agent, the Wiring Becomes the System.

A shared context blob is not a blackboard. Build multi-agent coordination around typed shared state, provenance, scoped projections, supersession, and a scheduler so agents stop depending directly on one another.

By Salman Butt · Senior Full-Stack & Generative AI Engineer
#Multi-Agent Systems#Blackboard Architecture#AI Agents#Agent Orchestration#Context Engineering#TypeScript#Python#Production AI
On this page

A multi-agent system often starts with very clean code.

The planner calls the retriever.

The retriever calls the writer.

The writer calls the critic.

Then the critic needs the original plan.

The retriever needs the critic's feedback.

A fact-checker gets added.

Now every agent is passing half the workflow state to three other agents, and changing one output shape breaks several call sites.

At that point, the problem is not that you need another agent.

The wiring has become the architecture.

This is where I reach for a blackboard.

Not a giant shared prompt.

Not a mutable state: any object.

A structured shared store that agents read from and contribute to, while a separate control loop decides who should act next.

That separation is the useful part.

A blackboard is not the same thing as shared context

The word "context" can make this pattern sound simpler than it is.

If every agent receives the whole shared object on every turn, you have not really decoupled anything. You have just moved the coupling from function arguments into one enormous prompt.

I want three distinct layers:

  • the blackboard — durable structured state;
  • the agent projection — only the entries one agent needs;
  • the scheduler — decides which agent is ready to contribute next.

That is close to the classic blackboard model: knowledge sources, a shared data structure, and control.

In an LLM system, the agents are the knowledge sources.

The blackboard is the shared workspace.

The scheduler is the part teams often forget.

Give every entry an author and parents

I do not let agents write anonymous keys like:

Text
state.resultstate.notesstate.output

Those names become meaningless as the system grows.

I prefer append-only entries with provenance.

type EntryKind =  | "goal"  | "plan"  | "evidence"  | "draft"  | "critique";​type BoardEntry<T = unknown> = {  id: string;  kind: EntryKind;  value: T;  author: string;  derivedFrom: string[];  supersedes: string[];  createdAt: number;};​class Blackboard {  private entries: BoardEntry[] = [];​  write<T>(    entry: Omit<      BoardEntry<T>,      "id" | "createdAt"    >,  ): BoardEntry<T> {    const stored = {      ...entry,      id: crypto.randomUUID(),      createdAt: Date.now(),    };​    this.entries.push(stored);​    return stored;  }​  read(    kind?: EntryKind,  ): BoardEntry[] {    return this.entries.filter(      (entry) =>        !kind || entry.kind === kind,    );  }}

The important fields are not the IDs.

They are author, derivedFrom, and supersedes.

When the final answer is wrong, I want to be able to walk backward:

Text
final answer← draft← critique← evidence← original goal

That makes debugging much easier than opening one final state blob and asking which agent last touched result.

Agents should read projections, not the whole board

This is the rule that keeps the blackboard from becoming a token sink.

A retriever may need:

Text
goallatest planlatest critique

It probably does not need:

Text
all previous draftsevery tool tracethe writer's formatting notesthe full audit history

So each agent gets an explicit projection.

type AgentProjection = {  kinds: EntryKind[];};​const projections: Record<  string,  AgentProjection> = {  retriever: {    kinds: [      "goal",      "plan",      "critique",    ],  },  writer: {    kinds: [      "goal",      "plan",      "evidence",    ],  },  critic: {    kinds: [      "goal",      "draft",      "evidence",    ],  },};​function project(  board: Blackboard,  agent: string,) {  const policy =    projections[agent];​  return policy.kinds.flatMap(    (kind) => board.read(kind),  );}

The blackboard can be large.

The prompt should stay small.

That is the difference between shared state and shared context.

The scheduler is what makes it a blackboard

If every agent runs after every write, you have built a very expensive pub/sub system.

Something still needs to decide who has useful work to do.

I like agents to expose two operations:

Text
ready(board) → booleanrun(projection) → entries

The scheduler only runs agents whose preconditions are satisfied.

Blackboard architecture for multi-agent coordination

A small control loop can be enough:

type KnowledgeSource = {  name: string;  ready(    board: Blackboard,  ): boolean;  run(    board: Blackboard,  ): Promise<BoardEntry[]>;};​async function runBlackboard(  board: Blackboard,  sources: KnowledgeSource[],  maxSteps = 30,) {  for (    let step = 0;    step < maxSteps;    step++  ) {    const ready = sources.filter(      (source) =>        source.ready(board),    );​    if (ready.length === 0) {      return board;    }​    const source = ready[0];​    const entries =      await source.run(board);​    for (const entry of entries) {      board.write(entry);    }  }​  throw new Error(    "Blackboard step budget exceeded",  );}

The step budget is not optional.

A bad readiness condition can otherwise fire forever.

The classic architecture called this the control component. Modern agent frameworks may call it an orchestrator, scheduler, supervisor, or controller.

The name matters less than giving control a real home.

Supersede state instead of mutating it

Suppose the writer creates draft D1.

The critic finds a factual problem.

The writer creates D2.

I do not mutate D1.

D2 declares that it supersedes D1.

Then the normal agent view filters old entries, while the audit view keeps them.

function liveEntries(  board: Blackboard,  kind?: EntryKind,) {  const all = board.read();​  const superseded = new Set(    all.flatMap(      (entry) =>        entry.supersedes,    ),  );​  return board    .read(kind)    .filter(      (entry) =>        !superseded.has(entry.id),    );}

Now stale state is explicit.

The writer sees the current critique.

The critic sees the current draft.

The post-mortem still sees the entire revision chain.

This is much safer than several agents racing to update the same state.draft field.

The blackboard should not own permissions

I wrote previously about ownership boundaries in multi-agent systems.

A blackboard does not replace those boundaries.

Shared visibility is not shared authority.

The research agent may be allowed to write evidence.

The critic may write critique.

Neither should suddenly gain permission to write payment_approved because the blackboard accepts arbitrary entries.

I keep a small write policy:

Text
retriever → evidenceplanner   → planwriter    → draftcritic    → critique

And I enforce it in trusted application code.

The model can propose an entry.

The host decides whether that agent is allowed to create that kind.

That prevents the shared workspace from becoming a shared privilege boundary.

Concurrency needs compare-and-set semantics

Once independent agents can run in parallel, stale writes become possible.

The critic reads draft D1.

Meanwhile the writer produces D2.

Then the critic finishes and writes a critique derived from D1.

That critique is not necessarily wrong.

It is stale.

This is why derivedFrom matters operationally, not just for audit.

Before acting on a result, the scheduler can check whether its parents are still live.

If the parent has been superseded, discard the work or run the agent again.

That is optimistic concurrency control for agents.

You do not need a distributed consensus protocol for every workflow.

You do need to know which version of shared state an agent reasoned over.

When I would use this pattern

A blackboard earns its complexity when several specialists contribute to one evolving artifact and the correct next step depends on what the system currently knows.

Good examples:

  • research with retrieval, synthesis, and fact-check loops;
  • planning where new evidence can reopen an earlier decision;
  • document generation with multiple revision passes;
  • incident investigation where specialists add partial findings;
  • data discovery across several heterogeneous sources.

I would not use it for:

Text
A → B → C

when that order is fixed and likely to stay fixed.

A direct pipeline is easier to read, easier to test, and cheaper to operate.

The signal that a blackboard may help is not "we have multiple agents."

It is:

Adding one agent now requires rewiring several existing agents.

That is a coupling problem.

The production rule I would keep

If your multi-agent system already has a shared state object, do not immediately call it a blackboard.

Ask whether it has the other properties that make the pattern useful:

Text
typed entriesprovenancescoped readsappend-only historysupersessionwrite permissionsreadiness conditionsa real schedulera step budget

Without those, it is just a shared blob.

With them, agents stop depending directly on one another.

They depend on contracts around the board.

That makes the system easier to extend, easier to replay, and much easier to explain after something goes wrong.

The goal is not to eliminate coordination.

It is to move coordination out of the handoff mesh and into a place you can actually reason about.

References

KEEP READING

Related engineering notes