Java · Spring Boot · SQLite · MCP · SolidJS

Black Box

A local record of decisions and handoffs for Claude Code and Codex. One session writes what it chose and why; a later session retrieves that context by project or topic. Since 0.3.0, per-project broadcasts flag live hazards, standing invariants, and started-but-unfinished work across sessions.


Black Box logo

Shared memory for coding agents.

Keep the decision, the reason, and the next step.
Recall them when another session picks up the work.

Get started · Connect an agent · Documentation

Java 21 MCP Streamable HTTP MIT License

Work can outlast an agent session. Black Box gives Codex, Claude Code, and other MCP clients a place to record decisions and handoffs, then retrieve that context before continuing. You can inspect the same records in a local web app, follow them back to their sources, and see how a project’s direction changed.

It runs locally with SQLite by default. Models and external search services are optional for the core capture-and-recall loop.

The Activity workspace, showing captured decisions and handoffs from a synthetic project.

Try the loop

  1. Capture a decision: what changed, why, and which alternatives were rejected.
  2. Leave a handoff: the verified state, unfinished work, and one useful next action.
  3. Recall the context: a later session asks recallContext for the project or topic and receives a bounded set of records with their sources.

A real API demonstration capturing a decision and handoff, then recalling the saved context.

The demo uses synthetic records and the actual API. Read or reproduce the demonstration.

Run a disposable demo

On macOS or Linux, install Java 21+, Maven 3.9+, Bash, curl, jq, and lsof, then:

# via nathanmauro.io/r/black-box
git clone https://github.com/nathanmauro/black-box.git
cd black-box
./scripts/quickstart.sh

The script builds the app, starts a private scratch database, runs the capture-and-recall example, and serves the UI at localhost:8766, opening it automatically on macOS. Model calls, external summaries, and editor launching are disabled for the demo. An occupied port is refused; choose another with SBA_DEMO_PORT=8877 ./scripts/quickstart.sh. The script prints how to stop its process and remove its scratch directory when you are done.

For a persistent installation, downloads, Windows guidance, and service setup, follow the installation guide.

Source vs. tagged release: this README describes main (0.3.0, release notes). The earlier v0.2.0 JAR predates the decision-ledger narrowing and still includes the retired task board; see its release boundaries and board retirement notes before upgrading an existing installation.

Connect your agents

A running Black Box server exposes Streamable HTTP MCP at http://localhost:8766/mcp:

# via nathanmauro.io/r/black-box
codex mcp add black-box --url http://localhost:8766/mcp
claude mcp add --transport http --scope user black-box http://localhost:8766/mcp

(Existing client registrations using the historical sba-agentic alias continue working unchanged.) Or preview hooks, MCP commands, and the bundled agent skill in one dry-run command with ./scripts/blackbox init (pass --apply to write them). Use your chosen port if it differs. Once registered against a running server, agents can call recallContext at the start of a task and captureDecision or captureHandoff at closeout. Opt-in hooks can also record session events (including Claude Stop responses) or inject a compact startup recall packet; see Agent integration and the restricted ChatGPT gateway.

Find the context behind the work

Recall separates the project from the question. Read decisions and handoffs, copy a briefing, follow supporting evidence, and explicitly record when a decision has been replaced.

Recall with a selected project, a question, and source-backed results from the synthetic example.

Activity and Browse let you search recorded events, filter by source or kind, inspect sessions, and follow parent/child agent relationships. Saved views and projectless braids help collect related work without moving the underlying records.

Trajectories put recorded history beside proposed next steps. Selecting a node reveals its source. Projections are possibilities written by an agent; their declared confidence is not a calibrated prediction.

A project trajectory with a selected node and its supporting record.

The optional macOS companion provides a small activity view and opens project-scoped recall. The browser interface remains available without the native companion.

What to expect

AreaCurrent behavior
StorageSQLite by default. Optional PostgreSQL owns a separate database for a single API server; local and PostgreSQL histories do not auto-synchronize.
RecallLexical retrieval works without a model. Optional semantic recall indexes structured intent (Decision, Handoff, Observation, Idea, Evidence) and falls back to lexical search when embeddings are unavailable; projections are lexical-only, session-summary vectors are stored for backfill rather than returned by recall today, and the raw event log is searched lexically.
SummariesA session that closes with a standing handoff reuses that handoff directly as its summary (summary_source = handoff) with no model call; sessions that moved past their last handoff fall back to the configured summary backend.
Capture & streamingExplicit MCP/REST tools plus opt-in hooks, idempotent capture keys, an optional local retry outbox, and cursor-based SSE replay for event.appended notifications.
ScopeSelf-hosted memory and lineage server; it records and retrieves context rather than executing coding agents, and no hosted service is offered here.

Data and access: the default server listens on 127.0.0.1:8766 without authentication. Network exposure requires authentication and HTTPS. When model summarization runs, the default source configuration invokes an external Codex wrapper that sends transcript text to that provider; choose a model-disabled or SBA_SUMMARY_BACKEND=local setup in the installation guide to keep summarization local. Ingestion redaction is best-effort; see configuration and redaction limits.

Architecture and measured behavior

Black Box is structured as a feature-first modular monolith (recording, memory, lineage, project, summary, ask, query, platform) on Java 21, Spring Boot, and Spring Modulith, with SolidJS/TypeScript compiled into the JAR:

Develop and contribute

The backend uses Java 21, Spring Boot, and Spring Modulith. The frontend uses SolidJS and TypeScript; its built assets are included in the JAR. Node is needed for frontend development, not for running a downloaded release.

Run commands from the repository root:

# via nathanmauro.io/r/black-box
mvn test
(cd frontend && npm ci && npm test)
(cd frontend && npm run check)
(cd frontend && npm run build)
./scripts/verify.sh --e2e

Use a separate checkout for verification builds if a service is running from your working copy; packaging replaces files under target/. The full verification path includes packaged browser journeys against disposable storage. See frontend standards, Java formatting, Java test stories, architecture, and package conventions. The documentation index separates user guides, contributor references, experiments, and historical design records.

License

MIT © 2026 Nathan Mauro

type to search...

↑↓ move ↵ open

keyboard shortcuts

/ or ⌘ then K or Ctrl then K
search the site
?
show these shortcuts
t
switch between dark and light
g then h
go to home
g then s
go to stories
g then f
go to field manual
g then p
go to projects
g then w
go to writing
g then a
go to about
esc
close search or this sheet

Shortcuts pause while you type in a field.