statewave
Open-source memory runtime for AI agents — reproducible, provenance-tagged context bundles instead of query-time retrieval. Apache-2.0, self-hosted on Postgres
What is statewave?
Open-source memory runtime for AI agents — reproducible, provenance-tagged context bundles instead of query-time retrieval. Apache-2.0, self-hosted on Postgres + pgvector, Python + TypeScript SDKs.
Overview of statewave
What it is
Statewave is an open-source memory runtime for AI agents. It provides reproducible, provenance-tagged context bundles instead of query-time retrieval. It is self-hosted on Postgres and pgvector, and is licensed under Apache-2.0. Statewave is not a chatbot framework, vector database, RAG pipeline, or hosted service; it is infrastructure that runs alongside your application.
Key features
- Compiled context bundles: ranked, token-bounded, deterministic per subject and task.
- Provenance: every memory traces back to its source episodes; receipts are content-hashed.
- Pluggable compilers: heuristic (regex, fully local) or LLM (any LiteLLM provider).
- Subject-organised:
user:,repo:,account:, or any entity prefix. - State-assembly receipts: immutable, ULID-addressable record of which memories influenced each bundle, with HMAC-SHA256 signature and policy snapshot.
- Sensitivity labels and policy engine: declarative YAML policies (
deny/redact) over per-memory tags, withlog_onlyandenforcemodes. - Multi-tenant: query-scoped data isolation via
X-Tenant-IDheader, per-tenant config and policies, and region pinning. - Self-hosted on Postgres + pgvector: no vendor lock-in.
Use cases
- Customer support agent: returning customer recognised across sessions, ranked context with token budget, provenance tracing, handoff pack on escalation.
- Long-running coding agent: multi-session project memory for tech stack, preferences, and architecture decisions.
- Stateless vs memory-powered agent: run a full loop with a real LLM side by side to compare.
- Framework integrations: drop-in integrations for LangChain, CrewAI, and AutoGen are available in the examples repo.
Getting started
Run the server with one line: bash # macOS / Linux npx @statewavedev/statewave # or curl -fsSL https://www.statewave.ai/install | sh powershell # Windows (PowerShell) irm https://www.statewave.ai/install.ps1 | iex Or self-host with Docker: bash git clone https://github.com/smaramwbc/statewave && cd statewave docker compose up -d The API is available at http://localhost:8100. For LLM-backed behaviour, add a .env file with STATEWAVE_EMBEDDING_PROVIDER=litellm and related keys, then re-run docker compose up -d.
License and pricing
Statewave is open-source under the Apache-2.0 license. Pricing is not stated; it is self-hosted and open source.
Based on the project's public README and repository metadata.