Verifiable agent brain runtime with memory, context assembly, event receipts, and auditability
Reason this release was yanked:
Superseded by 2.1.1; 2.1.0 exposed an incorrect public package boundary for the cloud-only release.
Project description
Bilinc
Verifiable agent brain runtime for autonomous systems.
pip install bilinc
Most agent memory systems are a vector store with a wrapper. Bilinc is a verifiable agent brain runtime: it assembles context, decides what deserves memory, verifies and revises beliefs, and records auditable receipts for what changed and why.
Others store memories. Bilinc manages truth.
What's new in 2.1
Bilinc 2.1 turns the state plane into a runtime layer for agents:
- Cognitive runtime and workspace primitives for normal agent turn lifecycles
- Context assembly for prompt-safe memory packets with evidence references
- Salience/writeback policy for deciding what should be remembered
- Event ledger and eval receipts for verifiable memory operations
- LangGraph and framework-agnostic runtime adapters
- Project-isolated Cloud runtime sidecar foundation
Why Bilinc
Long-running agents fail in predictable ways:
- They store contradictions they never catch.
- They overwrite useful context with noisy recency.
- They cannot roll back when memory or tool state goes bad.
Bilinc gives agents a state layer with verification, belief revision, provenance, and rollback built in.
Core capabilities
| Area | What Bilinc provides |
|---|---|
| Memory model | Working, episodic, procedural, semantic, and spatial memory with per-type decay curves |
| Recall | FTS5 BM25 + vector similarity + knowledge-graph/entity signals, fused with RRF |
| Evidence-aware recall | Opt-in recall replay, structured claim projection, read-only contradiction probes, named recall profiles, and conservative entity/backlink projection |
| Belief revision | AGM-style EXPAND / CONTRACT / REVISE for conflict-aware updates |
| Verification | Z3 SMT checks at the commit gate |
| Auditability | Merkle-chain provenance, event ledger, eval receipts, snapshots, diffs, and rollback |
| Cognitive runtime | Context assembly, workspace frames, salience/writeback routing, and runtime adapters |
| Agent integration | MCP server/admin preview, LangGraph checkpoint/workspace adapters, framework-agnostic runtime adapter, Claude Code / Cursor / VS Code / OpenClaw translation |
| Cloud foundation | Project-isolated runtime sidecar with service-token auth and snapshot endpoints |
| Storage | SQLite by default, PostgreSQL optional |
Quick start
from bilinc import StatePlane
from bilinc.storage.sqlite import SQLiteBackend
backend = SQLiteBackend("agent_state.db")
sp = StatePlane(backend=backend, enable_verification=True, enable_audit=True)
# Commit a belief: verification and audit happen before write.
sp.commit_sync(
"user_preference",
{"theme": "dark", "language": "python"},
memory_type="semantic",
importance=0.9,
)
# Recall across FTS5, vector, and graph signals.
results = sp.recall_all_sync("user preference", limit=5)
# Snapshot, mutate, rollback.
snapshot_id = sp.snapshot_sync()
sp.commit_sync("user_preference", {"theme": "light"})
sp.rollback_sync(snapshot_id)
CLI
bilinc --db ./agent.db commit --key USER_PREF --value '{"theme": "dark"}'
bilinc --db ./agent.db recall --key USER_PREF
bilinc --db ./agent.db forget --key USER_PREF
bilinc --db ./agent.db status
# Hermes integration
bilinc hermes bootstrap
bilinc hermes smoke
MCP integration
Bilinc ships as an MCP server for Claude Code, Cursor, and any MCP-compatible agent:
{
"mcpServers": {
"bilinc": {
"command": "python",
"args": ["-m", "bilinc.mcp_server.server_v2"],
"env": { "BILINC_DB_PATH": "~/bilinc.db" }
}
}
}
MCP tools include: commit_mem, recall, revise, forget, consolidate, contradictions, diff, snapshot, rollback, status, verify, query_graph, bilinc_recall_smart, bilinc_query_analysis, bilinc_event_segment, bilinc_summarize, bilinc_health, bilinc_benchmark, bilinc_export, and bilinc_import.
Cognitive runtime
Use Bilinc as the runtime memory/context layer around an agent turn:
import asyncio
from bilinc.integrations import BilincAgentRuntime
async def main():
runtime = await BilincAgentRuntime.local("agent_state.db", agent_id="agent-1")
model_input = await runtime.before_model_call(
session_id="session-1",
user_input="What changed since last run?",
messages=[{"role": "user", "content": "What changed since last run?"}],
)
# Send model_input.messages to your model, execute tools, then assimilate the result.
await runtime.after_model_call(
session_id="session-1",
user_input="What changed since last run?",
assistant_output="Release state verified.",
)
asyncio.run(main())
Event ledger and eval receipts
Bilinc 2.1 can record memory operations as events and bind evaluation results to those event IDs:
from bilinc.core import EventOperation, create_memory_event
event = create_memory_event(
operation=EventOperation.COMMIT.value,
subject="release_status",
memory_key="release_status",
payload_json={"status": "verified"},
)
print(event.id, event.event_hash)
Eval receipts bind benchmark or smoke-test results to persisted event IDs through a backend that supports the memory event ledger.
These receipts are for auditability and evaluation traceability; they do not imply a hosted Cloud deployment by themselves.
Cloud runtime sidecar foundation
For internal/hosted deployments, Bilinc 2.1 includes project-isolated runtime primitives:
pip install "bilinc[server]"
from bilinc.cloud import ProjectRuntimeManager
manager = ProjectRuntimeManager("./bilinc-runtime")
snapshot = manager.snapshot_project("550e8400-e29b-41d4-a716-446655440000")
Each project gets its own runtime database under the configured runtime directory. The sidecar path uses service-token auth and is a foundation for hosted Bilinc Cloud, not a claim that paid self-serve Cloud is generally available.
LangGraph checkpointing
Use Bilinc as a verified persistent checkpoint store for LangGraph agents:
from langgraph.graph import StateGraph
from bilinc import StatePlane
from bilinc.storage.sqlite import SQLiteBackend
from bilinc.integrations.langgraph import LangGraphCheckpointer
sp = StatePlane(backend=SQLiteBackend("checkpoints.db"), enable_verification=True)
checkpointer = LangGraphCheckpointer(sp)
graph = StateGraph(...).compile(checkpointer=checkpointer)
Every checkpoint can flow through Bilinc's revision and verification pipeline, making long-running LangGraph state inspectable and rollback-capable.
Architecture
StatePlane
├── Cognitive Runtime context assembly, workspace frames, salience/writeback
├── Event Ledger memory-operation events and eval receipts
├── WorkingMemory PFC-inspired active slots and eviction
├── AGM Engine EXPAND / CONTRACT / REVISE
├── Dual-Process Arbiter fast path + deliberate verification path
├── StateVerifier Z3 SMT contradiction gate
├── AuditTrail Merkle chain and provenance
├── KnowledgeGraph entities, relations, spreading activation
├── Hybrid Recall FTS5 → vector → KG → RRF fusion
├── ContextBudgetRL adaptive token allocation by memory type
├── Storage SQLite / PostgreSQL
├── Cloud Sidecar project-isolated runtime foundation
└── MCP Server v2 stdio + authenticated HTTP/admin preview
Benchmarks
| Benchmark | Score | Notes |
|---|---|---|
| LongMemEval-s | 98.0% R@5 | Fresh 2026-05-17 full 500-question run, no LLM reranker / no paid API |
| ConvoMem | 98.0% | 5 categories, repository recall pipeline |
| LoCoMo | 90.3% | Temporal, causal, and multi-hop recall |
Benchmark receipts and public-safe competitive positioning live under benchmarks/results/, including the 2026-05-17 LongMemEval competitive report. These are benchmark records, not hosted-service claims; public comparisons must preserve metric scope because competitor scores mix retrieval R@5 and LLM-involved task accuracy.
Comparison
| Feature | Bilinc | Mem0 | Zep | Letta |
|---|---|---|---|---|
| Z3 formal verification | ✅ | ❌ | ❌ | ❌ |
| AGM belief revision | ✅ | ❌ | ❌ | ❌ |
| Cryptographic audit trail | ✅ | ❌ | ❌ | ❌ |
| Snapshot / diff / rollback | ✅ | ❌ | ❌ | ❌ |
| Blind spot detection | ✅ | ❌ | ❌ | ❌ |
| Hybrid decay | ✅ | ❌ | ❌ | ❌ |
| FTS5 + vector hybrid recall | ✅ | ❌ | ✅ | ❌ |
| Knowledge graph | ✅ | ❌ | ✅ | ❌ |
| LangGraph checkpoint adapter | ✅ | ❌ | ✅ | ❌ |
| MCP server | ✅ | ❌ | ❌ | ✅ |
| Fully local mode | ✅ | ❌ | ❌ | ✅ |
Installation
# Core
pip install bilinc
# PostgreSQL backend
pip install "bilinc[postgres]"
# HTTP MCP server
pip install "bilinc[server]"
# Development
pip install -e ".[dev]"
pytest tests/ -v
License
BSL 1.1 — free for personal and research use. Commercial SaaS use is restricted until 2030, then Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bilinc-2.1.0.tar.gz.
File metadata
- Download URL: bilinc-2.1.0.tar.gz
- Upload date:
- Size: 208.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fde57baede7ca2a1c5584f89d3463522592111524ab5825d30ef8ed63f576351
|
|
| MD5 |
9c803d57013ca1881dfb04e9997fc102
|
|
| BLAKE2b-256 |
d63f035faab4a4ffa8330da9aefdf34a5d5f1f79e074c32fdcdb8fc33e3b9066
|
File details
Details for the file bilinc-2.1.0-py3-none-any.whl.
File metadata
- Download URL: bilinc-2.1.0-py3-none-any.whl
- Upload date:
- Size: 180.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea40564c42b183d423594866015372576ed176adfa690ae13ab63b222ecbc3b6
|
|
| MD5 |
28afc4f9f84e474be2957208805e7f37
|
|
| BLAKE2b-256 |
495f97ce755ae4b5b11995128859c71ef2dc92dd01ec5bce51cc8669bd866f4a
|