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 interpreting sonar where HEARSAY-II interpreted 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, whether a write is 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 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]'    # PostgresBoard
pip install 'blackboardx[mongodb]'     # MongoBoard

The base install has no runtime dependency: the board it ships, SqliteBoard, is backed by SQLite, which comes with Python. A deployment keeps the record in the database it already runs, and the adapter for one needs its driver.

Documentation

Quickstart A run in full, in twenty lines
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, admission rules, ending a run, testing
API reference Every exported name

Example

from datetime import timedelta

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

notifications = []

model = create_model(
    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)),
    board=SqliteBoard("incident.sqlite3"),
)

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

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

License

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blackboardx-0.6.0.tar.gz (180.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blackboardx-0.6.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file blackboardx-0.6.0.tar.gz.

File metadata

  • Download URL: blackboardx-0.6.0.tar.gz
  • Upload date:
  • Size: 180.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for blackboardx-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9157669c189057a3e90026315c3b34ad313fef4ff6758f26b3f5206e62b9e519
MD5 78b3f5acde53490f75b706a5e3531e6e
BLAKE2b-256 4f1ba47b85a7d01b6aac7c6d408716d48836fbba0fef72aba843ff27611ad39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for blackboardx-0.6.0.tar.gz:

Publisher: publish.yml on MoeinRoghani/blackboardx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blackboardx-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: blackboardx-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for blackboardx-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38eb9c13181379388accc82fa679c0ec0d9b84d377467e60a75e33a282e2b1af
MD5 ae92d62324f28fd2c7982194e19d50ed
BLAKE2b-256 75855049146fb9bc86b4ed75574101423164adbfe8fab8f52f8969e010d99761

See more details on using hashes here.

Provenance

The following attestation bundles were made for blackboardx-0.6.0-py3-none-any.whl:

Publisher: publish.yml on MoeinRoghani/blackboardx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.14.1

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.1

2 files

0.10.1

2 files

0.10.0

2 files

0.8.0

2 files

0.7.0

2 files

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 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