Website · Docs · Walkthrough · PyPI · Issues · Buy me a coffee
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
***
What is OpenReflex
OpenReflex gives AI coding agents ambient project muscle memory across coding, investigation, and reasoning work.
Lifecycle hooks quietly record how work actually goes, compile repeated project behaviour into reusable Reflexes,
and inject only the relevant project procedure into new tasks. The model does not need to remember to call OpenReflex,
and MCP diagnostics are opt-in rather than loaded into normal agent context.
You install it once and keep working normally. Core memory stays on your machine in a local SQLite database.
There is no OpenReflex account or hosted service. Optional Claude token accounting uses Claude Code's local
OpenTelemetry export to a loopback-only OpenReflex receiver and stores counts only.
A recorded Claude Code session. OpenReflex injects compact relevant context before work; lifecycle hooks capture tools and verification and close the execution automatically. MCP is not required for the normal path. The step-by-step walkthrough is in docs/walkthrough.md .
Why OpenReflex
- **It learns how the project behaves.** OpenReflex compiles successful work into project-scoped Reflexes such as
authentication changes, Helm configuration, database migrations or CI work. Resolution combines semantic intent,
task family and module/file locality, so a novel task can reuse a project procedure without repeating an
earlier task.
- **It catches loops while they happen.** Repeated failing commands, identical retries, stalled progress, and
runaway context growth raise one alert that says whether to continue, pivot to another approach, or stop and
check in with you, never a stream of nags.
- **It learns after every task.** Build work closes against tests/lint/build evidence; investigations can close
against cross-checked sources; reasoning-only work can complete without external tools. A simple **Path check**
only names a better option when comparable past tasks actually support one.
- **It is private by design.** Only coarse, project-relative metadata is stored. File contents, commands, tool
output, and transcripts never are, and capture is off until you approve a project.
Quick start
Requires Python 3.11 or newer.
**Claude Code — recommended:** install the plugin, reload it, inspect the current state, then explicitly enable
project memory.
Claude may display the canonical plugin namespace as /openreflex:openreflex; both refer to the same user-invoked
OpenReflex control surface when the bare alias is available. The no-argument command is read-only and compact.
approve explicitly enables local memory for the current project. The plugin prepares an exact-version runtime
under ~/.openreflex/runtime/ and normal agent work remains ambient after approval.
The Claude plugin does **not** execute a global openreflex from PATH. An older pipx/uv/pip installation can coexist
without taking over the plugin runtime.
**CLI / other agents:** use a persistent package install.
After a few tasks:
Package updates preserve local memory and project configuration. Managed pipx and uv tool installs can use
openreflex update, openreflex update --reinstall, or openreflex self reinstall. The Claude plugin manages
its own pinned runtime automatically; these package-manager commands are only needed for standalone CLI installs.
Use it with your agent
OpenReflex installs per project with openreflex install , or as a plugin.
| Agent | Connects through | Install | Verified |
|---|---|---|---|
| **Claude Code** | Plugin hooks, or project hooks | claude plugin marketplace add vishnu-77/openreflex then claude plugin install openreflex@openreflex, or openreflex install claude-code | Live sessions |
| **Codex** | Plugin hooks, or project hooks | codex plugin marketplace add vishnu-77/openreflex, or openreflex install codex, then trust the hooks once in /hooks | Live sessions |