← Back to directory
W

witness

Community
Local memory & self-improvement engine that witnesses your growth as a developer.
GitHub source repository ↗
★ 8 Stars Category · Dev Tools Popular Source revision 6fe528d62e2b
62FMRS · C

witness is a local-first MCP server acting as a growth memory engine for Claude Code and OpenCode. It captures sessions and distills observations and facets into a provenance-backed profile. Noted for its reflection-not-clone design, multilingual support, and pure-Go implementation, it fits developers wanting to track their evolution with privacy.

Reliability
10/20
Security and permissions
14/20
Maintenance
10/20
Documentation
16/20
Setup experience
12/20
Read the FMRS scoring method →

witness is a local-first memory and self-improvement engine for Claude Code and OpenCode. It captures your coding sessions and distills how your patterns, habits, and knowledge evolve over time — a person-centric growth archive with provenance, served via an MCP server and plain files as a single Go binary. Data stays local, supports English and Chinese multilingual embeddings, and defaults to your existing Claude Code or OpenCode auth for distillation, requiring no external services.

Tools

search_observations
Local vector semantic search over observations.
get_facets
Get current structured facets.
get_profile
Get the narrative profile (prose), optionally per lens.
record_observation
Agent records a decision-aware observation directly.
delete_observation
Delete an incorrect observation.

Setup

For Claude Code, run ./install.sh claude to build, download the ~448MB model, and wire hooks and MCP. For OpenCode, run ./install.sh opencode to wire the local plugin and MCP, or use the npm package @witness-ai/opencode and add the plugin to opencode.json. Windows users can download a zip from releases and run witness.exe wire claude.

Fit and risk

Best for

  • Developers who want to preserve learnings across AI coding sessions.
  • Those seeking a second brain / AI memory that their agent can query for thinking patterns.
  • Privacy-conscious users who require all data stay local.
  • People who want to track their growth as a developer over time.

Not for

  • Those needing project-level memory or codebase history (it focuses on the person, not the code).
  • Those needing cloud sync or multi-user collaboration (it's local-first).
  • Users unfamiliar with CLI or unwilling to run a local model download.
  • Proactive coaching expecting in-session suggestions or nudges (it's a tool, not a coach).

Required permissions

  • Reads user prompts and assistant messages captured by Claude Code hooks.
  • Reads OpenCode's local SQLite session database.
  • Accesses local file system for storing data (default `~/.local/share/witness/`).
  • Invokes `claude -p` or a private `opencode serve` runner for distillation.

Risks and side effects

  • Data is all local but requires regular backups; don't sync live data directory directly.
  • May require significant disk space as the model ~470MB and raw transcripts accumulate.
  • Uses LLM distillation which can incur compute and cost depending on runner configuration.
  • Ensure to use `witness export` for consistent snapshots for backup to avoid corruption.

Troubleshooting

  1. Run `witness doctor` to check embedder, model, and archive health.
  2. Check `witness distill status` to ensure the background distillation worker is running.
  3. For OpenCode integration issues, confirm the plugin is properly registered.
  4. Verify model names in `config.toml` are valid.

Use cases

Retain learnings across AI coding sessions.
Track your thinking patterns, work habits, and cognitive traps while coding.
Ingest your own notes, articles, or text streams to see knowledge evolve.
Generate re-readable growth narratives for personal retrospectives.

Supported clients

Claude DesktopFull support
OpenCodeFull support