What happened
The raw event, saved exactly as it arrived. It is never edited.
Heads up, we moved our renewal to the 14th.
7c1e04a2-…Send Statewave what happened. Your agent gets back the facts that matter, ranked and traced to their source.
One loop, from the raw event to the signed bundle your agent receives.
Chats, tickets, tool calls and decisions land as immutable, append-only episodes under a subject. Nothing is ever overwritten.
POST /v1/episodesA compiler turns episodes into typed memories with confidence, a validity window and a link back to the source. Newer facts supersede older ones.
POST /v1/memories/compileEach candidate gets a readable score from kind, recency, relevance and validity, then goes into the budget whole, highest score first.
POST /v1/contextAny context call can return a signed, replayable receipt. Labels and policies decide what each caller sees.
emit_receipt: trueRaw events go in, facts come out, and your agent gets a ranked bundle. Every fact links back to the event it came from.
The raw event, saved exactly as it arrived. It is never edited.
Heads up, we moved our renewal to the 14th.
7c1e04a2-…A fact Statewave learns from the episode, with a link back to it.
The best facts for the task, ranked and packed to your token budget.
Episodes are the timeline of what happened. Memories are what’s true because of it. Your agent gets both in one bundle.
Everything lives in your Postgres, with no telemetry path back to us. Policies decide what each caller sees.
How Statewave governs memory →Storage, retrieval and the default compiler run on your infrastructure. Data only leaves if you plug in an outside model.
The heuristic compiler plus a self-hosted embedding model, or text-only retrieval, means no Statewave-driven traffic leaves your network.
pii, financial and secret. Suggested at compile time, promoted by an operator.
YAML or JSON rules that deny or redact by label and caller type.
version: 1
rules:
- id: deny-secrets-for-research-agent
when:
memory_has_any_label: [secret]
caller_type: research-agent
action: deny
- id: redact-pii
when:
memory_has_any_label: [pii, pii.email]
action: redact
Audit what a policy would do before you switch it on.
Support is where Statewave is most tuned and most tested, against eight eval criteria.
Support agent workflow →The brief a human needs when an agent escalates, assembled in one call.
Northwind, annual plan. Renews on the 14th and prefers email for invoices.
Duplicate INV-2291 refunded · 9 Sep
Renewal moved to the 14th · 2 Sep
Deterministic 0–100 with explainable factors.
First response, resolution and breaches.
Surfaces the prior fix when a problem comes back.
One container plus Postgres with pgvector. Compilation goes through LiteLLM, so OpenAI, Anthropic, Bedrock, Vertex, Mistral or a local model via Ollama all work.
Read the quickstart →from statewave import StatewaveClient
with StatewaveClient("http://localhost:8100") as sw:
sw.create_episode(
subject_id="account:northwind",
source="chat", type="conversation",
payload={"messages": [{"role": "user", "content": "We moved our renewal to the 14th."}]},
)
sw.compile_memories("account:northwind")
bundle = sw.get_context(
subject_id="account:northwind",
task="When does our plan renew?",
max_tokens=2000, emit_receipt=True,
)
print(bundle.receipt_id)
# 01J9ZK4T7M3QX8R2V6N0B5HCWDreceipt_id: 01J9ZK4T7M3QX8R2V6N0B5HCWD3 memories · 1 episode · 1,284 / 2,000 tokens · signednpx @statewavedev/statewaveCLIpip install statewavePythonnpm install @statewavedev/sdkTypeScriptdocker compose up -dDockerThree endpoints carry the loop. POST /v1/episodes appends an immutable, append-only event under a subject. POST /v1/memories/compile turns new episodes into typed memories with confidence, a validity window and source episode IDs. POST /v1/context returns a ranked, token-bounded bundle. Compilation is idempotent, so re-running it never duplicates.
Sections for the task, compiled facts, procedures, recent history and raw episodes, packed by score until the token budget is spent and never cut mid-item. Every row carries its kind, confidence, validity window, source episode IDs and supersession state.
A fixed scoring model, not embedding distance alone. Kind priority, recency, task relevance and temporal validity add up to a composite score. Support workloads add session, urgency and repeat-issue signals. The top items are packed until the budget runs out.
No. The default heuristic compiler runs fully locally, and retrieval can fall back to text matching. Add an LLM key to use LLM compilation and semantic search through LiteLLM, or point it at a self-hosted model to keep everything in your network.
Newer overlapping memories supersede older ones automatically. Each memory is marked active, superseded or tombstoned, superseded facts stay out of the bundle, and the status is recorded in receipts so you can see which version the agent used.
An immutable record of one context call, signed when a signing key is configured. It carries an integrity hash of the exact bytes handed to the model, the policy in force and the source of every memory it used. Replay re-runs that retrieval against today’s memories and shows what would change.
Not today. The weights are fixed so ranking stays deterministic and reproducible. You can scope requests by subject, filter by memory kind, or modify the context assembler in your own self-hosted deployment.
Inspect every bundle your agent receives. Start with one command on your own infrastructure, with storage and retrieval in your own Postgres.
Need an SLA or an architecture review? Talk to us →npx @statewavedev/statewave01J9ZK4T7M3QX8R2…✓ Signed