agentic-flow
Ships with agentic-flow: Production-ready AI agent orchestration with 66 self-learning agents, 213 MCP tools, and autonomous multi-agent swarms.
Claude Code
> /plugin marketplace add ruvnet/agentic-flow> /plugin install agentic-flow@agentic-flow
Codex
$ codex mcp add agentic-flow --env AGENTIC_FLOW_MCP_PROFILE=YOUR_VALUE --env PROVIDER=YOUR_VALUE --env COMPLETION_MODEL=YOUR_VALUE --env OPENROUTER_API_KEY=YOUR_VALUE --env GOOGLE_GEMINI_API_KEY=YOUR_VALUE --env AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS=YOUR_VALUE -- npx -y agentic-flow@3.4.0 mcp start
Cursor
{ "mcpServers": { "agentic-flow": { "command": "npx", "args": [ "-y", "agentic-flow@3.4.0", "mcp", "start" ], "env": { "AGENTIC_FLOW_MCP_PROFILE": "YOUR_VALUE", "PROVIDER": "YOUR_VALUE", "COMPLETION_MODEL": "YOUR_VALUE", "OPENROUTER_API_KEY": "YOUR_VALUE", "GOOGLE_GEMINI_API_KEY": "YOUR_VALUE", "AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS": "YOUR_VALUE" } } } }
Add it to mcp.json.
Gemini CLI
{ "mcpServers": { "agentic-flow": { "command": "npx", "args": [ "-y", "agentic-flow@3.4.0", "mcp", "start" ], "env": { "AGENTIC_FLOW_MCP_PROFILE": "YOUR_VALUE", "PROVIDER": "YOUR_VALUE", "COMPLETION_MODEL": "YOUR_VALUE", "OPENROUTER_API_KEY": "YOUR_VALUE", "GOOGLE_GEMINI_API_KEY": "YOUR_VALUE", "AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS": "YOUR_VALUE" } } } }
Add it to settings.json.
GitHub Copilot
$ copilot mcp add agentic-flow --env AGENTIC_FLOW_MCP_PROFILE=YOUR_VALUE --env PROVIDER=YOUR_VALUE --env COMPLETION_MODEL=YOUR_VALUE --env OPENROUTER_API_KEY=YOUR_VALUE --env GOOGLE_GEMINI_API_KEY=YOUR_VALUE --env AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS=YOUR_VALUE -- npx -y agentic-flow@3.4.0 mcp start
OpenCode
{ "mcp": { "agentic-flow": { "type": "local", "command": [ "npx", "-y", "agentic-flow@3.4.0", "mcp", "start" ], "environment": { "AGENTIC_FLOW_MCP_PROFILE": "YOUR_VALUE", "PROVIDER": "YOUR_VALUE", "COMPLETION_MODEL": "YOUR_VALUE", "OPENROUTER_API_KEY": "YOUR_VALUE", "GOOGLE_GEMINI_API_KEY": "YOUR_VALUE", "AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS": "YOUR_VALUE" } } } }
Add it to opencode.json.
Windsurf
{ "mcpServers": { "agentic-flow": { "command": "npx", "args": [ "-y", "agentic-flow@3.4.0", "mcp", "start" ], "env": { "AGENTIC_FLOW_MCP_PROFILE": "YOUR_VALUE", "PROVIDER": "YOUR_VALUE", "COMPLETION_MODEL": "YOUR_VALUE", "OPENROUTER_API_KEY": "YOUR_VALUE", "GOOGLE_GEMINI_API_KEY": "YOUR_VALUE", "AGENTIC_FLOW_ALLOW_BYPASS_PERMISSIONS": "YOUR_VALUE" } } } }
Add it to mcp_config.json.
From the README
What can you do with agentic-flow?
Sub-millisecond pattern learning and retrieval
300x faster than traditional approaches (150ms β 0.5ms)
Real-time adaptation during task execution
No performance degradation
Rank-2 Micro-LoRA
2211 ops/sec
Rank-16 Base-LoRA
+55% quality improvement
10-100x faster training than full fine-tuning
Minimal memory footprint (5MB for edge devices)
Security report
Low risk
Known flaws
None known
Signed build
No
No build provenance published
Maintained
Nov 10, 2026
Last push
Licence
Not published
Runs as
npx
On your machine
Deprecated
No
Signals from public registries, not an audit. Checked Nov 11, 2026.
agentic-flow README
π Agentic-Flow v2 β the Agentic Meta-Harness
Freeze the model, evolve the harness. Agentic-Flow is an open agentic meta-harness: a runtime whose product is the harness around a model, not the model. It routes each query to the cost-optimal model, evolves its own harness and autonomously repairs code, then orchestrates 66 self-learning agents, 213 MCP tools, and multi-agent swarms on top.
The four pillars of the meta-harness
| Pillar | What it does | Powered by |
|---|---|---|
| π§ Route | Send each query to the cheapest model predicted to clear a quality bar, learned from eval logs | @metaharness/router (ADR-073) |
| 𧬠Evolve | Improve the harness itself (planner/context/reviewer/retry/tool/memory/score) and autonomously repair code β same model, better results | @metaharness/darwin (ADR-074) |
| π€ Orchestrate | Run 66 agents, 213 MCP tools, ReasoningBank memory, and multi-agent swarms | Claude Agent SDK + AgentDB |
| π Verify | Frozen scorer + safety gate on every harness change; signed harness provenance | Darwin safety gate (ADR-075) |
Why a meta-harness? The measured lever in modern agentic systems is the harness, not a bigger model: a cheap model in a well-built, self-improving harness matches a frontier model at a fraction of the cost (see the DRACO/Darwin findings). Agentic-Flow is the open runtime that operates that harness.
β‘ Quick Start (60 seconds)
# 1. Initialize your project
npx agentic-flow init
# 2. Bootstrap intelligence from your codebase
npx agentic-flow hooks pretrain
# 3. Start Claude Code with self-learning hooks
claude
Step 1 in an empty directory prints (agentic-flow 3.5.3, abridged):
β
Created CLAUDE.md
π Created structure:
.claude/
βββ settings.json # Claude Code settings (hooks, agents, skills, statusline)
βββ statusline.sh # Custom statusline (model, tokens, cost, swarm status)
βββ agents/ # 80+ agent definitions (coder, tester, reviewer, etc.)
βββ commands/ # 100+ slash commands (swarm, github, sparc, etc.)
βββ skills/ # Custom skills and workflows
βββ helpers/ # Helper utilities
CLAUDE.md # Project instructions
.agents/skills/ # Codex skills (same integrations guidance)
π Next steps:
1. Start the MCP server:
npx agentic-flow@3.5.3 mcp start
On a Raspberry Pi 4 (no ARMv8.3 RCPC) native @ruvector/attention loads when its linux-arm64 binary is 2.3.1 or later (built without RCPC); an older binary is skipped in favour of the JS fallback. Set AGENTIC_FLOW_NATIVE_ATTENTION=0|1 to override.
That's it! Your project now has:
- π§ Self-learning hooks that improve agent routing over time
- π€ 80+ specialized agents (coder, tester, reviewer, architect, etc.)
- β‘ Background workers triggered by keywords (ultralearn, optimize, audit)
- π 213 MCP tools for swarm coordination
Common Commands
# Route a task to the optimal agent
npx agentic-flow hooks route "implement user authentication"
# View learning metrics
npx agentic-flow hooks metrics
# Dispatch background workers
npx agentic-flow workers dispatch "ultralearn how caching works"
# Run MCP server for Claude Code
npx agentic-flow mcp start
Use in Code
import { AgenticFlow } from "agentic-flow";
const flow = new AgenticFlow();
await flow.initialize();
// Route task to best agent
const result = await flow.route("Fix the login bug");
console.log(`Best agent: ${result.agent} (${result.confidence}% confidence)`);
Programmatic orchestration API (library-safe)
Build systems, IDEs, and CI can drive orchestration in-process without spawning the CLI or MCP. Import from the orchestration subpath (side-effect-free; no CLI, no servers).
Generic client (recommended for build agents β stable input/output: task description, memory seed, paths, provenance):
import { createOrchestrationClient } from "agentic-flow/orchestration";
const client = createOrchestrationClient({ config: { backend: "safe-exec" } });
const { runId } = await client.startRun({
taskDescription: "Your task",
acceptanceCriteria: ["Tests pass"],
allowedPaths: ["src/"],
provenance: { runId: "build-1", cardId: "card-42" },
});
const status = await client.getStatus(runId);
Low-level API: createOrchestrator, orchestrateTask, getRunStatus, cancelRun β see Orchestration API & Memory Plane. Do not use the default entry (import 'agentic-flow') for library use; it runs the CLI and starts servers.
π What's New in v2
SONA: Self-Optimizing Neural Architecture π§
Agentic-Flow v2 now includes SONA (@ruvector/sona) for sub-millisecond adaptive learning:
- π +55% Quality Improvement: Research profile with LoRA fine-tuning
- β‘ <1ms Learning Overhead: Sub-millisecond pattern learning and retrieval
- π Continual Learning: EWC++ prevents catastrophic forgetting
- π‘ Pattern Discovery: 300x faster pattern retrieval (150ms β 0.5ms)
- π° 60% Cost Savings: LLM router with intelligent model selection
- π 2211 ops/sec: Production throughput with SIMD optimization
Complete AgentDB@alpha Integration π§
Agentic-Flow v2 now includes ALL advanced vector/graph, GNN, and attention capabilities from AgentDB@alpha v2.0.0-alpha.2.11:
- β‘ Flash Attention: 2.49x-7.47x speedup, 50-75% memory reduction
- π― GNN Query Refinement: +12.4% recall improvement
- π§ 5 Attention Mechanisms: Flash, Multi-Head, Linear, Hyperbolic, MoE
- πΈοΈ GraphRoPE: Topology-aware position embeddings
- π€ Attention-Based Coordination: Smarter multi-agent consensus
Performance Grade: A+ (100% Pass Rate)
Cost-Optimal Model Routing (ADR-073) π°
Route each query to the cheapest model predicted to clear a quality bar, learned
from your own eval logs β the productized DRACO
finding, powered by @metaharness/router
(dependency-free k-NN / kernel-ridge, optional native FastGRNN via the already-bundled
@ruvector/tiny-dancer). This is additive to the existing config-rule routing β it
selects a model by predicted cost-quality rather than a provider by static rule, and
degrades gracefully to best-predicted on a cold start.
import { ModelRouter } from "agentic-flow";
import { CostOptimalRouter } from "agentic-flow/router/cost-optimal";
// Build from your eval logs: rows of (query embedding β quality each model achieved)
const router = CostOptimalRouter.fromDataset(
rows,
{
"anthropic/claude-haiku-4.5": 1, // $/Mtok
"anthropic/claude-sonnet-4.5": 3,
"anthropic/claude-opus-4": 15,
},
{ qualityBar: 0.8 },
);
const model = new ModelRouter();
model.enableCostOptimalRouting({ router, embed: yourEmbedder });
// chat() now routes each query to the cheapest model predicted to clear 0.8.
Measured (node benchmarks/cost-optimal-router-benchmark.mjs, 3-tier lineup,
1000-query held-out test, bar=0.8):
| Strategy | avg $/query | mean quality | % β₯ bar |
|---|---|---|---|
| always-haiku | 1.00 | 0.412 | 14.1% |
| always-opus | 15.00 | 0.930 | 100% |
| cost-optimal | 10.73 | 0.895 | 98.1% |
β 28.5% cheaper than always-opus while holding 98.1% of queries at/above the bar. Routing decision latency: p50 73Β΅s Β· p99 125Β΅s.
Autonomous Repair β Darwin Mode (ADR-074) π§
Freeze the model, evolve the harness: @metaharness/darwin mutates one policy
surface at a time (planner / context / reviewer / retry / tool / memory / score),
tests each in a shell-free, env-scrubbed sandbox, and keeps only what
measurably improves under a frozen scorer + safety gate. Exposed as a typed
repair() wrapper and the agentic-flow-repair CLI:
# Test-Driven Repair: the repo's own tests gate every promotion
npx --package=agentic-flow -- agentic-flow-repair ./my-repo --generations 3
# Deterministic, Docker-free smoke run
npx --package=agentic-flow -- agentic-flow-repair ./my-repo --mock
agentic-flow-repair is a binary provided by the agentic-flow package.
Keep --package=agentic-flow before the command so npx selects that package
instead of inferring a package name from the binary.
import { repair } from "agentic-flow/repair";
const result = await repair({ repoRoot: "./my-repo", generations: 3 }); // sandbox 'real'
// β { improved, winnerId, winnerLineage, baselineScore, winnerScore, deltaOverBaseline }
The sandbox is consistent with the repo's CWE-78 hardening (test command run via
execFile, never a shell; only PATH + identifying vars reach a variant). The
headline SWE-bench-Lite TDR product (β68.3% with-test, ~$0.01β0.08/instance)
additionally needs the official swebench Docker harness β see
ADR-074.
π Table of Contents
- Quick Start
- What's New
- Key Features
- Performance Benchmarks
- Project Initialization
- Self-Learning Hooks
- Background Workers
- Installation
- API Reference
- Architecture
- Contributing
π₯ Key Features
π SONA: Self-Optimizing Neural Architecture
Adaptive Learning (<1ms Overhead)
- Sub-millisecond pattern learning and retrieval
- 300x faster than traditional approaches (150ms β 0.5ms)
- Real-time adaptation during task execution
- No performance degradation
LoRA Fine-Tuning (99% Parameter Reduction)
- Rank-2 Micro-LoRA: 2211 ops/sec
- Rank-16 Base-LoRA: +55% quality improvement
- 10-100x faster training than full fine-tuning
- Minimal memory footprint (<5MB for edge devices)
Continual Learning (EWC++)
- No catastrophic forgetting
- Learn new tasks while preserving old knowledge
- EWC lambda 2000-2500 for optimal memory preservation
- Cross-agent pattern sharing
More MCP servers from other plugins.
Questions about agentic-flow.
- Which coding agents can use agentic-flow?
- agentic-flow works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
- How do I add agentic-flow to Claude Code?
- Run these in order, one at a time. 1. In Claude Code: /plugin marketplace add ruvnet/agentic-flow 2. In Claude Code: /plugin install agentic-flow@agentic-flow
- Is agentic-flow safe to install?
- Low risk. Signals from public registries, not an audit.

