Statewave Documentation
June 25, 2026 ยท View on GitHub
Statewave is the open-source memory runtime for AI agents. It compiles raw events into ranked, token-bounded context bundles with full provenance โ so your AI stops forgetting across sessions. Self-hosted on Postgres, no vendor lock-in.
This repo contains the architecture docs, product specs, API contracts, and development coordination for the Statewave workspace.
This repo contains no production runtime code.
๐ Issues & feature requests: statewave/issues (centralized tracker)
Install
Fastest โ one line to a running server:
# macOS / Linux
npx @statewavedev/statewave
# or
curl -fsSL https://www.statewave.ai/install | sh
# Windows (PowerShell)
irm https://www.statewave.ai/install.ps1 | iex
Prefer to run it yourself? The Getting Started guide walks through the manual git clone + docker compose up -d path in about 5 minutes.
๐ฏ Try it
The interactive comparison demo is embedded directly in the website at statewave.ai โ open the chat widget to see two identical AI agents answer side by side, one stateless and one backed by Statewave.
Got a question about Statewave? Ask Statewave Support โ โ a docs-grounded agent that answers from this very docs corpus and cites the pages it used (read-only; built on the docs memory pack).
Contents
- Getting Started โ start here
- What is Statewave?
- Why Statewave? โ technical comparison for support-agent workflows
- Design partner onboarding โ 30-minute setup, evaluation checklist, success criteria, FAQ โ for teams adopting Statewave early
- Use Cases map โ categorized inventory of what you can build (support, coding, workspace, account, voice, agent infrastructure, connectors, frontier ideas)
- Connectors โ feed real-world events (GitHub, Markdown/ADRs, MCP, and more) into Statewave as normalized episodes
- Subject Design โ the architectural treatment of subjects (entity granularity, tenancy, modelling)
- Architecture Overview
- Repo Map
- API v1 Contract
- State-assembly receipts โ the immutable audit artifact emitted on each context assembly
- Sensitivity labels & policy โ per-memory capability tags + bundled rules consulted on every assembly call
- Deployment Guide
- Deployment Sizing Guide โ hardware profiles by tier, topology patterns, bottleneck guidance
- Capacity Planning & Tuning Checklist โ diagnostic flow when load grows, tuning order, when to move up a tier
- Default support docs memory pack โ the docs-only knowledge base shipped for out-of-the-box support agents
- Roadmap
- Development Conventions
- License โ Apache-2.0
Community
- Community guide โ where to post what, how to write good questions and RFCs, tone and moderation
- Discussion templates โ Q&A, feature request, RFC, show-and-tell, integration, research
- Pinned discussion drafts โ ready-to-copy posts (welcome, what-are-you-building, roadmap priorities, RFCs)
- Operator setup checklist โ for maintainers configuring categories, pins, and recurring review
GitHub Discussions live on the core repo: statewave/discussions.
ADRs
- ADR-001: PostgreSQL + pgvector as sole data store
- ADR-002: Heuristic compilation for v1
- ADR-003: v0.2 production hardening decisions
- ADR-004: v0.3 advanced features decisions
Ecosystem
| Project | Description |
|---|---|
| Server | Core server โ API, domain model, DB, compilation, search |
| Python SDK | pip install statewave โ sync + async client |
| TypeScript SDK | npm install @statewavedev/sdk โ fetch-based client |
| Connectors | @statewavedev/connectors-* โ GitHub, Markdown/docs, MCP server, modular packages |
| Docs | This repo โ architecture, specs, ADRs (no runtime code) |
| Examples | Runnable examples, evals, benchmarks |
| Website + demo | Marketing website + embedded comparison demo (statewave.ai) |
| Admin | Operator console โ system health, jobs, usage (read-only) |
Current status
v1.3.0 โ hybrid retrieval (pgvector + Postgres BM25, on by default with a hybrid=false opt-out) and compile-pipeline recall improvements (dedup/reconcile), plus provider-aware LLM key routing. The /v1/* API contract and governance surfaces (HMAC-signed receipts, receipt-driven replay, per-memory sensitivity labels + declarative YAML policy, opt-in detector-suggested labels, per-region data residency) remain stable, as do the v1.2 additions (dynamic settings endpoint for topology-agnostic hot-reload, a production-readiness probe, SSRF + DNS-rebinding protection on the webhook URL probe, LIKE metachar escaping in admin search, and six admin inspection endpoints). Both SDKs ship alongside: statewave (PyPI) v1.2.0 adds per-call timeout overrides and CancelledError propagation; @statewavedev/sdk (npm) v1.2.0 adds AbortSignal support on all HTTP methods. See roadmap and CHANGELOG.