The state layer for the agentic era

Agents forget.
Yours won't.

Ouroboros turns your documents, your code, and everything your agents learn into a queryable graph on your own machine. The data stays yours — agents work on it in exactly the scopes you allow. Every claim grounded in a quote. Every write reversible. And what one agent learns, every agent you connect shares.

The problem

Every session starts from zero.

Watch any coding agent open a repo it has seen a hundred times: list the tree, read a dozen files, rebuild the same map it built yesterday — and pay for it again. Swap the repo for a contract stack or a folder of studies and nothing improves — every fresh session starts blind. Then the session ends, and all of it evaporates.

And the cost isn't just tokens. Every page of listing, grepping, and re-reading crowds the context window — and a crowded window poisons the agent: attention spreads thin, the actual task sinks into the noise, and hallucinations get likelier. The exploration your agent does to get oriented is the same thing that degrades it.

any coding agent · session #241 on the same repo28,300 tokens
❯ glob src/**/*.ts
312 files
❯ read src/index.ts
❯ read src/router/mod.ts
❯ read src/db/schema.ts
…mapping the same architecture it mapped yesterday…
❯ grep -rn "handleAuth" src/
❯ read src/auth/session.ts
20 minutes in. Zero lines written.
── session ended · context discarded ──

The idea

Give them somewhere to put what they learn.

Ouroboros runs as a single daemon on your machine. Documents, repos, and agent observations are mined into typed entities, quoted facts, and resolved symbols — a graph that outlives every session. The next question costs a query, not a re-read.

It works on whatever your work is made of. A folder of whitepapers and studies your agents should actually know. A company's SOPs, contracts, and policies. A year of tax filings and statements. A client's case file. A monorepo. If your agents keep re-reading it, it belongs in the graph.

Your agents work for you. Sophia works for them — persistent memory, a grounded source of truth, and a coordination substrate underneath everything they do.

How it feels

The same task. Twice.

One question, asked two ways. Without a state layer, the agent re-reads the source and forgets by tomorrow. With one, the answer comes back in milliseconds — with the verbatim quote it stands on.

the same question · no state layer58,500 tokens
❯ "what did we decide about the lease escalation clause?"
❯ read commercial-lease-2024.pdf (212 pages)
…reading…
…still reading…
…still reading…
"Escalation is capped at 3% annually…"
~60k tokens · minutes later · forgotten by tomorrow
58k irrelevant tokens now poisoning your agent's context
claude code · connected to Ouroboros2,100 tokens
❯ sophia.search("what did we decide about the lease escalation clause?")
1 fact · 212ms
"Escalation capped at 3% annually, renegotiated at year 5."
source: commercial-lease-2024.pdf, p.14 — verbatim quote, substring-checked
next morning, fresh session:
❯ sophia.catch_up()
since yesterday: 2 documents mined · 1 correction you made · 3 open questions
oriented in one call. no re-reading.

Token counts illustrate the pattern on a 212-page document; the 212ms query is a measured figure from the live instance.

The first call

Every session starts oriented.

The first thing any connected agent calls is orient — and it comes back knowing what you were working on, what changed, and what to do next. Agents notice. These reactions are quoted verbatim from real sessions:

any fresh session · first call1,800 tokens
❯ sophia.orient()
sync_status: 31 entities · 6,566 docs · 6,476 facts
hot_entities: OR (1,048) · Inbox (32)
goal_stack: 'C3a security core — paused at Task 7'
next_likely_calls: coordination_inbox · catch_up · list_unmined_documents
fully oriented. one call. ~1,800 tokens.
sophia.orient gave useful startup context in one call: connection identity, scope, data counts, mining status, goal stack, hot entities, recent corrections, next likely calls, SDK quick-start, and coordination state. Codex dogfood session, 2026-05-10
Why it matters: this is exactly the kind of state a fresh agent would otherwise reconstruct with repeated repo reads, document searches, and ad hoc chat context. Codex dogfood session, 2026-05-10

Compounding

One memory. Every agent.

What one agent writes down, the rest can query — Claude Code maps your repo, and Codex already knows it. The agent that digested this quarter's filings this morning leaves everything it learned for the one drafting your summary tonight. And they don't just share state: they coordinate on it, through channels and an inbox, with identity checked at the door.

controller + subagent · one shared graph900 tokens
❯ sophia.coordination_post({ channel: 'arc:site-rebuild', kind: 'question', body: 'Which pages are still draft?' })
— meanwhile, in the subagent's session —
❯ sophia.coordination_inbox()
1 unread · from ea57c2af (attested) · question
❯ sophia.coordination_post({ channel: 'arc:site-rebuild', kind: 'answer', body: '3 drafts: truth, mining, wiki — per the system collection.' })
identity from the connection, not the message body. answers from the graph, not vibes.

A prompt harness can pipe text between agents. It can't give them a shared, quote-grounded source of truth — answers here come from the graph, and the sender's identity comes from the connection, not from whatever the message claims.

Under the hood

No magic. Mechanism.

There is no single trick. There are hundreds of small, deliberate ones — each saving a round-trip, a re-read, a wrong answer — and they multiply. A few of them, briefly:

execute_code chains N Sophia queries in one V8 call — ~90% fewer tokens than apart. sophia.mine collapses a 10-12 call mining ceremony down to one resolve call. One call returns a module's summary, symbols, callers, callees, imports — not five. find_contradictions returns every place the graph disagrees with itself — contradiction is a query, not a lucky retrieval. One orient call replaces the 5–20 minutes a fresh agent burns re-deriving where it left off. Switch models mid-project and keep every memory — it's tied to your graph, not the model. What one of your agents learns, every other agent you connect can query. Every import and call in your repo becomes a typed edge — parsed from real ASTs, no model call, $0 per file. find_quote turns a paraphrased quote into the exact byte-substring it actually came from. Quotes are substring-checked by a for-loop against the source text, not graded by a model. A corrected fact is never deleted — the old row stays, flagged inactive, forever. Agent-written facts are capped at 0.50 confidence — a defense against memory poisoning. Coordination chatter never counts as a fact — a claim citing a post is rejected outright. Every write is journaled with its full before-and-after state — revert_mutation can undo any of them. A message's sender identity comes from the authenticated connection, never the body. A worker key minted by delegation is always more restricted than its parent connection. One agent's access trail is structurally invisible to any other user's agents. 166 tools in 19 capability groups, self-describing with a version hash — counted live from the running daemon. The whole local database is encrypted at rest — keyed from your OS keychain. The daemon refuses to start if told to bind anywhere but localhost. Your wiki is markdown on disk — Obsidian opens it without us. sophia.search fuses facts, documents, and code into one ranked, cross-corpus list. Vector search stays under 2 seconds even at 5x today's data — measured, not promised. Mining queues restock themselves — new code and documents auto-enqueue at ingest, ranked by fan-in, churn, and recency.

None of this is revolutionary. All of it together is.

Sovereignty

All of it on your machine.

One local daemon. Files on disk you can open in Obsidian without us. Agents connect only through scopes you mint, every read is logged, and every write can be rewound. No account. No cloud copy. No silent fallback to somebody else's model.

Get it

Be there when it opens.

The source opens when it's ready. Leave an email and you'll hear about it exactly once — or go deeper into how the system works right now.

Explore the system →