SuperAPIAI Directory

roampal-core

github.com · AI coding

Outcome-based persistent memory for Claude Code and OpenCode: memories that help get promoted, misleading ones get demoted.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

Roampal Core is a persistent memory MCP server for AI programming assistants, focused on "outcome-based" memory management: suggestions that help improve programming efficiency are promoted, while misleading suggestions are demoted. It is compatible with Claude Code and OpenCode.

Purpose

  • Provides automated long-term memory for Claude Code and OpenCode, letting assistants remember the user's history, preferences, and previously effective practices.
  • Dynamically ranks and eliminates memories through an outcome scoring mechanism, reducing the repeated use of incorrect or outdated suggestions.

Main Capabilities

  • Automatic context injection: When the user enters a message, Roampal automatically injects relevant background before the AI sees the message, with no need for manual invocation or workflow changes.
  • Outcome scoring loop: Claude Code uses hooks to prompt the main model to call the score_memories tool for scoring each round; OpenCode uses an independent sidecar to score silently in the background and does not register the score_memories tool in OpenCode. Scoring is disabled by default and must be explicitly configured via roampal sidecar setup; you can choose a local model (Ollama, LM Studio, etc.) or choose a free Zen model (explicit selection required; data may be logged via the OpenCode proxy).
  • Five memory collections and named memory profiles (v0.5.1): You can run independent memory stores for different projects, different clients (Claude Code and OpenCode), or scenarios such as work and home, all managed through the CLI with no need to manually edit configuration files.
  • Directory binding (v0.6.0): Use roampal profile bind <name> to pin the current directory and its subdirectories to a profile, with bindings closer to the current working directory taking priority. Profile priority is, in order, the --profile argument, the ROAMPAL_PROFILE environment variable, directory binding, the persistent default from roampal profile use, and the "default" fallback.
  • Memory tools: The AI can use a set of memory tools (the original text does not list the specific names one by one).
  • Self-healing: If the HTTP server stops responding, it automatically restarts and retries.

Usage

  • Installation: pip install roampal.
  • Initialization: roampal init automaticallydetects installed tools; you can also specify a target: roampal init --claude-code or roampal init --opencode.
  • After restarting the editor, you can start chatting and using it.
  • Scoring model configuration: Choose during roampal init, or configure via roampal sidecar setup.
  • Service management: roampal start starts it manually, roampal start --profile X starts with a specified profile; roampal profile switch switches profiles without terminating the running server; roampal profile bind <name> / unbind binds or unbinds a directory. The shared server automatically exits after 30 minutes of idle time; servers started in the foreground are not subject to this restriction.
  • Health check: curl http://127.0.0.1:27182/api/health。

Use cases

  • Claude Code and OpenCode users want the assistant to remember project context, personal preferences, and effective practices across sessions.
  • Developers who need memory isolated per project, per client, or need separate memory for work and personal scenarios.
  • Developers without a GPU: Roampal itself runs on CPU, and the benchmark pipeline can run on a single GPU without relying on the cloud.

Limitations and requirements

  • Python 3.10+ (3.13 supported; 3.11+ has full -P startup protection). Note that Python 3.10 will reach end of support in October 2026.
  • Requires either Claude Code or OpenCode to be installed.
  • Platforms: Windows, macOS, Linux (macOS and Python 3.13 have been included in CI testing since v0.6.0; the primary development environment is Windows).
  • Memory: approximately 500MB of available memory required (cross-encoder reranker + embeddings + ChromaDB).
  • Disk: approximately 500MB for models (multilingual embeddings and reranker, automatically downloaded on first use).
  • CPU: a modern x86-64 processor with AVX2 support (Intel Haswell 2013+ or AMD Excavator 2015+).
  • GPU: not required; all inference runs on CPU via ONNX Runtime.
  • Scoring is off by default and is only enabled after explicit user configuration; Zen free models require explicit selection, and data may be logged through the OpenCode proxy.
  • Benchmark results (85.8%, based on the corrected LoCoMo, covering 1,986 questions, 10 conversations, dual scoring) and the related paper and evaluation scripts can be found in the project lab materials.

Version highlights

  • v0.6.0: server lifecycle improvements, per-directory profile binding, deduplication safety net, CLI split into a package structure, privacy fix (the OpenCode plugin only sends data to Zen after explicit selection).
  • v0.5.9: memory usage optimization, process usage reduced from about 2,355MB to about 484MB, embedder and reranker upgraded to INT8 exports.
  • v0.5.8: crash recovery, enabled SQLite WAL + FULL durability.
  • v0.5.7: startup garbage collection, statefile expiration cleanup.
  • v0.5.4: profile binding changed to per-request granularity.

The project is completely free and open source. You can support development at roampal.gumroad.com; feature suggestions and feedback are via Discord, bug reports via GitHub Issues, and the contact email is roampal@protonmail.com.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools