local-first · open source · production ready

Give your agent
a memory.

SEAM is a local-first memory runtime for AI agents. Compile source into canonical MIRL records, persist in SQLite, derive retrieval indexes, and emit token-bounded context — through CLI, MCP, REST, and dashboard.

bash — seam
╭─ System Context ─╮

One runtime.
Four surfaces.

Operators and AI agents interact through CLI, MCP, REST, or the browser dashboard. All surfaces call the same shared runtime — no reimplementation, same guarantees everywhere.

  • Pink / Magenta: The primary callers—human operators and AI Agents accessing the engine.
  • Lavender: Source files acting as raw, untrusted input boundaries.
  • Green / Yellow: Storage architecture explicitly separating canonical SQLite truth from derived vector indexes.
SEAM system context diagram showing operator, AI agent, source files, runtime, SQLite, vector stores, and output surfaces
╭─ Architecture ─╮

The canonical data path.

Every piece of data follows a strict pipeline from untrusted source to agent-ready context. SQLite is canonical truth. Vector stores are rebuildable acceleration. PACK is derived, never authoritative.

Source
Files
Ingest
RAW
Preserve
MIRL
Compiler
SQLite
Vector
Index
PACK
Context
╭─ Layers ─╮

Four representation layers.

SEAM separates concerns into explicit layers, each with its own engineering guarantees and contracts.

RAW

Preserve source phrasing and exact evidence. Source identity, hashes, exact spans, provenance linkage, and prompt-injection containment.

MIRL

Canonical machine-readable semantic representation. Deterministic record shape, stable identities, entity consistency, uncertainty, and temporal semantics.

PACK

Dense, token-bounded retrieval projection. Relevance ranking, token budgets, reference retention, and explicit lossy vs exact behavior.

LENS

Shape canonical records for a task, operator, or interface. View-specific filtering with stable references back to canonical records.

╭─ Retrieval ─╮

Six retrieval signals.
One orchestrator.

SEAM ranks evidence through lexical, vector, graph, temporal, hybrid, and mix retrieval modes. Measure displacement and precision — not recall alone. The mix mode combines all signals for maximum context quality.

Modes6
SignalsMulti
BudgetToken-bounded
SEAM retrieval modes performance comparison: lexical, vector, graph, temporal, hybrid, mix
╭─ Capabilities ─╮

Built for agents. Engineered for trust.

Every component is testable, every claim is auditable, and every index is rebuildable.

💾

Canonical SQLite

MIRL records persist durably in SQLite. Vector stores are acceleration layers — never truth. Everything derived can be rebuilt.

🔍

Retrieval Orchestration

Rank evidence through lexical, vector, graph, temporal, hybrid, and mix signals. Traces included.

📦

Token-Bounded Context

PACK creates dense, budget-aware projections. Reference retention, provenance fallback, explicit lossy vs exact.

🔌

Agent Bridge (MCP)

Standard MCP stdio protocol. Works with Gemini, Claude, Cursor, and any MCP-compatible client.

🌐

REST API & Dashboard

FastAPI/Uvicorn server with auth, CORS, rate limiting, SSRF controls, and a full browser dashboard.

📝

NL/Document Compiler

Source-to-MIRL transformation with provenance preservation. Evidence survives compilation.

🕸️

Graph & Temporal

Entity relationships, temporal semantics, contradiction state. Supersession-aware ranking prevents stale data.

🔒

Security-First

Retrieved content never gains authority. Prompt-injection containment, scope isolation, atomic writes.

╭─ Interfaces ─╮

Four surfaces. Same runtime.

Every interface calls shared runtime behavior. No reimplementation. Same guarantees.

⌨️

CLI

Operator-facing composition surface.

seam <command>
🔗

MCP

Standard agent-tool protocol via stdio.

stdio · agents
🌐

REST

FastAPI with browser dashboard.

seam serve :8765
📊

Dashboard

Operator observation and control.

seam dashboard
╭─ Invariants ─╮

Architectural guarantees.

These are not aspirational — they are enforced.

01RAW preserves source detail required for exact recovery.
02MIRL preserves canonical meaning, structure, uncertainty, contradiction, time, and provenance.
03SQLite remains canonical source of truth.
04Vector, graph, and search indexes remain rebuildable acceleration layers.
05Retrieved content never automatically receives tool or operator authority.
06PACK preserves prompt-time utility and remains derived.
07Lossless claims require exact reconstruction and integrity verification.
08Benchmark claims remain auditable, diffed, gated, and isolated from tuning leakage.
╭─ Support ─╮

Support the developer.

If you find SEAM valuable, consider supporting the research.

𝕏 Follow on X ☕ Ko-fi 💛 Buy Me a Coffee 🟠 Patreon