Statewave Agent Memory Runtime

A self-hosted memory runtime that gives AI agents reproducible, provenance-tagged context instead of noisy query-time retrieval.

Stars
★ 259
Last updated
1mo ago v1.5.0
FARS reviewed
Nov 08, 2026
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Self-hosted serviceLibrary / SDKCLI
Works with
Universal · cross-platformOpenAI API · Claude APIClaude Code (Partial support)
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
PostgreSQL 14+ with pgvector ≥ 0.4.2DockerPython 3.11+Node.js (for npx install and TypeScript connectors)Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
Support teams that need returning customers recognised across sessions, ranked context inside a token budget, and a handoff pack via POST /v1/handoff when a case escalates.
Not a fit if
  • Multi-replica teams unwilling to switch to Postgres-backed rate limiting
  • Teams that want built-in auth that issues API keys and admin identities
  • Teams doing mostly single-hop lookups and optimising hard for token cost
Website
statewave.ai ↗ set on GitHub
Maintenance
Commits in the last 6 monthslast commit 2026-10-24latest release v1.5.0 (2026-08-30)
Source review
72/100 · Some gaps

What does this agent do, and when should you use it?

Statewave is an open-source memory runtime for AI agents, self-hosted on Postgres + pgvector, built around a compile-then-use model rather than per-query similarity search. It records append-only episodes per subject (user:, repo:, account:, or any prefix), compiles them into typed memories with confidence scores and provenance using either a fully local heuristic compiler or an LLM compiler, then assembles ranked, token-bounded context bundles for a given task. Every bundle comes with an immutable state-assembly receipt that traces back to source episodes, supports HMAC-SHA256 signing and POST /v1/receipts/{id}/replay. The server runs on port 8100 behind a REST API with a full OpenAPI surface, and ships Python (pip install statewave) and TypeScript (npm install @statewavedev/sdk) SDKs. It boots in demo mode with stub embeddings and the heuristic compiler, so no LLM key or GPU is needed to start; enabling semantic search and stronger extraction means pointing LiteLLM at any of 100+ providers.

The runtime is organised around subjects, and the end-to-end loop is ingest → compile → use. Ingestion uses POST /v1/episodes or POST /v1/episodes/batch (up to 100 at a time) to append raw events. Compilation calls POST /v1/memories/compile, which extracts typed, summarised memories with confidence scores and provenance, and is idempotent so recompiling produces no duplicates. Retrieval calls POST /v1/context to assemble a ranked, token-bounded bundle for a named task; the same query against the same subject at the same point in time yields the same bytes. Governance endpoints include GET /v1/timeline, GET /v1/subjects, DELETE /v1/subjects/{id} for subject-level deletion, POST /v1/handoff for a compact handoff pack, plus GET /v1/subjects/{id}/health for an explainable health score and /sla for response and resolution metrics. Search is served by GET /v1/memories/search across kind, text or semantic similarity, and POST /v1/resolutions tracks issue state per session. Compliance features include a declarative YAML policy engine (deny / redact) over memory tags such as pii, financial and secret, v0.9 heuristic auto-labeling with suggested_labels and operator promotion, multi-tenant isolation via the X-Tenant-ID header, and per-tenant region pinning that returns HTTP 403 residency.mismatch to processes in the wrong region.

  1. Support teams that need returning customers recognised across sessions, ranked context inside a token budget, and a handoff pack via POST /v1/handoff when a case escalates.
  2. Long-running coding agents that persist project memory — tech stack, preferences and architecture decisions — across separate conversations under a repo: subject.
  3. Platform teams that want to self-host memory on their own Postgres and wire any language or framework to it over the REST API, keeping data inside their network.
  4. Compliance and risk teams that need deny/redact policies over pii, financial and secret tags plus signed receipts showing which memories influenced each assembled bundle.
  5. Organisations with data-residency rules that pin tenants to a region so requests hitting the wrong region are refused outright.
  6. Teams building memory from non-chat sources by syncing GitHub, Slack, Notion, Zendesk or Gmail events into episodes with the @statewavedev/connectors-* packages, dry-run first.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npx @statewavedev/statewave
  • curl -fsSL https://www.statewave.ai/install | sh
  • irm https://www.statewave.ai/install.ps1 | iex
  • docker compose up -d
