Tamper-evident cryptographic ledger for autonomous AI agents
Local-first · Hash-chained · Single-writer SQLite WAL · Optional Rust core
Architecture · Security Model · Experimental Features
What It Solves
Autonomous agents lack a reliable way to persist decisions with causal traceability. babylon60 provides a local-first memory substrate:
Validation → Single-Writer Queue → Hash-Chain Ledger → Git Sentinel
Every entry is linked to the previous via SHA3-256 hash. Every write carries a causal taint (who / when / why). Duplicates are rejected via UUID v5 idempotency keys. The chain is verified on read — not assumed correct.
Maturity Matrix
| Component | Status | Coverage | Use |
|---|---|---|---|
| BFT Ledger (SQLite WAL + hash-chain) | Beta |
~72% | Development |
| Cryptographic chain (BLAKE3 / SHA3-256) | Beta |
~68% | Development |
Python SDK (babylon60.*) |
Beta |
~65% | Development |
Rust core (strike_rs / PyO3) |
Alpha |
~41% | Experimental |
| MCP integration | Alpha |
~30% | Experimental |
Vector memory (sqlite-vec) |
Alpha |
~35% | Experimental |
| BFT Swarm / quorum | Prototype |
~20% | Research only |
| Lean 4 formal proofs | Prototype |
~15% | Research only |
| LoRA daemon / HDC | Design |
0% | Do not use |
Installation
pip install babylon60
# With cryptographic signing (Ed25519, Argon2)
pip install "babylon60[crypto]"
# With voice transcription (macOS Apple Silicon)
pip install "babylon60[voice-full]"
Quickstart
from babylon60.api.client import CortexClient
client = CortexClient()
print(client.status())
# {"ledger": "ok", "chain_valid": True, "entries": 0, "version": "1.0.2"}
Start the local REST + WebSocket API:
uvicorn babylon60.api.server:app --reload
# → http://localhost:8000
Verify chain integrity programmatically:
from babylon60.bft.ledger_actor import verify_chain
result = verify_chain(db_path="master_ledger.db")
# {"valid": True, "entries": 4821, "broken_at": None}
Architecture
flowchart TD
A[Agent / SDK Call] --> B[Validation Layer\nschema · UUID v5 idempotency]
B --> C[asyncio.Queue\nsingle writer]
C --> D[BFTLedgerActor]
D --> E[(SQLite WAL\nmaster_ledger.db)]
D --> F[SHA3-256 Hash-Chain\nprev_hash linkage]
F --> G[Git Sentinel\nauto-commit + causal taint]
E --> H[Read / Verify\nchain integrity check]
style A fill:#2B3BE5,color:#fff,stroke:none
style D fill:#1a1a2e,color:#fff,stroke:#2B3BE5
style E fill:#0A0A0A,color:#4CAF50,stroke:#4CAF50
style G fill:#0A0A0A,color:#CE422B,stroke:#CE422B
Ledger Entry Contract (click to expand)
Every write must satisfy this schema. Violations are rejected at the validation layer — not silently ignored.
{
"id": "uuid-v5", # Idempotency key — rejects duplicates
"prev_hash": "sha3_256-hex", # Chain link — breaks chain on mismatch
"payload": {...}, # Structured content
"causal_taint": "agent:reason", # Creation trace — mandatory
"lamport_t": int, # Logical clock — total ordering
"agent_id": "str", # Writer identity
}
Consensus Topology (M12 Levels)
| Level | Mechanism | Status |
|---|---|---|
| L1 — AP/CRDT | Local caches, telemetry | ✅ Stable |
| L2 — CP single-writer | master_ledger.db WAL |
✅ Stable |
| L3 — External witness | Git Sentinel (local repo) | ✅ Stable |
| L4 — BFT quorum | N≥3f+1 distributed swarm | 🧪 Prototype |
| L5 — Blockchain anchor | OTS / BTC OP_RETURN | 🔬 Research |
L1–L3 is the stable core. L4 and L5 are opt-in research extensions — not required for local agent memory.
Guarantees
| Property | Mechanism | What It Proves |
|---|---|---|
| Integrity | SHA3-256 hash-chain | Entry not modified after write |
| Provenance | Causal taint + timestamp | Who wrote it and when |
| Ordering | Lamport clock + WAL | Serialized, reproducible history |
| Idempotency | UUID v5 key | No duplicate writes |
| Isolation | Per-tenant DB scope | Workspace separation |
Local Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -x --tb=short
Build Rust core (optional — Python fallback available):
cd strike_rs && cargo build --release
Experimental
BFT Swarm, Vector Memory, Lean 4 proofs, LoRA daemon, Blockchain anchoring, and HDC are explicitly experimental. See docs/EXPERIMENTAL.md for status and known limitations. Do not use in production.
Titular Civil: CORTEX Core Dev · AKA: Borja Moskv (borjamoskv)
All Rights Reserved — Proprietary & Trade Secret
Art. 6.1, 6.2, 14 LPI (España) · Convenio de Berna · Ley 1/2019 de Secretos Empresariales
Metadata
Release files for babylon60 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| babylon60-1.0.2.tar.gz | 173.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| babylon60-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 358.8 kB
Release files / babylon60-1.0.2.tar.gz
| Download URL | babylon60-1.0.2.tar.gz |
|---|---|
| Size | 173.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e55d4eb077d89bbe73bda92ab9b87e297f5962de0591cfb0c9037003d739170
|
|
BLAKE2b-256 checksum How to use checksums |
ee36865e81a2334b9a8164823ed5c6df7e13decf8a018ca996f76a04d5c6502e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / babylon60-1.0.2-py3-none-any.whl
| Download URL | babylon60-1.0.2-py3-none-any.whl |
|---|---|
| Size | 185.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44277399fe60ebe93779dc45510233e9787d5405eafcdd7e95378d1020b3b86f
|
|
BLAKE2b-256 checksum How to use checksums |
43f92bb2a3783aa64815e891139cec4f74e35e28e4fb263b5fe52d636c0464c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|