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);