Skip to main content

blackboardx

A skeletal blackboard system for Python.

The blackboard architecture came out of HEARSAY-II, a speech understanding system built at Carnegie Mellon in the early 1970s under a DARPA programme. Its difficulty was that a stretch of speech admits several readings, and the knowledge that settles which one is right arrives in unrelated kinds: acoustic, lexical, syntactic, semantic. Which kind will settle a given stretch is not known until that stretch is examined, so the system could not be written as procedures calling one another, because a call fixes what runs next. HEARSAY-II gave its specialists a shared structure to work on instead. Each reads what bears on its own expertise and writes back what it concludes, and none of them calls another.

Later systems kept that arrangement and replaced the knowledge: HASP interpreted sonar rather than speech. H. Penny Nii, surveying blackboard systems in AI Magazine in 1986, named a system skeletal when it supplies the components alone and leaves the knowledge and the control to whoever builds on it.

blackboardx is skeletal in that sense. It supplies the board, which stores what agents write and puts every write in one order, and the control component, which determines who is notified of a change, which writes are admitted, and when the run ends. An application supplies its regions, their opening premise values, the agents the run starts with, an admission rule, a termination predicate, and limits.

The record outlives the run that wrote it. create_model opens a board the store does not hold yet; attach_model opens a run over a board the store already holds, and continues the sequence from where the record ends.

The library also carries both halves of the conversation between a blackboard and agents deployed as their own services: the bodies and operations they share, the piece that answers an agent's request, the piece that sends a notification without making the writer wait, and the client an agent calls with. Your service keeps its own HTTP server, its routes, its authentication, and its database; the library supplies the protocol between them.

An agent reads and writes through AgentBoard, which is the four reads and the three writes without the agent's own name. Control.as_agent returns an AgentBoard for an agent in the same process as the run, and BoardClient is one over HTTP, so an agent body is written once and deployed either way.

What an agent knows is the application's to supply. An agent whose expertise is an algorithm decides in its own code. An agent whose expertise is a language model puts the decision to the model, offering it the board as tools through blackboard.tools, and makes each call the model asks for. The library sends nothing to a model and depends on no provider's package.

The distribution name is blackboardx; the import name is blackboard. The documentation, including the API reference, is at https://moeinroghani.github.io/blackboardx/.

Install

pip install blackboardx
pip install 'blackboardx[postgres]'     # PostgresStore
pip install 'blackboardx[mongodb]'      # MongoStore
pip install 'blackboardx[notifier]'     # sending notifications to agents over HTTP
pip install 'blackboardx[agent]'        # BoardClient, for an agent calling a blackboard
pip install 'blackboardx[conformance]'  # the suite a store of your own is held to

The base install has no runtime dependency. InMemoryStore holds the record in the process, and SqliteStore uses sqlite3 from the standard library. A deployment keeps the record in the database it already runs, and the adapter for that database needs its driver.

Documentation

Installation The extras, and what each one gives you
Quickstart A run in full, and what each step means
Concepts What the board, the control component and a run are
Storage Where the record is kept, and what an adapter owes
Guides Writing an agent, notifying over HTTP, admission rules, ending a run, testing
Serve a blackboard Answering agents that run as their own services
Let a model decide Offering the board to a language model as tools it can call
What it does not do Every limit of this version, in one place
API reference Every exported name

Example

from datetime import timedelta

from blackboard import (
    Agent,
    Level,
    Premise,
    RunLimits,
    Settled,
    SqliteStore,
    create_model,
)

notifications = []

model = create_model(
    board_id="incident-4471",
    store=SqliteStore("incidents.sqlite3"),
    regions=[Level("platform"), Premise("window")],
    premises={"window": ["2026-08-16T20:00", "2026-08-16T22:00"]},
    agents=[Agent(name="ocp", notify=notifications.append)],
    limits=RunLimits(wall_clock=timedelta(minutes=10), idle=timedelta(seconds=1)),
)

(notification,) = notifications
window = model.reader.read_premise("window").value
model.control.write("platform", {"window": window, "findings": ["oom"]}, writer="ocp")
model.control.ack(notification.notification_id, agent="ocp")

assert model.control.wait_closed(timeout=timedelta(seconds=10)) == Settled()

Running that example a second time raises DuplicateRegionError, because the board is already in incidents.sqlite3. attach_model opens a run over the board.

License

Apache-2.0. The license text is in LICENSE, and every distribution carries it.

Metadata

Release files for blackboardx 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blackboardx 0.14.1
File Size Uploaded
blackboardx-0.14.1.tar.gz 376.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blackboardx 0.14.1
File Interpreter ABI Platform
blackboardx-0.14.1-py3-none-any.whl Python 3 none any Details

Total release size: 483.4 kB

Release files / blackboardx-0.14.1.tar.gz

Download URL blackboardx-0.14.1.tar.gz
Size 376.8 kB
Tags Source
SHA-256 checksum
How to use checksums
faf53efc41323bb61e4b72e4431f55cc9c478ee5e3a372db51a9ad7c07d2209a
BLAKE2b-256 checksum
How to use checksums
c329e204109413fd541c013c5db7eaaf7dbc50c169e8219e5d93e26b926d586d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / blackboardx-0.14.1-py3-none-any.whl

Download URL blackboardx-0.14.1-py3-none-any.whl
Size 106.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f10f898d7fadb859571f1e7fe6549f3e3d1e97100e07176e830ff366d95432b
BLAKE2b-256 checksum
How to use checksums
5b8ed55bd96a47d08d3236f783e7b3e2c0ebdf40725a0f33792607108b085532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.14.1 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page