OpenReflex

v0.11.1
io.github.vishnu-77/openreflex Checked 3 days ago Published 20 hours ago

Optional diagnostics MCP server for OpenReflex's ambient project muscle memory.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_execution_context Get execution context

Plan a task from this project's past experience. Returns: plain text with the learned project Reflex procedure when one applies; otherwise a neutral working approach, relevant past experience, budget, likely files/sources and lessons. Internal strategy names and candidate scores are deliberately omitted from this normal surface; use get_candidate_paths for diagnostics. Use when: starting any substantial coding, investigation, research, analysis, review, planning or reasoning task and no [OpenReflex] block was injected. Not for: looking up history (use search_experience) or checking progress mi…

ParameterTypeDescription
task *stringThe task in one or two plain sentences, e.g. 'Fix the login redirect loop after logout'. Used to find similar past tasks; secrets are redacted before it is stored.
max_context_tokensOptional cap on tokens of tool output added to context; a positive integer. Default: no cap.
max_minutesOptional cap on active working time in minutes; a positive number. Default: no cap.
max_tool_callsOptional cap on tool calls for this task; a positive integer. Default: no cap.

check_progress Check progress

Estimate whether more work on the current task's path is still worth it. Returns: plain text starting with 'Recommendation: continue', 'pivot' or 'stop', then the success estimates for the current path and the best alternative, the marginal value of each option, the execution budget and how much of it is used, and any detected problems (failure loop, repeated calls, stalled progress, context growth, budget overrun). Use when: unsure mid-task whether to keep going. Follow 'pivot' by switching to the named strategy; follow 'stop' by summarizing what was tried and asking the user. Not for: planni…

explain_decision Explain decision

Explain OpenReflex's latest recommendation for the most recent task. Returns: plain text with the recommended strategy, the Reflex Score (0-100: how strong the recommendation is, not the chance of success), the estimated success probability, confidence, the signals behind the score, the next-best strategy with its route advantage, and the policy version. Use when: the user asks why OpenReflex suggested a path, pivot or stop. Not for: the same numbers as structured data (use get_reflex_score) or every decision in order (use get_execution_trace). Side effects: none; read-only. Errors: 'No decisi…

get_execution_trace Get execution trace

Return the decision timeline of the most recent task. Returns: plain text, one line per decision in order, with elapsed time, phase (start, runtime, complete), action, strategy, Reflex Score and the event that triggered it. Never includes prompts, commands or tool output. Use when: reviewing how a task unfolded. Not for: only the latest decision (use explain_decision). Side effects: none; read-only. Errors: 'No decision snapshots recorded yet' before any task was planned; a 'not enabled' message until the project is approved.

get_candidate_paths Get candidate paths

Show every candidate path OpenReflex considered for the most recent task side by side. Returns: plain text with each strategy's score, success probability, cost/risk numbers, and whether it was dominated; which path was recommended; and which one was actually followed - explicit (via choose_path), inferred from tool-call evidence, or not yet determined while the execution is still running. Use when: the user asks what other approaches were considered, or whether the agent followed the suggested path. Not for: a single recommendation's reasoning (use explain_decision) or the decision timeline (…

get_project_reflexes Get project Reflexes

Show the project Reflex and specialised procedures OpenReflex is learning from repeated work. Returns: the root Project Reflex after the first captured experience, plus specialised Reflexes with learning/learned/proven/stale maturity, support/verification counts and procedure steps. Use when: the user asks what OpenReflex has learned specifically about this project, which reusable procedures exist, or how a named Reflex works. Not for: backend routing internals or generic strategies (use get_candidate_paths for those diagnostics). Side effects: may refresh derived local Reflex data from alread…

get_reflex_score Get Reflex Score

Return the latest decision's Reflex Score and machine-readable components. Returns: structured fields for availability, Reflex Score (0-100 recommendation strength, not success probability), success probability, confidence, strategy, next-best strategy, route advantage, evidence, context cost, budget use, component signals and policy version. If no decision exists, available=false and reason explains why. Use when: a program or agent needs decision numbers it can inspect without parsing prose. Not for: a readable explanation (use explain_decision) or the full decision timeline (use get_executi…

choose_path Choose path

Declare the strategy you are following for the most recent task. Returns: one line, 'Recorded chosen path: <strategy>'. Use when: deliberately departing from the suggested path, so OpenReflex remembers what was actually done rather than confusing the recommendation with the observed work. Not for: tasks that follow the suggestion; the path is then inferred from tool activity. Side effects: writes the choice to the local Experience Graph; calling it again replaces the earlier choice. Touches no project files. Errors: 'No current execution' before any task was planned (call get_execution_context…

ParameterTypeDescription
strategy *stringThe strategy being followed: one of the suggested names 'inspect-first', 'test-first' or 'incremental', or a short kebab-case name for your own, e.g. 'spike-then-rewrite'.
stepsFor a custom strategy only: 2-4 short steps, e.g. ['Prototype the toml loader', 'Swap the callers']. Ignored for suggested strategies.

record_outcome Record outcome

Record your reported outcome of the most recent task and learn from it. Evidence: stored as agent_reported. A report never counts as verified on its own; a test, lint or build seen passing after the last edit does, and an agreeing report keeps that stronger evidence. Returns: the recorded status plus a plain-language Path check. A better path is only named when comparable completed tasks provide evidence; otherwise the result says that no better option is proven. Use when: the result is confirmed: tests/lint/build passed, research was cross-checked against relevant evidence, the user confirmed…

ParameterTypeDescription
evidence *stringShort proof of the result, e.g. 'pytest tests/test_auth.py passed' or 'user confirmed the fix'. Secrets are redacted.
status *string'success' when the result is confirmed (tests/builds passed, research was cross-checked, or the user confirmed it); 'failure' when the task failed or was abandoned.

search_experience Search experience

Search this project's past tasks by description similarity. Returns: structured 'experiences' (id, score, description, class, agent, strategy, status, tool_calls, minutes, files), best match first, plus structured 'lessons' (text, confidence, support). Both lists are empty when nothing is similar enough. Use when: the user asks what was learned or what worked before, or to find an experience id for explain_node or forget_experience. Not for: planning a new task (use get_execution_context). Side effects: none; read-only. Matching is lexical, on task descriptions only. Errors: invalid limit valu…

ParameterTypeDescription
query *stringWords describing the topic, e.g. 'expired token login bug'. Matched lexically against past task descriptions.
limitintegerMaximum number of past tasks to return. Default 5; allowed 1-20.

explain_node Explain graph node

Show one Experience Graph node with its direct relations. Returns: structured 'root', 'nodes' (Task, Execution, ToolCall, Outcome, Experience, Lesson, Context or CandidatePath and their stored fields) and typed 'edges' (used, caused, failed_with, resolved_by, recommended_for). Embeddings are omitted. Use when: tracing why a lesson or recommendation exists, after finding an id with search_experience or get_execution_context. Not for: searching by topic (use search_experience). Side effects: none; read-only. Errors: an MCP error reports 'Unknown graph node' for an id that does not exist, and an…

ParameterTypeDescription
node_id *stringId of an Experience Graph node: an experience id from search_experience (starts with 'exp-'), the execution id from get_execution_context, or any node id from an earlier explain_node result.

get_project_insights Get project insights

Summarize what OpenReflex has recorded and learned in this project. Returns: structured activation, engagement, experience reuse, outcomes, observational efficiency with and without prior experience, path-comparison trends, routing agreement, live alerts, execution-control metrics and lesson count. Efficiency comparisons are observational and are not presented as causal evidence. Use when: the user asks how OpenReflex is doing in this project or a program needs project-level metrics. Not for: individual past tasks (use search_experience). Side effects: none; read-only. Errors: an MCP error is…

approve_project Enable project

Enable OpenReflex capture for this project. Returns: one line confirming the project is enabled, or 'Not approved' when confirm is false. Use when: the user explicitly asks to enable OpenReflex here. Never call it on your own initiative; the user can also run `openreflex approve`, and `openreflex revoke` disables capture again. Not for: anything else; every other tool answers with a 'not enabled' message until this has happened. Side effects: writes the project's approval to the local OpenReflex home; enabling an already enabled project changes nothing. Touches no project files. Errors: none.

ParameterTypeDescription
confirmbooleantrue only when the user has explicitly asked to enable OpenReflex for this project; with false (the default) nothing changes.

forget_experience Forget experience

Delete one past task from this project's memory. Returns: one line listing what was removed (task, executions, tool calls, outcomes, experience, lessons), or 'Not forgotten' when confirm is false. Use when: the user explicitly asks to forget a specific past task, for example one that involved sensitive work or taught a wrong lesson. Never call it on your own initiative. Not for: deleting everything; the user runs `openreflex forget --yes` for that. Side effects: permanently removes that task's nodes from the local Experience Graph; other tasks are untouched. Touches no project files. Errors: '…

ParameterTypeDescription
experience_id *stringThe experience id to delete, as returned by search_experience; starts with 'exp-'.
confirmbooleantrue only when the user has explicitly asked to forget this task; with false (the default) nothing is deleted.