Skip to main content

Shared memory & research journal for your AI agents — memory + journal + cockpit + runnable-markdown (mdlab) for Claude, Codex, and Gemini.

Project description

🔭 PriorStates

Shared memory & a research journal for your AI agents

License: Apache-2.0 Python 3.10+ MCP-native 100% local Stars

Coding agents are amnesiacs — every session starts cold, re-deriving what you already taught them and re-running experiments a past session already concluded. PriorStates gives Claude, Codex & Gemini one local memory and a searchable research journal, so what one session learns, the next one remembers.

Runs entirely on your machine · CPU-only · no API keys · no cloud calls.

🌐 priorstates.com · 🎬 80-second demo · 📖 Docs

PriorStates in action: save a memory, then recall it by meaning in a brand-new agent session

Install — in one sentence

Already using Claude, Codex, or Gemini? Hand it one line:

Install PriorStates: fetch https://priorstates.com/install.md and follow it.

The agent reads AGENT_INSTALL.md, installs the package, wires itself over MCP, and verifies with priorstates doctor — then restart it to load the new tools.

Prefer to do it yourself? Pick your platform:

🐧 Linux (Debian / Ubuntu) — the .deb (recommended)

Apt pulls in python3 + numpy, and you get the desktop app, an icon, the priorstates CLI and man pages — nothing else to install:

curl -fSLO https://priorstates.com/download/priorstates_0.1.14_all.deb
sudo apt install -y ./priorstates_0.1.14_all.deb   # resolves python3 (>= 3.10) + python3-numpy