Ports
8100
Environment variables
STATEWAVE_LITELLM_API_KEY STATEWAVE_LITELLM_MODEL STATEWAVE_LITELLM_EMBEDDING_MODEL
Config files
.env docker-compose.yml
Runtime
Python 3.11+
Install notes cover
Windows · macOS · Linux · Docker

How do you install or deploy this agent?

The fastest path is the official install script or npx; you can also run it yourself with Docker Compose.

# macOS / Linux
npx @statewavedev/statewave
# or
curl -fsSL https://www.statewave.ai/install | sh
# Windows (PowerShell)
irm https://www.statewave.ai/install.ps1 | iex

Self-managed install:

git clone https://github.com/smaramwbc/statewave && cd statewave
docker compose up -d

This brings up Postgres (with pgvector) plus the API; migrations run on container start and the API is served at http://localhost:8100. The default is demo mode (stub embeddings + heuristic compiler). For LLM-backed behaviour, place a .env next to docker-compose.yml and re-run docker compose up -d:

STATEWAVE_EMBEDDING_PROVIDER=litellm
STATEWAVE_LITELLM_API_KEY=sk-...            # any LiteLLM provider
STATEWAVE_LITELLM_MODEL=gpt-4o-mini
STATEWAVE_LITELLM_EMBEDDING_MODEL=text-embedding-3-small

Requirements: PostgreSQL 14+ with pgvector ≥ 0.4.2; SDKs need Python 3.11+ or Node.js.

How do you use this agent?

Check readiness, then run the ingest → compile → use loop from the SDK or over HTTP.

curl http://localhost:8100/readyz
curl http://localhost:8100/healthz
from statewave import StatewaveClient

with StatewaveClient("http://localhost:8100") as sw:
    sw.create_episode(subject_id="user-42", source="chat", type="message",
                      payload={"text": "Alice asked about pricing tiers"})
    sw.compile_memories("user-42")
    print(sw.get_context("user-42", task="answer pricing", max_tokens=1000).assembled_context)

Interactive API docs live at http://localhost:8100/docs (Swagger) and /redoc. Key endpoints: POST /v1/episodes, POST /v1/memories/compile, POST /v1/context, GET /v1/timeline, GET /v1/subjects, DELETE /v1/subjects/{id}. Connector example (dry-run by default, nothing is ingested):

statewave-connectors sync github \
  --repo smaramwbc/statewave \
  --subject repo:smaramwbc/statewave \
  --dry-run

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • Deterministic context: the same subject, task and point in time always yield the same bundle bytes, backed by state-assembly receipts with HMAC-SHA256 signing and a replay endpoint
  • Compile-once design instead of query-time retrieval, producing typed memories with confidence scores and provenance and avoiding sampling noise
  • Fully self-hosted on Postgres + pgvector; the default heuristic compiler and stub embeddings run locally and the API process is CPU-only, so no GPU is required
  • Provider-neutral via LiteLLM (100+ model and embedding providers) with both Python and TypeScript SDKs covering sync and async usage
  • Built-in sensitivity labels with a YAML deny/redact policy engine, multi-tenant isolation, and tenant region pinning for residency-sensitive deployments
Limitations
  • You must run and operate PostgreSQL 14+ with pgvector ≥ 0.4.2 yourself; there is no vendor cloud as the primary path
  • Auth is limited to validating API keys you configure — it does not issue them, admin action identity (promoted_by) is still null, and multi-tenancy is app-layer without Postgres RLS
  • Rate limiting defaults to per-process and per-IP; multi-replica deployments must switch to STATEWAVE_RATE_LIMIT_STRATEGY=distributed and there is no per-tenant or per-API-key limiting yet
  • v1.5.0 is actively developed: receipt replay is current code plus original policy rather than byte-for-byte history, and federated cross-region audit plus a visual policy editor are still pending
  • Compiled bundles are denser than fact-store retrieval, so per-answer token cost is higher and a lighter fact store may be the better call for mostly single-hop queries

How does this agent compare with similar options?

The README contrasts Statewave with two alternatives: memory layers that store isolated facts and retrieve them per query (or extract a graph whose retrieval surface can return the same summary regardless of the question), and bolting a vector database or raw chat logs onto a prompt. It also states explicitly that it is not a chatbot framework, vector database, RAG pipeline, or hosted service.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Statewave Agent Memory Runtime This agent 72 · Some gaps Self-hosted serviceFree + model costs ★ 259 1mo ago Python OpenAI API · Claude API
MATE — Command Center for AI Agents 72 · Some gaps Self-hosted serviceFree + model costs ★ 111 today Python OpenAI API · Claude API
DuraGraph 50 · Major gaps CLIFree ★ 146 2mo ago Go —
Agent Barn 72 · Some gaps Self-hosted serviceFree + model costs ★ 112 1d ago Python —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
72/ 100 5-point scale 3.6 / 5
Trust 17/29
Reliability 9/14
Adaptability 16/18
Convention 15/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

The evidence describes self-hosting, API keys, tenant isolation, policies, sensitivity labels, region restrictions, and signed receipts. SECURITY.md also describes dependency and code scanning, supporting moderate to strong scores for least privilege, sensitive-data handling, and dependency security; however, some controls are asserted rather than demonstrated, and the documented defaults include an empty API key and wildcard CORS. Connector sync examples use dry-run and describe opt-in behavior, but the permanent subject-delete endpoint has no demonstrated confirmation or recovery safeguard, so confirmation and rollback score low. Provenance and data-flow documentation are linked, and optional LLM, embedding, and webhook paths are configurable, though their implementation details are outside the sample. Source traceability and a vulnerability-reporting contact are documented, but publisher identity and maintenance ownership remain unclear.

Reliability9 / 14 · 3.2/5

The CI definition includes a Python version matrix, lockfile check, migrations, unit and integration tests, and a container health probe. The app also checks schema compatibility and logs background-task failures. This supports ordinary reliability, but this static review does not claim to have run tests, and the sample cannot establish full consistency across documentation, lockfiles, and implementation. Dependencies have version ranges and a lockfile workflow; Postgres, optional LLM providers, and other services remain availability requirements. Readiness checks and missing-key messages help, though some startup failures are caught and the server continues, so error handling is not comprehensive.

Adaptability16 / 18 · 4.4/5

The README identifies developers as the audience, gives support and coding-agent scenarios, and clearly says the product is a memory runtime rather than a chatbot framework, vector database, or hosted service. Connector examples show how to invoke some capabilities, but connectors live in an external repository and their trigger details cannot be verified here. Support for Python 3.11–3.13, multi-architecture Docker, Postgres, REST, two SDKs, heuristic or LiteLLM compilers, and local/self-hosted deployment provides strong environment-fit evidence.

Convention15 / 18 · 4.2/5

The README organizes capabilities, deployment, API, configuration, limitations, and documentation clearly, though it is long and documentation spans repositories. Installation instructions cover npx, Docker, PowerShell, configuration, and tests; examples and FAQ are concrete, and limitations include the lack of RLS, admin identity, federated audit, and historical snapshots. Apache-2.0 is consistent across metadata, README, and license file. Version 1.5.0, an external changelog and roadmap, and CI version-consistency checks are referenced, but the changelog itself is not in the sample. SECURITY.md and contributor guidance provide reporting and maintenance pathways, while publisher identity and ongoing ownership are not verified.

Effectiveness10 / 13 · 3.8/5

The product assembles ranked, token-bounded context bundles with provenance and offers timelines, receipts, and deletion, making its outputs directly usable in prompts. The claimed value over query-time retrieval and benchmark advantage are primarily README assertions, so marginal value receives a moderate score. The README acknowledges higher token use per answer and suggests lighter fact stores for cost-sensitive, mostly single-hop workloads. Local heuristic and stub modes can reduce external costs, but the net benefit depends on the workload.

Verifiability5 / 8 · 3.1/5

The README links to specific endpoint, configuration, limitation, and architecture references; pyproject metadata, CI, app startup code, and the license provide partial cross-source corroboration. Key documents and connector implementations are outside the supplied sample, so they cannot be checked. CI and test helper files are evidence of a test setup, not evidence that tests were executed or independently verified here. The documentation distinguishes demo behavior and describes current limitations, but performance and multi-hop accuracy remain largely product claims, short of the evidence needed for full marks.

