Purpose: OpenReflex provides AI coding agents with project-level "muscle memory" across coding, investigation, and reasoning work. Once installed, just use it normally; the model does not need to call it proactively.
Main capabilities: Lifecycle hooks record events such as prompts, tool start/end, compaction, and stop, storing them in the Experience Graph; successful work is compiled into project-scoped Reflexes (such as authentication changes, Helm configuration, database migrations, CI work); before a new task, it retrieves and injects compact context by semantic intent, task family, and module/file locality. During a task, it detects repeated failed commands, identical retries, stalled progress, context bloat, or being over budget, and gives a one-time suggestion to continue, pivot, or stop. After a task, it automatically closes execution based on work-pattern evidence.
Usage: Requires Python 3.11 or higher. For Claude Code, installing the plugin is recommended; after reloading, check status, then use /openreflex approve to explicitly enable local memory for the current project; /openreflex is a read-only compact status view, and other controls include status, reflexes, memory, doctor, why, trace, and revoke. For CLI or other agents, use a persistent package installation, and install per project with openreflex install <agent>. You can use OPENREFLEX_BUDGET to set a limit per task, such as calls=40,minutes=20,tokens=60000.
Applicable scenarios: Coding, investigation, and reasoning tasks in Claude Code, Codex, Cursor, and OpenCode, especially suited to scenarios that need to reuse project workflows and avoid repeated failure loops.
Limitations: Core memory is stored in a local SQLite database, with no account or hosted service; it stores only coarse-grained, project-relative metadata, not file contents, commands, tool output, or transcripts, and capture begins only after the project is approved. The normal path does not load MCP tools; diagnostics must be explicitly enabled. Data is located at ~/.openreflex/projects/<hash>/experience.sqlite3, can be moved with OPENREFLEX_HOME, capture can be globally disabled with OPENREFLEX_DISABLE=1, and project data can be deleted with openreflex forget --yes. The project uses the MIT license.