Then just open “PriorStates” from your application menu (or run priorstates-gui). The desktop control panel does the rest — initialize your memory, wire Claude / Codex / Gemini over MCP, and launch the cockpit, all with a click. No further commands needed. (For agent integration it needs the MCP support package once — PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install --user mcp; the app flags it if it's missing.)

sudo apt remove priorstates uninstalls. Re-running the same apt install upgrades in place.

RHEL / Rocky / Alma / Fedora — same experience via the .rpm (one noarch package for all of them; on EL9 it pulls python3.12 automatically):

curl -fSLO https://priorstates.com/download/priorstates-0.1.14-1.noarch.rpm
sudo dnf install ./priorstates-0.1.14-1.noarch.rpm
🪟 Windows — the one-click installer (easiest of all)

Download and run PriorStates-Setup.exe — it auto-installs Python if you don't have it, then installs PriorStates and adds Start Menu + Desktop shortcuts. Nothing else required.

The Windows installer uses free code signing provided by SignPath.io, with a certificate by the SignPath Foundation.

🍎 macOS / any OS with Python 3.10+ — pip
PIP_BREAK_SYSTEM_PACKAGES=1 pip install --user --no-cache-dir "priorstates @ git+https://github.com/priorstates-dev/priorstates.git"
priorstates init            # create ~/.priorstates + per-project .priorstates/
priorstates agents install  # wire Claude / Codex / Gemini over MCP
priorstates cockpit         # open the web cockpit → http://127.0.0.1:7700

macOS also has a native .pkg / Homebrew formula — see docs/QUICKSTART.md.

Full install matrix (.deb / macOS .pkg / Windows / source) is in docs/QUICKSTART.md. No model download is required — a built-in CPU hashing embedder works out of the box.

What's inside

Subsystem What it does
🧠 memory A local semantic store. Save a fact once — any future session recalls it by meaning. Pinned facts are injected into every session.
📓 journal An append-only research log. Every winner, loser, bug & decision becomes a searchable entry, so no experiment is run twice.
🛰️ cockpit A pure-Python (stdlib-only) local web app that maps your memory, journal & docs — search, group, dashboards. Embedded terminal (on by default for a local cockpit; --no-terminal to disable) to run your agent CLIs right in the browser. No Node.js, no npm, no build step.
📝 mdlab Runnable Markdown: interleave prose, code & results in one file and splice output back in.

All of it is wired into your agents over the open MCP protocol by priorstates agents install — so they recall before acting and record durable conclusions back, automatically.

MCP server

priorstates agents install registers the server into Claude / Codex / Gemini for you; to run it directly over stdio: priorstates mcp. It exposes 10 tools:

  • memorymemory_add · memory_search · memory_get · memory_list_pinned · memory_pin · memory_delete
  • journaljournal_add · journal_search · journal_regen
  • mdlabmdlab_run

See it in action

The cockpit maps your whole research surface; the CLI captures and recalls from your terminal.

The PriorStates cockpit — search and manage memory, journal and docs in one local web view PriorStates CLI — capture a memory in plain English, list pinned memories, search the journal by outcome

Agent-neutral

One memory store and one journal, surfaced to Claude Code · Claude Desktop · Codex · Gemini · Antigravity through MCP and a pinned context block — no lock-in, no rewrites. Switch agents without losing a thing. The VS Code / JetBrains extensions for Claude Code and Codex share their CLI's MCP config, so they're covered automatically; Claude Desktop (its own app) is wired into claude_desktop_config.json too. Every client on the machine reads the same local store, so a memory saved in one is instantly recalled in all the others.

Private by default

Everything lives under ~/.priorstates/ and per-project .priorstates/. The default embedder is CPU-only and offline — no API keys, no telemetry, no cloud calls. Upgrade to semantic recall with a single optional ~127 MB model download whenever you want.

Removing it removes what it added. Uninstalling (Windows uninstaller, or the .pkg/tarball install.sh --uninstall) runs priorstates agents uninstall for you — taking the MCP server entry and the pinned instruction block back out of every agent it wired. Your memory under ~/.priorstates/ is left untouched. You can unwire (or re-wire) any time with priorstates agents uninstall / priorstates agents install. (For the system .deb/.rpm, run priorstates agents uninstall as your user before apt/dnf remove, since package removal runs as root and can't reach your per-user agent config.)

Share a pack

Export your memory + journal as a portable bundle and hand it to a teammate (or host it anywhere — any file or URL works):

priorstates pack export --name my-project        # → my-project.pspack
priorstates pack import ./my-project.pspack # on the other machine (or a URL)

Imported memory surfaces through the same MCP tools — no extra wiring. Imports are checksum-verified, shown for confirmation before ingest, and tagged with their source (and never auto-pinned). The cockpit has Export / Import buttons too (Import needs the cockpit started with --allow-write).

New here? Load a ready-made sample to see PriorStates populated instantly:

priorstates pack import --demo

Docs

Status

v0.1 — working end-to-end: memory, journal, mdlab, MCP server (10 tools), agent wiring (Claude / Codex / Gemini / Antigravity), the web cockpit, and the desktop launcher are all built and tested. Optional semantic model downloads on demand; the hashing fallback needs zero setup. A background embedder daemon and an autonomous priorstates research runner are next.

Issues and PRs welcome.

Get in touch

Questions, ideas, or feedback — service@priorstates.com. Bug reports and feature requests are welcome as GitHub issues.

License

Apache-2.0 (permissive + patent grant). See LICENSE and NOTICE. Copyright 2026 Zhendong Qin.

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

priorstates-0.1.17.tar.gz (574.6 kB view details)

Uploaded Source

Built Distribution

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

priorstates-0.1.17-py3-none-any.whl (592.6 kB view details)

Uploaded Python 3

File details

Details for the file priorstates-0.1.17.tar.gz.

File metadata

  • Download URL: priorstates-0.1.17.tar.gz
  • Upload date:
  • Size: 574.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for priorstates-0.1.17.tar.gz
Algorithm Hash digest
SHA256 b534a2e5d99ace46c1dbf56b009361b785f5e78a6286ae776455254b500910fe
MD5 ee4712173d0aa05852374454599d64c8
BLAKE2b-256 b5bb6c139b045735aa3e571082a70360b0e472144ba3a355713d696d9236965e

See more details on using hashes here.

File details

Details for the file priorstates-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: priorstates-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 592.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for priorstates-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 16a65e33cad826dfcf1a624a8d9eee7e7f195b4a42be180c09056e432928ad31
MD5 9c45388a6503b884f4468086f22180f3
BLAKE2b-256 853a6e86f5b0da51e2fbf76685c85603e5859415043909241e0cb316cf74fdcc

See more details on using hashes here.

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