Bi-temporal facts, supersession, and time-travel queries for AI agents. Run it locally, or use Rivermind Cloud.
# pip install rivermind from rivermind import Rivermind rm = Rivermind() # zero-config, SQLite at ./rivermind.db rm.record_observation( kind="fact", subject="user.123", attribute="timezone", value="America/New_York", observed_at="2026-04-21T09:32:00Z", ) # Time-travel: what did we know on 2025-11-15? tz = rm.get_state( subject="user.123", attribute="timezone", as_of="2025-11-15", )
# pip install rivermind from rivermind import Rivermind import os rm = Rivermind(api_key=os.environ["RIVERMIND_API_KEY"]) rm.record_observation( kind="event", subject="user.123", attribute="login", value={"ip": "10.0.0.1"}, observed_at="2026-04-26T14:01:00Z", )
Vector stores remember what was said, not when it was true. Rivermind tracks both observed-at and recorded-at, so your agent stops contradicting itself.
Record observations. Project them into derived state. Recall the slice you need — including any past slice. That’s the whole loop.
Record a fact, event, or reflection with subject, attribute, value, observed_at, recorded_at.
Facts supersede prior facts in the same slot. Events and reflections accumulate. State and narratives are derived projections, rebuildable from the log.
Query current state, or any past state with as_of. Get the truth as it was on that date, not as it is now.
Append-only log. Two derived projections. Rebuildable from scratch.
Every observation carries observed_at (when it happened) and recorded_at (when Rivermind learned it). Time-travel queries fall out for free.
Observations are fact, event, or reflection. Only facts supersede prior facts in the same slot; events and reflections accumulate.
state and narratives are derived. If a projection is wrong, drop it and rebuild from observations — no migration, no recovery dance.
FastAPI + SQLite + FTS5 + APScheduler in a single Python process. Cloud swaps storage for Postgres + pgvector behind the same interfaces.
Read the full architecture: github.com/rivermind-ai/rivermind/blob/main/docs/ARCHITECTURE.md
The same temporal core ships locally as an MCP server and runs hosted in Rivermind Cloud. Start with what you can pip install; upgrade to Cloud when you need workspaces and narratives.
Every observation carries both observed_at and recorded_at. Reconstruct the model’s worldview from any past moment.
New facts version over old ones in the same slot. The full audit chain is preserved — nothing is destroyed.
Drop into Claude Desktop, Cursor, Zed, or any MCP client. No glue code. Rivermind is just another tool to the agent.
The same engine, managed. Postgres + pgvector under the hood; you keep the API.
Weekly LLM-synthesized summaries per subject, with source pointers back to the underlying observations.
Multi-tenant workspaces with role-based access. Bring your team along when you outgrow the local SQLite file.
Pass kind · subject · attribute · value · observed_at and Rivermind handles the rest. Switch from local SQLite to hosted by passing an api_key.
Valid values for kind: "fact", "event", "reflection". Only fact supersedes. Events and reflections accumulate.
Pass as_of on any read of derived state. Get the value that was current on that date.
No account, no API key required to run locally. SQLite + FTS5 in a single Python process. Cloud uses the same SDK.
# Local · zero-config, SQLite at ./rivermind.db from rivermind import Rivermind rm = Rivermind() # no key, no config rm.record_observation( kind="fact", subject="user.123", attribute="timezone", value="America/New_York", observed_at="2026-04-21T09:32:00Z", ) # Time-travel: what did we know on 2025-11-15? tz = rm.get_state( subject="user.123", attribute="timezone", as_of="2025-11-15", ) # › "America/Chicago"
# Cloud · hosted Postgres + pgvector from rivermind import Rivermind import os rm = Rivermind( api_key=os.environ["RIVERMIND_API_KEY"], ) rm.record_observation( kind="event", subject="user.123", attribute="login", value={"ip": "10.0.0.1"}, observed_at="2026-04-26T14:01:00Z", ) # events accumulate; only kind="fact" supersedes
Cloud is in private beta. Pricing finalizes at GA. No seat fees, no promises we can’t keep yet.
pip install rivermind. Runs in-process on SQLite. MIT licensed.
Hosted Postgres + pgvector. Workspaces, narratives compute, email support.
For teams with volume needs and roadmap requests.
Free and local with pip install rivermind. Cloud beta open for early access.