Risks and how to mitigate them
  • STATEWAVE_API_KEY defaults to empty and CORS_ORIGINS to a wildcard; configure authentication and restrict allowed origins before deployment.
  • Deleting a subject permanently removes its data; the sample shows no confirmation or recovery mechanism, so verify backups and deletion behavior first.
  • LLM, embedding, and webhook integrations can send data to configured external services; review data flows and provider settings before deployment.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 0f26bc7f1e69
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/statewave.svg)](https://followagents.com/en/agents/statewave)
<a href="https://followagents.com/en/agents/statewave"><img src="https://followagents.com/badge/statewave.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.5.0
    Release notes excerpt
    What's Changed * chore(deps): update ruff requirement from <1,>=0.15.20 to >=0.15.21,<1 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/288 * chore(deps): update fastapi requirement from <1,>=0.139.0 to >=0.139.1,<1 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/289 * chore(deps): update litellm requirement from <2,>=1.91.1 to >=1.92.0,<2 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/290 * docs: static Docker badge (avoid shields.io upstream rate-limit) by @smaramwbc in https://github.com/smaramwbc/statewave/pull/291 …
    View on GitHub ↗
  2. v1.4.0
    Release notes excerpt
    What's Changed * fix(admin): harden bulk delete matching by @skarL007 in https://github.com/smaramwbc/statewave/pull/268 * chore(deps): update litellm requirement from <2,>=1.89.2 to >=1.89.4,<2 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/261 * chore(deps): update opentelemetry-api requirement from <2,>=1.42.1 to >=1.43.0,<2 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/263 * chore(deps): update opentelemetry-exporter-otlp requirement from <2,>=1.42.1 to >=1.43.0,<2 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/267 …
    View on GitHub ↗
  3. v1.3.0
    Release notes excerpt
    What's Changed * chore(deps): bump starlette from 1.0.1 to 1.3.1 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/248 * chore(deps): bump aiohttp from 3.14.0 to 3.14.1 by @dependabot[bot] in https://github.com/smaramwbc/statewave/pull/249 * fix(tests): isolate test runs from the repo .env by @smaramwbc in https://github.com/smaramwbc/statewave/pull/250 * feat(llm): return token usage + model from /v1/llm/complete by @smaramwbc in https://github.com/smaramwbc/statewave/pull/251 …
    View on GitHub ↗

FAQ

Can I run it without paying for an LLM API?
Yes. It boots in demo mode with stub hash-based embeddings and the heuristic compiler, so ingest → compile → use works with no API key. A key only becomes necessary when you want real semantic search or LLM-backed memory extraction, and you pay the provider you choose per use.
Do I need a GPU or Kubernetes?
No GPU. The API process is CPU-only; GPUs only matter if you self-host an LLM compiler or embedding model. Deployment is possible via Docker Compose, Helm or bare metal, and multi-replica operation has been verified with Fly multi-machine and Helm HPA.
Why does a context bundle cost more tokens than a plain fact store?
Compiled bundles are deliberately denser, which is what buys the higher multi-hop accuracy in the project's benchmarks. If your queries are mostly single-hop and you are cost-sensitive, the README says a lighter fact store may be the right call.
What breaks at multi-replica scale?
Rate limiting defaults to the in-process memory strategy and is keyed only by IP, so multi-replica deployments must set STATEWAVE_RATE_LIMIT_STRATEGY=distributed. Per-tenant and per-API-key limits are not available yet. Load is ultimately bounded by Postgres and your embedding provider.
Can I use it commercially in a closed-source product?
Yes. The server and SDKs are Apache-2.0 with an explicit patent grant, so proprietary, hosted and commercial use carries no source-disclosure obligation. Enterprise procurement, SLA and indemnity questions go to [email protected].
Which port does Statewave Agent Memory Runtime use?
The install notes on this page use port 8100 (for example http://localhost:8100). If the project lets you change the port, its README explains how.
Does Statewave Agent Memory Runtime work on Windows?
Yes. The install notes on this page include a Windows command: irm https://www.statewave.ai/install.ps1 | iex.
Is Statewave Agent Memory Runtime open source?
Yes. The source code is on GitHub (smaramwbc/statewave) under the Apache-2.0 licence.
Is Statewave Agent Memory Runtime safe to use?
FollowAgents' FARS review (Nov 08, 2026) scored Statewave Agent Memory Runtime 17/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Statewave Agent Memory Runtime still maintained?
Development has slowed: the latest commit on GitHub is from 2026-10-24, within the last six months but not the last 30 days. The latest release is v1.5.0 (2026-08-30).
Who makes Statewave Agent Memory Runtime?
Statewave Agent Memory Runtime is published on GitHub by the account smaramwbc. FollowAgents has not verified which person or company is behind that account.
What is Statewave Agent Memory Runtime's official website?
The project's GitHub repository lists https://statewave.ai as its website. That link is set by the repository owner; the source code itself is on GitHub (smaramwbc/statewave).
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts