Skip to main content

Temporal memory layer for LLMs, delivered as an MCP server.

Project description

rivermind

CI

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:

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

License

MIT — see LICENSE.

Code of Conduct

This project follows the Contributor Covenant v2.1.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rivermind-0.1.0.tar.gz (53.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rivermind-0.1.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

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

Hashes for rivermind-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7e1a51983425726fbb3b78197e05d1d5f4d76a946d9b0c465a5e457015e2bcb
MD5 f9736d040fae1d5ddf4c8d835ef882a9
BLAKE2b-256 12c00e4b84e0c8526f944b79165bdc231a6b838dd212add5533d39c9f1411abf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rivermind-0.1.0.tar.gz:

Publisher: release.yml on rivermind-ai/rivermind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rivermind-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dae88e78c5fd0809d70bc2c0f356c7862ebcbe13677f93e4090d7c9e1e7e21e5
MD5 e4da6e8df89ceddab9eb23b2249be906
BLAKE2b-256 69f955908ae9f7bd88160eea5ff97a504057c00b1f498bdeb73c114832fd468b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rivermind-0.1.0-py3-none-any.whl:

Publisher: release.yml on rivermind-ai/rivermind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page