Openeruka
Self-hosted Eruka-compatible memory server β SQLite backend, REST API, MCP, and CLI. Single binary.
Ask AI about Openeruka
Powered by Claude Β· Grounded in docs
I know everything about Openeruka. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
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. Ships as a single binary with SQLite bundled β production-ready in one command.
# Install the server binary
cargo install openeruka
# Start it
openeruka serve # default port 8080
# Connect Claude Code / Claude Desktop via eruka-mcp
# Default ERUKA_API_URL is http://localhost:8080 β no extra config needed
The knowledge state invariant
use openeruka::KnowledgeState;
// The core contract β enforced server-side, not advisory
assert!( KnowledgeState::Confirmed.can_overwrite(&KnowledgeState::Inferred));
assert!(!KnowledgeState::Inferred.can_overwrite(&KnowledgeState::Confirmed));
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
cargo install openeruka
# Start REST server (SQLite backend, default ./eruka.db)
openeruka serve
# Write a confirmed fact
curl -X POST http://localhost:8080/api/v1/context \
-H "Content-Type: application/json" \
-d '{"workspace_id":"my-project","path":"identity/company_name","value":"Acme Corp","knowledge_state":"CONFIRMED","confidence":1.0,"source":"user_input"}'
# Try to overwrite with an inferred guess β rejected with 409
curl -X POST http://localhost:8080/api/v1/context \
-H "Content-Type: application/json" \
-d '{"workspace_id":"my-project","path":"identity/company_name","value":"Acme AI Labs","knowledge_state":"INFERRED","confidence":0.7,"source":"agent_inference"}'
# β 409 Conflict: field is CONFIRMED, write has lower knowledge state
# Read it back β still the original
curl "http://localhost:8080/api/v1/context?workspace_id=my-project&path=identity/company_name"
Use as a library
[dependencies]
openeruka = { version = "0.2", default-features = false }
openeruka-client = "0.1"
// Embed SqliteContextStore in your own Rust agent
use openeruka::{SqliteContextStore, ContextStore, ErukaFieldWrite, KnowledgeState, SourceType};
let store = SqliteContextStore::open("./eruka.db").await?;
// Write enforces the invariant
store.write_field("my-ws", ErukaFieldWrite {
path: "identity/name".to_string(),
value: serde_json::json!("DIRMACS"),
knowledge_state: KnowledgeState::Confirmed,
confidence: 1.0,
source: SourceType::UserInput,
}).await?;
openeruka vs eruka.dirmacs.com
eruka-mcp can connect to either:
# Local openeruka (OSS, SQLite, single-tenant)
ERUKA_API_URL=http://localhost:8080 eruka-mcp
# Managed Eruka (PostgreSQL, multi-tenant, enterprise features)
ERUKA_API_URL=https://eruka.dirmacs.com ERUKA_API_KEY=sk:your-key eruka-mcp
| 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
