Skip to content

SynapCores / Recipe

Shared Memory for Multi-Agent Systems (Blackboard Pattern)

Let multiple AI agents collaborate through one shared memory — a blackboard where each agent posts findings and reads what the others know, by meaning, in plain SQL. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

All recipes· agents· 14 minutesintermediate✓ Certified v1.14.0-ceen

Part of the guide AI agent memory: types, architecture and how to build it, with every agent-memory recipe in one place.

Install free
Instance: localhost:8080

Install free with one command, then open Shared Memory for Multi-Agent Systems (Blackboard Pattern) in your instance. It's staged for a preview — nothing runs until you click Run. New to SynapCores? The quickstart covers install to first query.

Share

What is the blackboard pattern for multi-agent memory?

The blackboard pattern gives a team of AI agents one shared memory. Each agent — a researcher, a planner, a critic — posts what it learns to the blackboard and reads what the others have posted that is relevant to its own subtask. No agent talks to another directly; they coordinate through the shared board. In this recipe the blackboard is a single SQL table: findings go in as rows, get embedded, and each agent pulls back the entries closest in meaning to what it is working on, weighted by how confident the author was.

 researcher ─┐                     ┌─> planner   (reads: "what constraints exist?")
 critic ─────┼──► BLACKBOARD table ┤
 planner ────┘   (finding, agent,  └─> critic    (reads: "what claims need checking?")
                  confidence, embedding)

What you get: one table that every agent can write to and search by meaning, ranked by relevance and by how confident the posting agent was. No message bus, no separate vector store.

The whole pattern in 5 statements (runs as-is)

CREATE TABLE IF NOT EXISTS blackboard (id INTEGER PRIMARY KEY, agent TEXT, finding TEXT, confidence DOUBLE, embedding VECTOR(384));
INSERT INTO blackboard (id, agent, finding, confidence) VALUES
 (1,'researcher','EMEA buyers prefer monthly billing over annual contracts.',0.82),
 (2,'critic','Pricing below $25 risks looking cheap to enterprise buyers.',0.75),
 (3,'planner','We can ship an MVP in 6 weeks if we cut the dashboard.',0.70);
UPDATE blackboard SET embedding = EMBED(finding);
-- Any agent reads what matters to its subtask, by meaning, weighted by confidence:
SELECT agent, finding,
       COSINE_SIMILARITY(embedding, EMBED('how should we price it?')) * 0.7 + confidence * 0.3 AS score
FROM blackboard ORDER BY score DESC LIMIT 2;

Returns the critic's pricing warning first, then the researcher's billing finding — the two entries about pricing, out of three agents' notes. The steps below build the full version (task scoping, roles, a coordinator that synthesizes a decision).

Objective

When you run several specialized agents — a researcher, a planner, a critic — they need a way to share what each has learned. The classic pattern is a blackboard: one shared memory every agent writes to and reads from. Most teams reach for a message bus plus a vector store plus locking. Here you'll build a blackboard in one table: agents post findings with their identity and confidence, and any agent recalls the most relevant contributions by meaning. The same store works from any framework or a voice agent — see Use it from your agent at the end.

Step 1: Create the shared blackboard

One row per contribution, tagged with the posting agent, a confidence, and an embedding for recall.

CREATE TABLE IF NOT EXISTS recipe_blackboard (
  entry_id    INTEGER PRIMARY KEY,
  task_id     TEXT,                                  -- the shared task all agents work on
  agent_role  TEXT,                                  -- 'researcher' | 'planner' | 'critic' | ...
  finding     TEXT,
  confidence  DOUBLE,                                 -- 0..1: how sure the posting agent is
  created_at  TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  embedding   VECTOR(384)
);

Step 2: Agents post their findings to the blackboard

Several specialized agents contribute what they've learned about a shared task.

