Open-Cognition is a reference substrate for governed shared memory between autonomous and human-directed agents.
It separates immutable canonical objects (facts) from agent-scoped references (meaning), and provides a minimal control layer for attribution, auditability, and a safe system halt.
This repository defines a reference architecture, not a product.
Most shared AI systems, like agent networks and systems of agents, lose attribution and history as they evolve.
Open-Cognition ensures that:
Modern AI systems can write to shared state without leaving a reliable trail of:
Open-Cognition addresses this by defining a minimal, reproducible substrate with:
The goal is not to constrain agent behavior, but to make the shared system state inspectable, attributable, and reversible at the level of human control.
Open-Cognition is not:
It is a base layer substrate for recording and attributing changes to a system, not a system that decides what is true.
[!IMPORTANT] Open-Cognition records system state; it does not determine what is true or resolve conflicts.
git clone https://github.com/bjl13/open-cognition
cd open-cognition
make up # starts Postgres, MinIO, and the control plane
make migrate # applies the database schema
After startup:
| Service | Address |
|---|---|
| Control Plane + Dashboard | http://localhost:8080 |
| MinIO Console | http://localhost:9001 (minioadmin / minioadmin) |
| MinIO API | http://localhost:9000 |
| Postgres | localhost:5432 |
make smoke # full round-trip: create object β verify storage β test immutability
make smoke creates a canonical object, verifies the returned ID matches the SHA-256 of the submitted payload, and confirms duplicate rejection (409). Exit 0 means the substrate is working.
From the dashboard at http://localhost:8080 you can inspect system mode, canonical objects, agent references, and the audit log in real time.
To build and run the control plane outside Docker:
cp .env.example .env # set CONTROL_API_KEY and storage credentials
make build # compiles ./control-plane
./control-plane
Other useful targets:
make logs # tail all service logs
make down # stop all services
make validate # validate schemas against example files
make export # export canonical objects to backups/ (NDJSON)
make backup # dump Postgres to backups/ (gzip SQL)
make reconcile # verify every ledger object exists in storage
open-cognition/
β
βββ schemas/ # Canonical object, reference, and policy schemas
βββ examples/ # Minimal example records
βββ cmd/ # Control plane entrypoint (Go)
βββ internal/ # API, DB, models, lifecycle
βββ agents/ # Sample agent implementations
βββ dashboard/ # Compiled static UI
βββ migrations/ # Database schema
βββ scripts/ # Operational scripts (smoke test, backup, export, reconcile)
βββ docs/ # Architecture and governance notes
βββ roadmap.md # Live development intent document (see Roadmap)
Unchanging, content-addressed records.
Properties:
Canonical objects form the systemβs shared source of truth.
Agent-scoped pointers to canonical objects.
They express:
Agents cannot own objects.
They own their interpretation of them.
All state changes are recorded as append-only events:
History is never rewritten.
Attribution is always preserved.
A global control mode governs whether the system can mutate state:
RUNNINGSTOPPEDWhen stopped:
This provides a universal, independently-invocable halt mechanism.
Open-Cognition separates system memory into two layers:
Agents do not modify shared truth.
They interpret it.
---
config:
elk:
mergeEdges: true
look: neo
theme: neo
layout: dagre
---
flowchart TB
subgraph AP["Agentic Plane"]
direction LR
A["Agent"]
end
subgraph DL["Data Layer"]
direction LR
REF["Reference"]
J[" "]
O["Canonical Object Store"]
E["Event Ledger"]
end
subgraph CP["Control Plane"]
direction LR
C["Control Plane"]
end
A ~~~ REF
REF ~~~ C
REF --> J
J -- *records in* ------> E
A -- *creates* --> REF
J -- *points to* --> O
C -. *governs* .-> REF
C -. *enforces* .-> E
E -- *describes* ---> O
A@{ shape: rounded}
REF@{ shape: notch-rect}
J@{ shape: f-circ}
O@{ shape: cyl}
E@{ shape: bow-rect}
C@{ shape: hex}
A:::core
REF:::core
O:::core
E:::core
C:::control
classDef core fill:#BDAECD,stroke:#CDA433,stroke-width:2px
classDef control stroke:#6EC8C2,fill:#EA8A7C,stroke-width:2px
style A fill:#6EC8C2,stroke:#BDAECD
Open-Cognition separates system memory into two layers:
Open-Cognition consists of four minimal components:
Object Store (S3-compatible, e.g., R2)
Stores immutable payload blobs.
Reference Ledger (Postgres)
Stores canonical object records, agent references, and audit events.
Control Plane (Go)
Validates schemas, enforces policy, and manages lifecycle state.
Agents (Python)
Read canonical objects and emit signed references.
An optional static dashboard provides read-only visibility into system state.
β See docs/architecture.md for full component detail and local development notes, docs/architecture-diagram.md for the component diagram, and docs/data-flow-diagram.md for the write-path sequences.
An agent analyzes a document:
A report is stored as a canonical object
β obj:sha256:9f3cβ¦
The agent emits a reference
β ref:agent-A:001 β obj:9f3cβ¦
The reference encodes interpretation
β { tag: "financial", relevance: 0.8, horizon: "short-term" }
An event is appended to the ledger
β { actor: "agent-A", action: "reference.create", object: "obj:9f3cβ¦" }
A second agent emits a conflicting reference
β { tag: "incomplete", relevance: 0.3 }
The object is immutable; disagreement is expressed through references, not mutation.
No interpretation overwrites another and all perspectives remain attributable.
Because objects are immutable and references are isolated, interacting agents cannot overwrite or compound each otherβs errors.
[!TIP] When agents can observe each otherβs references, disagreement becomes visibleβenabling comparison, correction, and potential convergence over time.
Open-Cognition enforces three key separations:
Fact vs Interpretation
Canonical objects are immutable. References carry meaning.
Actor vs System
All mutations are attributable to specific agents or humans.
Execution vs Memory
Agents compute locally but cannot directly mutate shared truth.
β See docs/governance-model.md for canonical object rules, reference requirements, policy objects, system halt behaviour, and audit log semantics. See docs/trust-model.md for the identity, signing, and TOFU-key details, docs/lifecycle.md for system / object / reference lifecycles, and docs/threat-model.md for adversary assumptions and residual risks.
roadmap.md is a live working document tracking development phases, current status, known technical debt, and design rationale. It is not a governance document β it reflects development intent and internal reasoning, not system contracts.
It is intentionally surfaced here as a reference point for contributors and agentic coding tools. Reading it before working on the codebase will give you accurate context on what is complete, what is deferred, and why specific tradeoffs were made. It is the right place to look before proposing changes or extensions.
Current state: Phases 0β8 complete. Phase 9 (v1.0 freeze readiness) is next β see docs/v1-readiness.md.
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
The core substrate remains open while allowing independent extensions and commercial implementations.