Skip to content

reflect

Long-term memory for coding agents. Correct a mistake once, never again.

How it works

One loop, running in the background of every session. Same engine and knowledge base across Claude Code, Codex CLI and GitHub Copilot.

Four steps: capture, drain, index, recall. Recall feeds the next session, which captures again.01captureStop, PreCompact, toolhooks queue transcriptsand log failures02drainA background writerturns queued transcriptsinto one note each03indexEmbeds notes, builds theBM25, vector and graphstores04recallOn SessionStart and eachprompt: hybrid search,rerank, then injectnext session starts with what the last one learnedFour steps: capture, drain, index, recall, looping back to the next session.01captureStop, PreCompact, toolhooks queue transcriptsand log failures02drainA background writerturns queued transcriptsinto one note each03indexEmbeds notes, builds theBM25, vector and graphstores04recallOn SessionStart and eachprompt: hybrid search,rerank, then injectthen the next session starts smarter

Install and first run

The engine is a Python package. Install it with uv, then create a knowledge base and search it.

Terminal window
uv tool install --upgrade --torch-backend cpu \
'git+https://github.com/stevengonsalvez/ainb-reflect-memory.git[graph]'
reflect --version
reflect init
reflect search "how did we fix the tokio panic"

Find your way around

Start with the overview, then pick the harness you use.