openeruka
The open-source knowledge state memory server for AI agents.
openeruka is a fully self-contained memory server that enforces the knowledge state invariant: Confirmed facts cannot be overwritten by Inferred guesses. Run it locally, connect eruka-mcp to it, and your AI agent gets grounded, protected memory — no hosted service required.
# Start the server locally
# Connect Claude Code / Claude Desktop via eruka-mcp
# Set ERUKA_API_URL=http://localhost:8080 in eruka-mcp config
The knowledge state invariant
use KnowledgeState;
// The core contract — enforced server-side, not advisory
assert!;
assert!;
When your agent tries to overwrite a Confirmed fact with an Inferred guess, the server returns 409 Conflict. LLM hallucinations cannot corrupt verified knowledge. No other memory system enforces this.
Interaction surfaces
openeruka exposes three equivalent interfaces:
| Interface | Command | Use case |
|---|---|---|
| REST API | openeruka serve |
Connect any HTTP client, agent, or openeruka-client |
| MCP server | openeruka mcp |
Claude Desktop, Claude Code, Cursor via eruka-mcp |
| CLI | openeruka get/set |
Quick reads and writes from the terminal |
All three share the same SQLite backend and enforce the same knowledge state rules.
Quick start
# Install
# Start REST server (SQLite backend, default ./eruka.db)
# Write a confirmed fact
# Try to overwrite with an inferred guess — rejected with 409
# → 409 Conflict: field is CONFIRMED, write has lower knowledge state
# Read it back — still the original
Use as a library
[]
= "0.1"
= "0.1"
// Embed SqliteContextStore in your own Rust agent
use ;
let store = open.await?;
// Write enforces the invariant
store.write_field.await?;
openeruka vs eruka.dirmacs.com
eruka-mcp can connect to either:
# Local openeruka (OSS, SQLite, single-tenant)
ERUKA_API_URL=http://localhost:8080
# Managed Eruka (PostgreSQL, multi-tenant, enterprise features)
ERUKA_API_URL=https://eruka.dirmacs.com ERUKA_API_KEY=sk:your-key
| openeruka (OSS) | eruka.dirmacs.com | |
|---|---|---|
| Knowledge state enforcement | ✅ | ✅ |
| REST + MCP + CLI | ✅ | ✅ |
| SQLite (local) | ✅ | — |
| PostgreSQL (scalable) | — | ✅ |
| Multi-tenancy | — | ✅ |
| B6 quality scoring | — | ✅ |
| Datalog inference | — | ✅ |
| Gardener pipeline | — | ✅ |
| SLA / HIPAA / SSO | — | ✅ |
DIRMACS ecosystem
- eruka-mcp — MCP client for openeruka and eruka.dirmacs.com
- ARES — multi-agent runtime that uses Eruka for context
- pawan — CLI coding agent with Eruka memory
- deagle — code intelligence engine
- DIRMACS — the company behind this stack
Docs
License
MIT — see LICENSE