Blackboard & BrainCell
Blackboard coordinates active run state and handoffs; BrainCell stores canonical, versioned knowledge units with provenance, tenant isolation, and TTL policies.
An open R&D and service-mesh platform for building your own AI applications without cloud provider dependencies or vendor lock-in. Powering multiple products in active development with stateless LangGraph orchestration, durable Temporal execution, hybrid memory, and zero-trust security.
Actively developed in the open — built for teams and enthusiasts who want to experiment, self-host, and run real multi-agent systems on their own hardware.
git clone https://github.com/ContextUnity/contextunity.git && cd contextunity
uv sync --all-packages
uv run contextunity local init && uv run contextunity local upgit clone https://github.com/ContextUnity/contextunity.git && cd contextunity
cp .env.example .env
./scripts/cu-docker.sh startMost agent stacks tangle prompts, secrets, memory queries, and retries inside a single process. ContextUnity separates orchestration, memory, execution, security, and observability behind one typed contract.
PATH L, deploy unchanged to PATH T Temporal workers.CellEdges traversal + BrainSynapse Q-learning + pgvector fallback.ContextForge inspection.ContextRouter compiles project manifests into stateless LangGraph 1.2 DAGs, while ContextWorker guarantees execution across local and Temporal backends.
Every service communicates over typed gRPC contracts (L1 / L2 / L3 type boundaries →).
contextunity local up with SQLite and PATH L in-process workers — zero Docker required.contextunity.project.yaml Bind models, memory scopes, and per-node ContextShield permissions declaratively.@federated_tool handlers called by Router over bidirectional gRPC streams — zero DB credentials ever leave your app.PATH T Temporal workers without changing node or tool code.apiVersion: "contextunity/v1alpha10"
project:
id: "support-triage"
router:
graph:
triage:
template: "yaml:agent_loop"
shield_scopes: ["shield:secrets:read"]
memory_scope: "project:support"
config:
policy:
models:
llm:
default: "${CU_DEFAULT_MODEL}"
worker:
path: "temporal" # PATH T in prod, PATH L locallyfrom contextunity.core.sdk import ContextUnityClient
async with ContextUnityClient.from_env() as client:
verdict = await client.run_workflow(
"contextunity.project.yaml",
unit={"ticket_id": "CU-402", "tenant_id": "acme"},
)
print(verdict.status, verdict.observations)ContextBrain resolves relational structure before falling back to semantic embeddings, and uses Q-learning feedback from final verdicts to rank useful recall paths.
Blackboard coordinates active run state and handoffs; BrainCell stores canonical, versioned knowledge units with provenance, tenant isolation, and TTL policies.
Explicit causal, dependency, and hierarchy edges are traversed first for exact multi-hop context without drowning the prompt in noisy nearest-neighbor chunks.
Reinforcement updates from FinalVerdict outcome observations adjust edge weights over time so high-signal paths rise and stale paths prune.
pgvector semantic index activates only when graph traversal falls below coverage threshold, backed by background consolidation workflows.
ContextShield enforces fail-closed authorization and attenuated node tokens on every call, while ContextForge gives operators full trace visibility without mutating runtime state.
| Dimension | ContextShield (Zero-Trust Gate) | ContextForge (Observability Console) |
|---|---|---|
| Primary Role | Token attenuation, prompt secrecy, tenant & tool policy enforcement | Read-only trace inspection, review queues, and Lab mode experiments |
| Security Posture | Fail-closed gRPC interceptors; shield:secrets:write / shield:secrets:read | Zero mutation privileges over Router or Worker control planes |
| Core Abstractions | 4 actors · 4 orthogonal boundaries · per-node attenuated tokens | ForgeLibrarian diagnostics · Django + GridViewSpec + HTMX |
| Failure Mode | Explicit denial with structured audit event; never leaks raw credentials | Surfaces FinalVerdict outcome observations & drift alerts |
Synchronized directly from the core repository. Inspect any service contract or architectural decision record.
- Stateless DAG execution per ContextUnit request
- Per-node attenuated tokens minted via ContextShield
- Federated @federated_tool invocation over gRPC BiDi streams
- Strict type boundaries via contextunity.core.types1. Blackboard — run-scoped working memory
2. BrainCell — canonical versioned knowledge entities
3. CellEdges — explicit relational graph traversal
4. BrainSynapse — Q-learning recall weight updates
5. BrainEngram — pgvector semantic fallback & consolidation- PATH L: Fast local async runner for laptop & CI
- PATH T: Temporal Server durable timers, heartbeats & replay
- CAS-versioned WorkflowRunRecord & 5-actor registry- Bootstrap writes require shield:secrets:write
- Prompt reads require shield:secrets:read + project/node/tenant checks
- ContextShadower PII protection & SecurityAuditRecord trail- Trace & Graph Journey inspection
- Review Queues emitting Brain ReportOutcomeObservation
- ForgeLibrarian continuous architecture & docs diagnosticsEvery workspace package releases synchronously under lockstep versioning (v0.X.Y) so cross-service contracts remain guaranteed compatible. Below are the next four iterations — inspect the Full Roadmap (0.6 → 0.14) → or browse live ACDD milestones on GitHub →
Unified token UUIDs, secret-safe CLI diagnostics, local CLI provider subscriptions, in-proc test harnesses, and Brain Q-aging with local embeddings.
Worker CAS run records with recovery provenance and Huey cron, ShieldVault PostgreSQL + Ed25519/KMS signer, and service-principal trace artifacts.
Lightweight contextunity-sdk + pip install contextunity metapackage, AG-UI/A2UI transport, Headless Lab kernel, and Forge Lineage + Librarian.
LangGraph 1.2 inline/durable Task DAGs, parallel batch nodes, Telegram channel connectors, ACP coding adapter, and RouterArchitect immune planning.