Temporal memory layer for LLMs, delivered as an MCP server.
Project description
rivermind
Rivermind is a temporal memory layer for LLMs. It runs as a local MCP server over SQLite, stores bi-temporal observations (facts, events, reflections), and gives any MCP client cross-session recall without custom retrieval code.
Install
git clone https://github.com/rivermind-ai/rivermind.git
cd rivermind
make install
source .venv/bin/activate
Quick start
rivermind init # creates ~/.rivermind/rivermind.db
rivermind serve # starts http://127.0.0.1:8080 (MCP at /mcp)
./scripts/smoke_claude.sh # verifies the server is reachable
To wire this into Claude Desktop (three minutes from clone to Claude remembering what you told it), see the Claude Desktop quickstart.
Narrative synthesis (optional)
Narratives require an LLM API key. Without one, serve and reeval still work: compaction and state rebuild run, synthesis is skipped with a warning.
Get a key from the provider of your choice:
- Anthropic: console.anthropic.com/settings/keys
- OpenAI: platform.openai.com/api-keys
Export it in your shell (default provider is Anthropic; set RIVERMIND_LLM_PROVIDER=openai if the key is an OpenAI one):
export RIVERMIND_API_KEY=sk-ant-... # or sk-... for OpenAI
export RIVERMIND_LLM_PROVIDER=anthropic # or "openai" (default: anthropic)
To persist it across terminal sessions, append those two lines to ~/.zshrc (or ~/.bashrc) and source the file. Verify with echo $RIVERMIND_API_KEY.
Commands
All subcommands accept a global --db PATH (default ~/.rivermind/rivermind.db). Run rivermind --help for the full tree, or rivermind <command> --help for per-command flags.
| Command | Purpose |
|---|---|
rivermind init |
Create the DB and apply migrations. |
rivermind serve [--host] [--port] [--no-reeval] |
Run the FastAPI + MCP server. |
rivermind timeline [--start] [--end] [--topic] [--limit] [--json] |
Print observations in a time window. |
rivermind state [--subject] [--attribute] [--rebuild] [--json] |
Print state rows, or rebuild the projection. |
rivermind reeval |
Run narrative synthesis + compaction + state rebuild for overdue weeks. |
rivermind export --out PATH [--format json|sqlite] |
Dump observations, state, and narratives. |
rivermind import --from PATH |
Load a prior rivermind JSON export. |
Development
make install
make dev # run the server against a local dev DB
make test # pytest
make lint # ruff check + ruff format --check + mypy
Documentation
- Claude Desktop quickstart — connect Claude to a local Rivermind server.
- Architecture — system structure, updated as the code is written.
License
MIT — see LICENSE.
Code of Conduct
This project follows the Contributor Covenant v2.1.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rivermind-0.1.0.tar.gz.
File metadata
- Download URL: rivermind-0.1.0.tar.gz
- Upload date:
- Size: 53.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7e1a51983425726fbb3b78197e05d1d5f4d76a946d9b0c465a5e457015e2bcb
|
|
| MD5 |
f9736d040fae1d5ddf4c8d835ef882a9
|
|
| BLAKE2b-256 |
12c00e4b84e0c8526f944b79165bdc231a6b838dd212add5533d39c9f1411abf
|
Provenance
The following attestation bundles were made for rivermind-0.1.0.tar.gz:
Publisher:
release.yml on rivermind-ai/rivermind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rivermind-0.1.0.tar.gz -
Subject digest:
d7e1a51983425726fbb3b78197e05d1d5f4d76a946d9b0c465a5e457015e2bcb - Sigstore transparency entry: 1340902546
- Sigstore integration time:
-
Permalink:
rivermind-ai/rivermind@4986e449dc1c1058e66048258347bed60b148a81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rivermind-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4986e449dc1c1058e66048258347bed60b148a81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rivermind-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rivermind-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae88e78c5fd0809d70bc2c0f356c7862ebcbe13677f93e4090d7c9e1e7e21e5
|
|
| MD5 |
e4da6e8df89ceddab9eb23b2249be906
|
|
| BLAKE2b-256 |
69f955908ae9f7bd88160eea5ff97a504057c00b1f498bdeb73c114832fd468b
|
Provenance
The following attestation bundles were made for rivermind-0.1.0-py3-none-any.whl:
Publisher:
release.yml on rivermind-ai/rivermind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rivermind-0.1.0-py3-none-any.whl -
Subject digest:
dae88e78c5fd0809d70bc2c0f356c7862ebcbe13677f93e4090d7c9e1e7e21e5 - Sigstore transparency entry: 1340902548
- Sigstore integration time:
-
Permalink:
rivermind-ai/rivermind@4986e449dc1c1058e66048258347bed60b148a81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rivermind-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4986e449dc1c1058e66048258347bed60b148a81 -
Trigger Event:
push
-
Statement type: