Home / Product / How it works
The memory control plane, explained.
Prove what an agent knew, when it knew it, and that the record was never altered.
Architecture
Five layers, one API.
One engine: local library, self-hosted server, or managed cloud. Agents talk REST or MCP.
| Layer | What it does |
|---|---|
| LLM / Agent | REST API or native MCP tool; durable facts are flushed to memory before the host framework compacts context. |
| Lians API | FastAPI: authentication, scopes, rate limiting, idempotency keys, OpenTelemetry traces. |
| Memories + Event Log | Encrypted, bitemporal facts alongside an immutable SHA-256 hash chain. |
| Subject Keys | Per-subject AES-256-GCM data-encryption keys, the targets of crypto-shred erasure. |
| Storage | PostgreSQL 16 + pgvector (HNSW) for hybrid search; Redis as a hot cache. |
Bitemporal model
Ask what was true, not just what is stored.
Every fact carries event time and system time. recall_at(...) reconstructs what an agent knew on a past date.
Recall pipeline
Hybrid search, validity-gated.
Hybrid retrieval is validity-gated so superseded versions stay out of current answers. If embeddings fail, results clearly report lexical-only fallback.
Supersession pipeline
Revised facts close cleanly.
Candidates are matched on structured keys (ticker, metric, subject) to find what could conflict.
A rule engine classifies the relationship (SUPERSEDES, REFINES, CONFIRMS, or ADDS), fully reproducible, no model required.
An optional model stage resolves paraphrase-level conflicts; the superseded version closes but survives for audit.
Low-confidence decisions queue in the console's Governance view. Confirm or reject with one click, audited either way.
Unadjudicated conflicts ride at the top of every context block as explicit "X disagrees with Y" lines until someone resolves them.
Tamper-evident audit chain
Proof built into every write.
Each event enters a SHA-256 hash chain. Verify the record, reconstruct past state, or export a signed memory statement.
Flagship · Memory admission control
Govern what is allowed into memory.
Most memory layers write whatever the agent hands them. Lians puts a policy gate in front of the store.
PII, PHI, and MNPI are classified on the way in, handled by policy, not by accident.
Low-trust inputs don't silently become durable facts.
Suspicious instructions are held out of recall until reviewed.
Too-vague candidates are rejected before they can dilute recall.
High-risk writes route to the console's Governance queue; run admission in off, monitor, or enforce mode.
Relationship graph
Compliance queries over bitemporal edges.
Edges are bitemporal too, so graph questions get the same point-in-time correctness as recall, with no separate graph database to operate.
| Operation | Use it for |
|---|---|
relate(...) | Record a temporal edge between two subjects. |
path(...) | Conflict-of-interest reachability: is attorney A connected to adverse party B? |
neighbors(...) | Related-party / beneficial-ownership and care-network analysis around a subject. |