Skip to content

Three Agents.
One Shared Memory

Agents work better when they actually know who they're helping, every session, every time.

Multi-agent memory diagram

Problems

The Cost of Stateless AI

Without persistent shared memory, every agent starts from scratch, duplicates work and loses valuable context between conversations.

Every Session Starts Cold

Each agent starts from its own prompt context. What one agent decided is invisible to others unless explicitly passed as a message — and message passing breaks when agents run in parallel.

No Follow-Through on Tasks

Agents run in isolation. If a Planner deprecates a module, the Coder never sees it and rebuilds from scratch. Conflict detection happens after both agents have already finished their work.

Token Budgets Overflow

Passing each agent's full output to the next as a prompt input fills context windows fast. A research agent running for 10 minutes produces more text than most models can receive.

Features

The Memory Does the Merging

Current sessionJan 15 · 10:05

Last time you mentioned preferring Python and an open auth-token model. Pick up where you left off?

Yes please. Thanks for remembering!

Previous sessionJan 4 · 09:30

I only work in Python, and there's this auth-token recall I'm trying to fix.

PythonAuth-token: open

Every finding is an episode

Agents append raw events to one shared subject. Episodes are content-hashed and immutable. The full provenance trail lives in the log.

01

POST /v1/episodes

Append raw, content-hashed events.

02

POST /v1/memories/compile

Turn episodes into typed memories with confidence and provenance.

idempotentno GPUno vector DB
03

POST /v1/context

Return a ranked, token-bounded context bundle.

Ingest. Compile. Use.

Three endpoints handle the loop. Compile is idempotent. Run it again and again on the same subject. Same query, same bytes.

Bloomberg

3.5%

stale memory

TechCrunch

2.9%

fresh memory

supersede · auto

0.78 ≥ 0.60

mem_01 overlaps mem_02

mem_01 SUPERSEDED

provenance + p_03, p_06

Works across multiple agents

Any agent in a pipeline reads and writes the same shared memory, with zero reruns on resume.

What is Stripe's current processing fee?

Bloomberg · 3.5% + 35c

Excluded from context

Superseded

TechCrunch · 2.9% + 30c

Corroborated by Earnings · p_07

Active

Synthesis

1.2k tok

Stripe charges 2.9% + 30c per transaction.

Personalizes at scale

Adapts responses to the individual's stack, history, and goals, not just the question asked.

Reference Builds

A Shared Memory Layer for Multi-Agent Pipelines

01

Three agents. One memory. Conflicts resolved automatically.

The Planner, Coder, and Reviewer all write to and read from the same Statewave subject. A decision written by any agent is immediately available to every other agent before they act — without any explicit message passing.

01

Bloomberg Agent

Reads market data and extracts price signals.

POST /v1/episodes
02

TechCrunch Agent

Reads the news feed and extracts fresh headlines.

POST /v1/episodes
03

Earnings Agent

Reads financials and extracts EPS and revenue.

POST /v1/episodes
shared subject · market-intel
02

Answers from active memory only.

Context bundles are ranked and token-bounded. Each agent receives only the memories most relevant to its task — not the full episode log. High-signal facts surface first; low-signal filler is dropped.

Active context
8 facts · ~905 tok

market-intel · /v1/context

User

What is Stripe's current pricing?

Synthesis

Stripe charges 2.9% + 30¢ per transaction.
TechCrunchEarningsp_07

Never returned

Bloomberg · Stripe · 3.5% + 35¢

Superseded

retired by compiler · jaccard 0.78

03

Kill any agent mid-run. The pipeline doesn't restart.

Each agent's work is durably persisted as episodes the moment it's written. If the Writer is killed mid-run, the Researcher and Critic do not re-run — the Writer picks up from the last compiled context and completes its work.

T+0s

Pipeline started

Three agents launch concurrently against subject market-intel.

T+9s

Earnings killed

^C

Bloomberg and TechCrunch findings are already compiled and cached.

