Reflex is instant context routing for AI agents.
It watches the current conversation, decides which docs and skills are relevant, and injects only those. The result is simple: your agent is much more likely to read the right thing before it starts working.
Most teams already have the raw ingredients:
- markdown docs
read_whenhints- skills
- project rules
The real problem is not missing documentation. The problem is that the agent does not reliably reach for the right context at the right moment.
Reflex fixes that by turning your docs and skills into a live routing layer instead of a static pile of files.
On each user message, Reflex can:
- look at recent conversation context
- inspect the available docs and skills in your project
- use a cheap routing model to decide what matters now
- return a minimal list of docs to read and skills to use
- avoid re-injecting the same items again and again in one session
It is a small routing engine, not a full agent framework.
Reflex is most useful when:
- you already maintain docs or skills
- your agent often forgets to read them
- you want dynamic context injection instead of static always-on prompts
- you want to keep the system simple and framework-agnostic
curl -sL https://raw.githubusercontent.com/markmdev/reflex/master/install.sh | shgo install github.com/markmdev/reflex@latestSet an API key:
reflex config set api-key sk-your-openai-keyOr use an environment variable in your own config setup.
Show current config:
reflex config showDefault config lives at ~/.config/reflex/config.yaml and uses OpenAI-compatible APIs.
Example:
provider:
base_url: https://api.openai.com/v1
model: gpt-5.2
responses_api: trueReflex is a CLI first. Hooks and plugins call it, but you can test it directly.
echo '{
"messages": [{"type": "user", "text": "help me set up OAuth"}],
"registry": {
"docs": [{"path": "auth.md", "summary": "OAuth guide", "read_when": ["OAuth"]}],
"skills": []
},
"session": {"docs_read": [], "skills_used": []}
}' | reflex routeExample output:
{"docs":["auth.md"],"skills":[]}If nothing is relevant, Reflex returns empty arrays and gets out of the way.
Reflex discovers skills from SKILL.md frontmatter.
Example:
---
name: planning
description: "Create implementation plans. Use for new features, refactoring, architecture."
---Reflex discovers docs from markdown frontmatter.
Example:
---
summary: "OAuth implementation details and gotchas"
last_updated: "2026-03-06 19:55 PST"
read_when:
- authentication
- OAuth
- login
---That means you do not need a hand-maintained registry file. Reflex can build the routing view from the project itself.
Reflex ships as a framework-agnostic CLI and can also be wired into agent platforms.
Current repo integration:
- OpenClaw plugin: hooks/openclaw/README.md
reflex route— read stdin JSON and return{ docs, skills }reflex logs— inspect recent routing decisionsreflex config show— print active configreflex config set <key> <value>— update config valuesreflex config reset— reset global config
Show recent routing activity:
reflex logsReflex does one narrow thing well:
- it routes context based on the live conversation
- it does not require a manually curated registry
- it keeps injection minimal
- it stays cheap enough to run on every message
If you like docs-first agent setups but hate static prompt bloat, Reflex is the missing layer.