# Statewave

An open-source memory runtime for AI agents that compiles raw events into typed, provenance-tagged memories and assembles deterministic, token-bounded context bundles instead of retrieving them fresh at query time.

Statewave is an open-source memory runtime for AI agents, giving them durable, structured memory instead of starting each conversation from scratch. It is infrastructure run alongside an application, not a chatbot framework, a vector database, a RAG pipeline or a hosted service.

It follows a four-step lifecycle organized around subjects such as a user, account, agent or repository: raw events are ingested append-only, compiled once per subject change into typed, summarized memories with confidence scores and provenance, assembled into ranked, token-bounded context bundles on demand, and governed by inspecting a subject's timeline, tracing a memory to its source, or deleting it. The same query against the same subject at the same point in time always returns the same bytes, and recompiling or reassembling produces no duplicates.

It self-hosts on Postgres with pgvector and provides Python and TypeScript SDKs.

Website: https://statewave.ai
