rivermind
Open source · MIT licensed

Make your AIremember

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",
)

Models forget. Rivers don’t.

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.

Before · vector recall

Stale, conflicting, embarrassing.

User · Apr 2026I’m in New York now.AgentGot it, you’re in Chicago, CST. Scheduling for 3pm CT.UserThat’s wrong. I moved 6 months ago.AgentSorry, I have conflicting notes from 2024 and today.
After · Rivermind

Bi-temporal. Supersedes cleanly.

fact · superseded
user.123.timezone = "America/Chicago"
observed_at 2025-11-02recorded_at 2025-11-02
supersedes ↓
fact · current
user.123.timezone = "America/New_York"
observed_at 2026-04-21recorded_at 2026-04-21
› get_state("user.123", "timezone", as_of="2025-11-15")
→ "America/Chicago" (was current Nov 2, 2025 — superseded 2026-04-21)

Three primitives. One flow.

Record observations. Project them into derived state. Recall the slice you need — including any past slice. That’s the whole loop.

STEP · 01

Observe

Record a fact, event, or reflection with subject, attribute, value, observed_at, recorded_at.

$ rivermind observe --kind fact --subject user.123
✓ recorded timezone = "America/New_York"
STEP · 02

Project

Facts supersede prior facts in the same slot. Events and reflections accumulate. State and narratives are derived projections, rebuildable from the log.

fact → supersedesevent → appends
reflection → appends
state (derived)narrative (derived)
STEP · 03

Recall

Query current state, or any past state with as_of. Get the truth as it was on that date, not as it is now.

› get_state(subject="user.123",
  attribute="timezone", as_of="2025-11-15")
→ "America/Chicago"

Under the hood.

Append-only log. Two derived projections. Rebuildable from scratch.

MCP CLIENTSClaudeChatGPTGeminiDeepSeekPROCESSRivermind (one process)FastAPIMCP + RESTAPSchedulerweekly narrative cronSTORAGESQLite + FTS5observationsappend-only log · authoritativebi-temporalstate(subject, attribute) → valuederivednarrativesLLM summaries · versionedderivedprojections are rebuildable from observations
01

Bi-temporal by default.

Every observation carries observed_at (when it happened) and recorded_at (when Rivermind learned it). Time-travel queries fall out for free.

02

Three kinds, one supersedes.

Observations are fact, event, or reflection. Only facts supersede prior facts in the same slot; events and reflections accumulate.

03

The log is the source of truth.

state and narratives are derived. If a projection is wrong, drop it and rebuild from observations — no migration, no recovery dance.

04

One process, one database.

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

One engine. Two surfaces.

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.

LOCALFree, OSS (MIT) · ships today
CLOUDHosted · private beta
LOCAL

Bi-temporal storage

Every observation carries both observed_at and recorded_at. Reconstruct the model’s worldview from any past moment.

LOCAL

Supersession, not deletion

New facts version over old ones in the same slot. The full audit chain is preserved — nothing is destroyed.

LOCAL

MCP-native

Drop into Claude Desktop, Cursor, Zed, or any MCP client. No glue code. Rivermind is just another tool to the agent.

CLOUD

Hosted Postgres + pgvector

The same engine, managed. Postgres + pgvector under the hood; you keep the API.

CLOUD

Narratives compute

Weekly LLM-synthesized summaries per subject, with source pointers back to the underlying observations.

CLOUD

Workspaces & team access

Multi-tenant workspaces with role-based access. Bring your team along when you outgrow the local SQLite file.

Same SDK. Local or Cloud.

Pass kind · subject · attribute · value · observed_at and Rivermind handles the rest. Switch from local SQLite to hosted by passing an api_key.

Three observation kinds

Valid values for kind: "fact", "event", "reflection". Only fact supersedes. Events and reflections accumulate.

Time-travel queries

Pass as_of on any read of derived state. Get the value that was current on that date.

Zero-config local

No account, no API key required to run locally. SQLite + FTS5 in a single Python process. Cloud uses the same SDK.

SDKsPython · availableTypeScript · coming
Read the docs
~/atlas/agent.py
local · sqlitecloud · hosted
# 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"

Free locally. Hosted in Cloud.

Cloud is in private beta. Pricing finalizes at GA. No seat fees, no promises we can’t keep yet.

LOCAL
Free / forever

pip install rivermind. Runs in-process on SQLite. MIT licensed.

  • Unlimited memories on your machine
  • Bi-temporal storage + supersession
  • MCP server + REST API
  • Time-travel queries (as_of)
  • Community GitHub support
Install
CLOUD · SCALE
Custom

For teams with volume needs and roadmap requests.

  • Volume pricing
  • Dedicated support
  • Compliance roadmap input
  • Priority feature pipeline
Talk to us

Give your agent a sense of when.

Free and local with pip install rivermind. Cloud beta open for early access.

Join the Cloud beta