When you pair Ruflo with OpenAI Codex, the two systems split responsibility cleanly: Codex executes — it writes files, runs commands, creates code, and produces output. Ruflo orchestrates — it tracks state, stores memory, coordinates agents, and makes every subsequent task smarter by learning from what worked. Neither system does the other’s job. This division is the key insight fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ruvnet/ruflo/llms.txt
Use this file to discover all available pages before exploring further.
AGENTS.md, Ruflo’s native Codex configuration file:
| Component | Role | Examples |
|---|---|---|
| Codex | EXECUTES | Write files, run tests, create code, shell commands |
| Ruflo | ORCHESTRATES | Track agents, store memory, coordinate tasks |
Setup
Initialize Ruflo with the Codex flag
Running
init --codex creates AGENTS.md (the Codex equivalent of CLAUDE.md), places skills in .agents/skills/, and writes config.toml in the Codex config directory. The setup wizard auto-detects Codex if it is already installed.Configure MCP for Codex
When you run If it is not present, add it manually:You can also configure it directly in Test the MCP connection:
init --codex, the MCP server is automatically registered with Codex. Verify it is present:~/.codex/config.toml:Follow the recommended workflow
The self-learning workflow has four steps. Ruflo handles steps 1, 2, and 4. Codex handles step 3 — the actual work.
- Search memory for existing patterns before starting
- Init coordination record (instant, just tracking)
- YOU write the code — this is where work happens
- Store what worked so future tasks can reuse the pattern
The Correct Codex Workflow Pattern
The most important thing to understand: Ruflo commands return instantly. They create coordination records. They do not build, run, or execute anything. After any Ruflo call, Codex must immediately continue with its own execution.Full example with MCP tools
Vector Search Scoring
Ruflo’smemory_search uses HNSW semantic search with a 0–1 similarity score:
| Score Range | Meaning | Action |
|---|---|---|
| > 0.7 | Strong match | Use the stored pattern directly |
| 0.5–0.7 | Partial match | Adapt the pattern as needed |
| < 0.5 | Weak match | Create a new pattern from scratch |
MCP Tools for Codex
Once Ruflo is registered as an MCP server, Codex can call these tools directly: Learning & Memory (use these on every task):| Tool | Purpose | When |
|---|---|---|
memory_search | Semantic vector search | BEFORE every task |
memory_store | Save patterns with embeddings | AFTER success |
memory_retrieve | Get by exact key | When key is known |
neural_train | Train on patterns | Periodic improvement |
| Tool | Purpose |
|---|---|
swarm_init | Initialize a swarm topology (returns instantly) |
agent_spawn | Register an agent role (returns instantly) |
task_orchestrate | Coordinate multi-agent task records |
swarm_status | Check swarm state |
Pre-Built Collaboration Templates
The@claude-flow/codex dual-mode CLI ships three ready-made collaboration templates that combine Claude Code and Codex workers:
| Template | Pipeline | Platforms |
|---|---|---|
| feature | architect → coder → tester → reviewer | Claude + Codex |
| security | scanner → analyzer → fixer | Codex + Claude |
| refactor | analyzer → planner → refactorer → validator | Claude + Codex |
Dual-Mode Skills
The following skills are available for Codex when running in dual-mode (init --dual). Invoke them with the $ prefix:
| Skill | Purpose |
|---|---|
$dual-spawn | Spawn parallel Claude Code and Codex workers |
$dual-coordinate | Coordinate work across both platforms via shared memory |
$dual-collect | Collect and merge results from parallel workers |
$swarm-orchestration | Multi-agent swarm coordination |
$memory-management | Pattern storage and retrieval |
$github-automation | CI/CD and PR management |
Platform Comparison
| Feature | Claude Code | OpenAI Codex |
|---|---|---|
| Config file | CLAUDE.md | AGENTS.md |
| Skills directory | .claude/skills/ | .agents/skills/ |
| Skill syntax | /skill-name | $skill-name |
| Settings | settings.json | config.toml |
| MCP | Native | Via codex mcp add |
| Default model | claude-sonnet | gpt-5.3 |
--dual, so patterns learned in a Claude Code session are immediately available in Codex sessions and vice versa.
For the full Codex workflow specification, see AGENTS.md in the source repository.