Free to browse, every day. Go Pro for unlimited installs and Airsc MCP.

See Pro
MCP serverCautionAgent workflow & memorySome setup

agentic-flow

ruvnet · ruvnet/agentic-flow

An MCP server and toolkit for Claude Code that enables model switching, autonomous multi-agent swarms, and self-learning hooks.

Easily switch between alternative low-cost AI models in Claude Code/Agent SDK. For those comfortable using Claude agents and commands, it lets you take what you've created and deploy fully hosted agents for real business purposes. Use Claude Code to get the agent working, then deploy it in your favorite cloud.

823 stars177License: No licenseUpdated 11 days ago0 opens

Preview

▍

What you can do with it

  • Switch to cheaper models for routine tasks inside Claude Code
  • Orchestrate specialized agents for complex coding, testing, and auditing
  • Add self-optimizing neural hooks that improve agent routing over time

Safety check

Caution

Usable, but read the notes first.

  • ●Asks for administrator (sudo) rights..claude/skills/agentdb-advanced/SKILL.md
  • ●npm package runs a script automatically on install.package.json
  • ●No clear license: check with the author before using it in a commercial product.

Automated scan of the repo files. Always review code you run.

From the README

🚀 Agentic-Flow v2

Production-ready AI agent orchestration with 66 self-learning agents, 213 MCP tools, and autonomous multi-agent swarms.


Start · Capabilities · Hooks · Workers · Docs

⚡ 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

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)`);

🎉 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

AgentDB v3.0.0-alpha.6: Sparse Attention & Memory Revolution 🧠

Latest AgentDB release includes groundbreaking memory optimizations:

  • 🎯 Sparse Attention (10-100x): PPR, random walk, spectral sparsification for massive graphs
  • 📊 Graph Partitioning (50-80% memory reduction): Stoer-Wagner, Karger, flow-based mincut
  • ⚡ Fused Attention (10-50x faster): Exceeded 20-25% target by 40x with kernel fusion!
  • 🔍 Zero-Copy Optimization: 90% fewer allocations, 40-50% speedup
  • 🏗️ Clean Architecture: 782 lines → 6 focused classes (<200 lines each)
  • 🧪 129+ Tests: 100% passing, comprehensive coverage
  • 📦 WASM/NAPI Bindings: 730 KB optimized binaries ready

ADR-072 Phase 1 Complete: Full RuVector advanced features integration

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)


📖 Table of Contents


🔥 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

LLM Router (60% Cost Savings)

  • Intelligent model selection (Sonnet vs Haiku)
  • Quality-aware routing (0.8-0.95 quality scores)
  • Budget constraints and fallback handling
  • $720/month → $288/month savings

Quality Improvements by Domain:

  • Code tasks: +5.0%
  • Creative writing: +4.3%
  • Reasoning: +3.6%
  • Chat: +2.1%
  • Math: +1.2%

5 Configuration Profiles:

  • Real-Time: 2200 ops/sec, <0.5ms latency
  • Batch: Balance throughput & adaptation
  • Research: +55% quality (maximum)
  • Edge: <5MB memory footprint
  • Balanced: Default (18ms, +25% quality)

🧠 Advanced Attention Mechanisms

Flash Attention (Production-Ready)

  • 2.49x speedup in JavaScript runtime
  • 7.47x speedup with NAPI runtime
  • 50-75% memory reduction
  • <0.1ms latency for all operations

Multi-Head Attention (Standard Transformer)

  • 8-head configuration
  • Compatible with existing systems
  • <0.1ms latency

Linear Attention (Scalable)

  • O(n) complexity
  • Perfect for long sequences (>2048 tokens)
  • <0.1ms latency

Hyperbolic Attention (Hierarchical)

  • Models hierarchical structures
  • Queen-worker swarm coordination
  • <0.1ms latency

MoE Attention (Expert Routing)

  • Sparse expert activation
  • Multi-agent routing
  • <0.1ms latency

GraphRoPE (Topology-Aware)

  • Graph structure awareness
  • Swarm coordination
  • <0.1ms latency

🎯 GNN Query Refinement

  • +12.4% recall improvement target
  • 3-layer GNN network
  • Graph context integration
  • Automati
View source on GitHub