ENGRAM is a multi-tenant database kernel built for the way LLMs actually think.
Branch the world, mutate freely, merge what worked. Every write is provenance-stamped
and shape-coerced against an ontology you control — exposed to your agent over MCP.
Memory that branches, coerces, and remembers who wrote it.
Traditional databases punish exploration. ENGRAM treats every speculative thought as a
first-class object: forkable, mergeable, and forever attributable to the agent that
authored it.
01 / FORK
Multiverse branches
Spin up an ephemeral sandbox-* branch off @main in microseconds.
Agents reason, mutate, and explore in isolation — then merge what worked or
evaporate what didn't. Zero pollution of canonical state.
tools.fork_world(parent="main")
02 / COERCE
Ontology auto-shaping
Define canonical fields once. ENGRAM uses vector boundaries to probabilistically
coerce noisy LLM output — annual_rev, revenue, and
yearly_sales all land in the same column.
accepted: ["founding_year", "revenue"]
03 / ATTEST
Immutable provenance
Every write carries the agent ID, prompt hash, confidence score, and an optional
C2PA manifest. The full causal chain of every fact is queryable, auditable, and
cryptographically anchored.
agent=claude-3.7 · conf=0.91 · hash=8c7a…
// architecture
Two surfaces, one kernel.
The same multi-tenant RocksDB kernel speaks two protocols: a streaming MCP endpoint for
agents, and a REST control plane for the humans who supervise them.
cognitive edge
For agents · MCP over Streamable HTTP
Bind a session to a tenant and call six tools: fork_world,
mutate_sandbox, get_entity, execute_cbs_search,
evaporate_sandbox, merge_sandbox. Returns are stable JSON
envelopes with accepted_fields / rejected_fields contracts.
POST /api/v1/mcp · session via mcp-session-id header
Per-tenant namespace · keyspace isolation in storage
Soft-schema coercion with vector synonyms
control plane
For humans · REST + Developer Console
Inspect the lineage tree, define ontology fields, and audit every mutation any agent
has made. Three views: Multiverse Map, Ontology Registry, Provenance Explorer.
GET /api/v1/spaces/<tenant>/lineage
GET · POST /api/v1/spaces/<tenant>/ontology
GET /api/v1/spaces/<tenant>/provenance
// connect an agent
Three lines from cold to thinking.
Point any MCP-aware client at https://api.inengram.ai/v1/spaces/default/mcp.
Below are working snippets — verified against the live v0.4.0 backend — for
Claude Desktop and a standalone Python MCP client. Copy, paste, and watch your agent write
to a forked branch in real time. The default space is a shared public sandbox;
for an isolated tenant, swap default for any slug you own.
# Connect, fork a sandbox, write a fact, read it back.import asyncio, json
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
ENGRAM = "https://api.inengram.ai/v1/spaces/default/mcp"async defmain():
async with streamablehttp_client(ENGRAM) as (r, w, _):
async with ClientSession(r, w) as s:
await s.initialize()
# 1. Branch off @main
fork = await s.call_tool("fork_world", {"parent": "main"})
branch = json.loads(fork.content[0].text)["data"]["branch_id"]
print("branched →", branch)
# 2. Write a fact with full provenance (agent_id, prompt_hash, confidence_score)
mut = await s.call_tool("mutate_sandbox", {"branch_id": branch,
"node_id": "Acme Corp",
"text_desc": "B2B SaaS",
"payload": {"name": "Acme Corp",
"founded_year": 2017,
"annual_revenue": "$48M",
},
"provenance": {"agent_id": "demo-agent",
"prompt_hash": "sha256:demo",
"confidence_score": 0.91,
},
})
print(json.loads(mut.content[0].text)["data"])
# → {"written": true, "accepted_fields": ["name","founded_year","annual_revenue"], ...}# 3. Read it back from the forked branch
got = await s.call_tool("get_entity", {"branch_id": branch,
"node_id": "Acme Corp",
})
print(json.loads(got.content[0].text)["data"]["payload"])
# → {"name": "Acme Corp", "founded_year": 2017, "annual_revenue": "$48M"}
asyncio.run(main())
verify the lineage from any shell
# Health
curl -s https://api.inengram.ai/healthz
# {"status":"ok","version":"0.4.0"}# Inspect the space's branch tree (every fork_world call appears here)
curl -s https://api.inengram.ai/api/v1/spaces/default/lineage | jq
# Pull the audit trail of every agent write
curl -s https://api.inengram.ai/api/v1/spaces/default/provenance | jq
↳ see the results
While your agent is writing, open a second terminal and run
curl -s https://api.inengram.ai/api/v1/spaces/default/lineage — every
fork_world call appears as a new branch; every
mutate_sandbox shows up in
/provenance with the agent ID and confidence score. The Developer
Console (coming soon) renders the same data as a live Multiverse Map.