INSERT INTO recipe_blackboard (entry_id, task_id, agent_role, finding, confidence) VALUES
 (1,'launch','researcher','The target market is small businesses in EMEA with under 50 staff.',0.85),
 (2,'launch','researcher','Competitor X launched a similar feature last quarter at $19/mo.',0.80),
 (3,'launch','planner','We can ship an MVP in 6 weeks if we cut the analytics dashboard.',0.70),
 (4,'launch','critic','Pricing below $25 risks signaling low quality to enterprise buyers.',0.75),
 (5,'launch','researcher','EMEA buyers strongly prefer monthly billing over annual contracts.',0.82),
 (6,'launch','planner','A phased rollout starting in Germany reduces support load.',0.68);

Step 3: Embed the findings

The embedding model runs in-database, making every contribution recallable by meaning.

UPDATE recipe_blackboard SET embedding = EMBED(finding);

Step 4: One agent reads what's relevant to its subtask

The planner pulls everything the others have posted that bears on pricing — across agent roles, by meaning.

SELECT agent_role, finding, confidence,
       COSINE_SIMILARITY(embedding, EMBED('how should we price this and how do customers want to pay?')) AS relevance
FROM recipe_blackboard
WHERE task_id = 'launch'
ORDER BY relevance DESC
LIMIT 4;

Step 5: Weight contributions by confidence

Blend semantic relevance with each agent's confidence so a sure finding outranks a hedged one on the same topic.

SELECT agent_role, finding,
       COSINE_SIMILARITY(embedding, EMBED('what is the market and the competition?')) * 0.7
       + confidence * 0.3 AS weighted_score
FROM recipe_blackboard
WHERE task_id = 'launch'
ORDER BY weighted_score DESC
LIMIT 3;

Step 6: A coordinator synthesizes the blackboard into a decision

Feed the top contributions to GENERATE() so a coordinator agent produces a unified recommendation.

SELECT GENERATE(
  'You are a coordinator. Given these findings from your team, give a one-paragraph launch recommendation:\n' ||
  (SELECT GROUP_CONCAT(agent_role || ' (conf ' || confidence || '): ' || finding, '\n')
     FROM recipe_blackboard WHERE task_id = 'launch')) AS recommendation;

Cleanup (Optional)

DROP TABLE IF EXISTS recipe_blackboard;

Expected Outcomes

  • Step 4 surfaces the pricing and billing-preference findings for the planner — contributions from other agents, retrieved by meaning.
  • Step 5 promotes the higher-confidence market findings above hedged ones on the same topic.
  • Step 6 produces one coherent launch recommendation synthesized from every agent's blackboard entries.

You now have a working blackboard: independent agents collaborate through one shared, semantic memory — no message bus, no second store.

Use it from your agent (framework-agnostic — this is the whole point)

A blackboard is just one shared table + post and recall, so any set of agents uses it with no framework lock-in:

  • REST / SDK — POST /v1/query/execute (any language), or @synapcores/sdk client.executeQuery(...). Each agent posts findings with the Step-2 INSERT and reads relevant peer contributions with the Step-4/5 SELECT. Different agents can be different processes, languages, or even different frameworks.
  • MCP (native, on by default) — point any MCP client (Claude Code, Cursor, a custom loop, a voice runtime) at ws://<your-instance>/mcp?token=<jwt> (JWT from one POST /v1/auth/login → access_token). The execute tool posts to the blackboard; the query tool recalls peer findings — agent collaboration as tool calls.
  • Any framework — OpenClaw agents, a LangGraph multi-agent crew, an AutoGen team, or a voice agent in the loop all share the same blackboard. The database is the brain; the framework is swappable.

Key Concepts Learned

  • A blackboard — one shared, semantic memory — lets independent agents collaborate without a message bus.
  • Tagging each entry with agent_role + confidence lets readers weigh who said it and how sure they were.
  • A coordinator can synthesize the whole board with one GENERATE() call.
  • Because it's plain data ops (SQL / REST / MCP), shared memory works for any mix of agents and frameworks — the agent-agnostic backend pattern this cluster builds on.

Tags

multi-agentshared-memoryblackboardagent-collaborationvectorembeddingsmcp