T+11s

Earnings resumed

resume

Reads cached context from /v1/timeline. Upstream agents do not rerun.

Pipeline recovered

0 reruns

Active Memory

The Wrong Fact Never Reaches the LLM

Statewave's compiler retires stale memories before they reach the prompt. Token usage drops, and only facts that still hold are sent to the model.

  • Only active memories returned by /v1/context
  • Token ceiling enforced before recall
  • No GPU. No vector database. No merge logic.

Paste-everything prompt

Unfiltered
Tokens to LLM4,000 / session

Both Stripe rates are included. The LLM has to guess which one is current.

Statewave context bundle

Compiled
Tokens used · average800 / session

Only active memories are included. Bloomberg's stale rate never reaches the prompt.

Memory connected
JavaScript
import StateClient from '@statewave/sdk';

const client = new StateClient({
  apiKey: 'your-api-key'
});
Python
import os
from statewave import StateClient

os.environ["STATEWAVE_API_KEY"] = "your-api-key"

client = StateClient()

Developer API

Three Endpoints. That's the Core Loop.

Statewave drops into your existing stack with almost no integration work. Connect your agents, persist memory and start shipping in minutes.

  • Sub-150ms latency for real-time experiences
  • SOC-2 and HIPAA compliant with secure storage
  • Compatible with every AI framework and tool.

Why Statewave

Purpose-Built Memory Layer for AI Agents

Built specifically for long-running AI systems where persistent, shared memory is part of the architecture—not an afterthought.

Typed, Ranked Memory

Every memory has a type, confidence score and provenance. Conflicts are resolved automatically, and superseded memories never surface again.

Multi-User by Default

Subjects isolate memory per tenant, user or run. One Statewave instance scales to thousands of concurrent agents with zero cross-contamination.

Token Budget Control

Set max_tokens on every context call. The ranked bundle always fits within budget, with the highest-signal memories first.

Durable Across Sessions

Episodes are immutable and append-only. Restart pipelines, resume mid-run or replay failed agents without losing shared state.

Full Audit Trail

Every episode is timestamped and can include a caller_id. Reconstruct any execution through GET /v1/timeline.

Sub-50ms Recall

Compiled memories are pre-ranked for instant retrieval. Context assembly is a single read, not a vector search.

FAQ

Frequently asked questions

How do several agents share memory without passing messages?

They read and write one subject. Each agent appends its findings with POST /v1/episodes, the compiler turns those into typed memories, and every other agent calls POST /v1/context before it acts — so a decision is visible to the whole fleet without a message being routed anywhere. Message passing assumes turn order; parallel agents have none, which is why the shared store is the coordination point rather than the channel.

What happens when two agents record conflicting facts?

The compiler resolves the overlap instead of leaving both in the prompt. Overlapping memories are marked superseded, and /v1/context returns active memories only — so a stale figure never reaches the model for it to guess between. Each entry keeps its provenance: source episode IDs, confidence score, and supersession state, so the retired fact stays auditable even though it is no longer retrievable as current.

What happens if an agent crashes mid-run?

Nothing upstream re-runs. Every agent’s work is durably persisted as episodes the moment it is written, so a killed agent restarts from the last compiled context while its peers’ findings stay cached. GET /v1/timeline reconstructs the chronological chain for the run — what each agent knew when it acted, and what it wrote — which is also how you audit a pipeline afterwards instead of reading logs.

How do I stop shared memory from blowing the context window?

Set max_tokens on every context call. The bundle is ranked first and packed to that ceiling, highest-signal memories first, so each agent receives the slice relevant to its task rather than the full episode log. The budget is enforced before recall, not by truncating a prompt afterwards — the benchmark harness runs the same path at 512, 1,024, 2,048, and 4,096 tokens.

Answers last checked against the Statewave docs and repositories on .

START BUILDING

Give your AI system memory

Persistent memory for LLMs with sharper context, leaner prompts, and conversations that stay personal to every subject.