flow-nexus-swarm について
flow-nexus-swarm は、クラウド上の AI エージェント swarm とイベント駆動型ワークフローを編成するスキルです。複数エージェントのタスクを調整するチーム向けに、複数のトポロジー、キュー実行、テンプレート、能力に基づく割り当てを提供します。
主な機能
- 01複数トポロジーのエージェント swarm 管理
- 02イベント駆動型ワークフローの作成と実行
- 03ベクトル類似度によるエージェント割り当て
- 04テンプレートを使った swarm 設定の作成
- 05実行状況、指標、キューの監視
活用シーン
- 01複数リポジトリの開発とテストの調整
- 02調査やデータ処理ワークフローの実行
- 03CI/CD と DevOps プロセスの自動化
- 04コードレビューとセキュリティ検査の調整
MCP 対応
Flow Nexus MCP ツールを通じて swarm、エージェント、ワークフローを初期化・管理し、実行状況とメッセージキューを監視します。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill flow-nexus-swarmインストール後、Claude Code で/flow-nexus-swarmを入力して読み込まれたか確認します。
詳細
Flow Nexus Swarm & Workflow Orchestration
イベント駆動型ワークフローの自動化、メッセージキュー処理、インテリジェントなエージェント調整を活用して、クラウドベースの AI エージェントスウォームをデプロイ、管理します。
📋 目次
概要
Flow Nexus は、次の機能を備えた AI エージェントスウォーム向けのクラウドベースのオーケストレーションを提供します。
- 複数のトポロジーをサポート:階層型、メッシュ型、リング型、スター型のアーキテクチャ
- イベント駆動型ワークフロー:非同期実行によるメッセージキュー処理
- テンプレートライブラリ:一般的なユースケース向けの事前構築済みスウォーム設定
- インテリジェントなエージェント割り当て:最適なエージェント選択のためのベクトル類似度マッチング
- リアルタイム監視:包括的なメトリクスと監査証跡
- スケーラブルなインフラストラクチャ:自動スケーリング対応のクラウドベース実行
スウォーム管理
スウォームの初期化
トポロジーと設定を指定して、新しいスウォームを作成します。
mcp__flow-nexus__swarm_init({
topology: "hierarchical", // Options: mesh, ring, star, hierarchical
maxAgents: 8,
strategy: "balanced" // Options: balanced, specialized, adaptive
})
トポロジーガイド:
- 階層型:コーディネーターノードを含むツリー構造(複雑なプロジェクトに最適)
- メッシュ型:ピアツーピアのコラボレーション(調査と分析に最適)
- リング型:循環型の調整(逐次的なワークフローに最適)
- スター型:一元化されたハブ(シンプルな委任に最適)
戦略ガイド:
- バランス型:エージェント間で作業負荷を均等に分配します
- 特化型:エージェントが特定の専門分野に集中します
- 適応型:タスクの複雑さに応じて動的に調整します
エージェントの起動
スウォームに特化型エージェントを追加します。
mcp__flow-nexus__agent_spawn({
type: "researcher", // Options: researcher, coder, analyst, optimizer, coordinator
name: "Lead Researcher",
capabilities: ["web_search", "analysis", "summarization"]
})
エージェントの種類:
- リサーチャー:情報収集、ウェブ検索、分析
- コーダー:コード生成、リファクタリング、実装
- アナリスト:データ分析、パターン認識、インサイト
- オプティマイザー:パフォーマンス調整、リソース最適化
- コーディネーター:タスクの委任、進捗追跡、統合
タスクのオーケストレーション
スウォーム全体にタスクを分配します。
mcp__flow-nexus__task_orchestrate({
task: "Build a REST API with authentication and database integration",
strategy: "parallel", // Options: parallel, sequential, adaptive
maxAgents: 5,
priority: "high" // Options: low, medium, high, critical
})
実行戦略:
- 並列:独立したサブタスクの並行性を最大化します
- 逐次:依存関係に沿って段階的に実行します
- 適応型:タスク分析に基づいて AI が戦略を選択します
スウォームの監視とスケーリング
// Get detailed swarm status
mcp__flow-nexus__swarm_status({
swarm_id: "optional-id" // Uses active swarm if not provided
})
// List all active swarms
mcp__flow-nexus__swarm_list({
status: "active" // Options: active, destroyed, all
})
// Scale swarm up or down
mcp__flow-nexus__swarm_scale({
target_agents: 10,
swarm_id: "optional-id"
})
// Gracefully destroy swarm
mcp__flow-nexus__swarm_destroy({
swarm_id: "optional-id"
})
ワークフローの自動化
ワークフローの作成
メッセージキュー処理を伴うイベント駆動型ワークフローを定義します。
mcp__flow-nexus__workflow_create({
name: "CI/CD Pipeline",
description: "Automated testing, building, and deployment",
steps: [
{
id: "test",
action: "run_tests",
agent: "tester",
parallel: true
},
{
id: "build",
action: "build_app",
agent: "builder",
depends_on: ["test"]
},
{
id: "deploy",
action: "deploy_prod",
agent: "deployer",
depends_on: ["build"]
}
],
triggers: ["push_to_main", "manual_trigger"],
metadata: {
priority: 10,
retry_policy: "exponential_backoff"
}
})
ワークフローの機能:
- 依存関係の管理:
depends_onを使用してステップ間の依存関係を定義します - 並列実行:
parallel: trueを設定してステップを並行実行します - イベントトリガー:GitHub イベント、スケジュール、手動トリガー
- 再試行ポリシー:一時的な障害が発生した場合に自動的に再試行します
- 優先度キューイング:優先度の高いワークフローを先に実行します
ワークフローの実行
ワークフローを同期または非同期で実行します。
mcp__flow-nexus__workflow_execute({
workflow_id: "workflow_id",
input_data: {
branch: "main",
commit: "abc123",
environment: "production"
},
async: true // Queue-based execution for long-running workflows
})
実行モード:
- 同期(async: false):即時実行し、完了まで待機します
- 非同期(async: true):メッセージキュー処理によるノンブロッキング実行
ワークフローの監視
// Get workflow status and metrics
mcp__flow-nexus__workflow_status({
workflow_id: "id",
execution_id: "specific-run-id", // Optional
include_metrics: true
})
// List workflows with filters
mcp__flow-nexus__workflow_list({
status: "running", // Options: running, completed, failed, pending
limit: 10,
offset: 0
})
// Get complete audit trail
mcp__flow-nexus__workflow_audit_trail({
workflow_id: "id",
limit: 50,
start_time: "2025-01-01T00:00:00Z"
})
エージェントの割り当て
ワークフローのタスクにエージェントをインテリジェントに割り当てます。
mcp__flow-nexus__workflow_agent_assign({
task_id: "task_id",
agent_type: "coder", // Preferred agent type
use_vector_similarity: true // AI-powered capability matching
})
ベクトル類似度マッチング:
- タスクの要件とエージェントの能力を分析します
- 過去のパフォーマンスに基づいて最適なエージェントを見つけます
- 作業負荷と対応可能状況を考慮します
キュー管理
メッセージキューを監視、管理します。
mcp__flow-nexus__workflow_queue_status({
queue_name: "optional-specific-queue",
include_messages: true // Show pending messages
})
エージェントのオーケストレーション
フルスタック開発パターン
// 1. Initialize swarm with hierarchical topology
mcp__flow-nexus__swarm_init({
topology: "hierarchical",
maxAgents: 8,
strategy: "specialized"
})
// 2. Spawn specialized agents
mcp__flow-nexus__agent_spawn({ type: "coordinator", name: "Project Manager" })
mcp__flow-nexus__agent_spawn({ type: "coder", name: "Backend Developer" })
mcp__flow-nexus__agent_spawn({ type: "coder", name: "Frontend Developer" })
mcp__flow-nexus__agent_spawn({ type: "coder", name: "Database Architect" })
mcp__flow-nexus__agent_spawn({ type: "analyst", name: "QA Engineer" })
// 3. Create development workflow
mcp__flow-nexus__workflow_create({
name: "Full-Stack Development",
steps: [
{ id: "requirements", action: "analyze_requirements", agent: "coordinator" },
{ id: "db_design", action: "design_schema", agent: "Database Architect" },
{ id: "backend", action: "build_api", agent: "Backend Developer", depends_on: ["db_design"] },
{ id: "frontend", action: "build_ui", agent: "Frontend Developer", depends_on: ["requirements"] },
{ id: "integration", action: "integrate", agent: "Backend Developer", depends_on: ["backend", "frontend"] },
{ id: "testing", action: "qa_testing", agent: "QA Engineer", depends_on: ["integration"] }
]
})
// 4. Execute workflow
mcp__flow-nexus__workflow_execute({
workflow_id: "workflow_id",
input_data: {
project: "E-commerce Platform",
tech_stack: ["Node.js", "React", "PostgreSQL"]
}
})
調査・分析パターン
// 1. Initialize mesh topology for collaborative research
mcp__flow-nexus__swarm_init({
topology: "mesh",
maxAgents: 5,
strategy: "balanced"
})
// 2. Spawn research agents
mcp__flow-nexus__agent_spawn({ type: "researcher", name: "Primary Researcher" })
mcp__flow-nexus__agent_spawn({ type: "researcher", name: "Secondary Researcher" })
mcp__flow-nexus__agent_spawn({ type: "analyst", name: "Data Analyst" })
mcp__flow-nexus__agent_spawn({ type: "analyst", name: "Insights Analyst" })
// 3. Orchestrate research task
mcp__flow-nexus__task_orchestrate({
task: "Research machine learning trends for 2025 and analyze market opportunities",
strategy: "parallel",
maxAgents: 4,
priority: "high"
})
CI/CD パイプラインパターン
mcp__flow-nexus__workflow_create({
name: "Deployment Pipeline",
description: "Automated testing, building, and multi-environment deployment",
steps: [
{ id: "lint", action: "lint_code", agent: "code_quality", parallel: true },
{ id: "unit_test", action: "unit_tests", agent: "test_runner", parallel: true },
{ id: "integration_test", action: "integration_tests", agent: "test_runner", parallel: true },
{ id: "build", action: "build_artifacts", agent: "builder", depends_on: ["lint", "unit_test", "integration_test"] },
{ id: "security_scan", action: "security_scan", agent: "security", depends_on: ["build"] },
{ id: "deploy_staging", action: "deploy", agent: "deployer", depends_on: ["security_scan"] },
{ id: "smoke_test", action: "smoke_tests", agent: "test_runner", depends_on: ["deploy_staging"] },
{ id: "deploy_prod", action: "deploy", agent: "deployer", depends_on: ["smoke_test"] }
],
triggers: ["github_push", "github_pr_merged"],
metadata: {
priority: 10,
auto_rollback: true
}
})
データ処理パイプラインパターン
mcp__flow-nexus__workflow_create({
name: "ETL Pipeline",
description: "Extract, Transform, Load data processing",
steps: [
{ id: "extract", action: "extract_data", agent: "data_extractor" },
{ id: "validate_raw", action: "validate_data", agent: "validator", depends_on: ["extract"] },
{ id: "transform", action: "transform_data", agent: "transformer", depends_on: ["validate_raw"] },
{ id: "enrich", action: "enrich_data", agent: "enricher", depends_on: ["transform"] },
{ id: "load", action: "load_data", agent: "loader", depends_on: ["enrich"] },
{ id: "validate_final", action: "validate_data", agent: "validator", depends_on: ["load"] }
],
triggers: ["schedule:0 2 * * *"], // Daily at 2 AM
metadata: {
retry_policy: "exponential_backoff",
max_retries: 3
}
})
テンプレートとパターン
事前構築済みテンプレートを使用する
// Create swarm from template
mcp__flow-nexus__swarm_create_from_template({
template_name: "full-stack-dev",
overrides: {
maxAgents: 6,
strategy: "specialized"
}
})
// List available templates
mcp__flow-nexus__swarm_templates_list({
category: "quickstart", // Options: quickstart, specialized, enterprise, custom, all
includeStore: true
})
利用可能なテンプレートカテゴリ:
クイックスタートテンプレート:
full-stack-dev:Web 開発用の完全なスウォームresearch-team:調査と分析用のスウォームcode-review:コードレビューを自動化するスウォームdata-pipeline:ETL とデータ処理
特化型テンプレート:
ml-development:機械学習プロジェクト用のスウォームmobile-dev:モバイルアプリ開発devops-automation:インフラストラクチャとデプロイsecurity-audit:セキュリティ分析とテスト
エンタープライズテンプレート:
enterprise-migration:大規模なシステム移行multi-repo-sync:複数のリポジトリの連携compliance-review:規制コンプライアンスのワークフローincident-response:インシデント管理の自動化
カスタムテンプレートの作成
成功したスウォーム設定を、今後のプロジェクトで再利用できるテンプレートとして保存します。
高度な機能
リアルタイム監視
// Subscribe to execution streams
mcp__flow-nexus__execution_stream_subscribe({
stream_type: "claude-flow-swarm",
deployment_id: "deployment_id"
})
// Get execution status
mcp__flow-nexus__execution_stream_status({
stream_id: "stream_id"
})
// List files created during execution
mcp__flow-nexus__execution_files_list({
stream_id: "stream_id",
created_by: "claude-flow"
})
スウォームのメトリクスと分析
// Get swarm performance metrics
mcp__flow-nexus__swarm_status({
swarm_id: "id"
})
// Analyze workflow efficiency
mcp__flow-nexus__workflow_status({
workflow_id: "id",
include_metrics: true
})
複数スウォームの連携
複雑な複数フェーズのプロジェクトでは、複数のスウォームを連携させます。
// Phase 1: Research swarm
const researchSwarm = await mcp__flow-nexus__swarm_init({
topology: "mesh",
maxAgents: 4
})
// Phase 2: Development swarm
const devSwarm = await mcp__flow-nexus__swarm_init({
topology: "hierarchical",
maxAgents: 8
})
// Phase 3: Testing swarm
const testSwarm = await mcp__flow-nexus__swarm_init({
topology: "star",
maxAgents: 5
})
ベストプラクティス
1. 適切なトポロジーを選択する
// Simple projects: Star
mcp__flow-nexus__swarm_init({ topology: "star", maxAgents: 3 })
// Collaborative work: Mesh
mcp__flow-nexus__swarm_init({ topology: "mesh", maxAgents: 5 })
// Complex projects: Hierarchical
mcp__flow-nexus__swarm_init({ topology: "hierarchical", maxAgents: 10 })
// Sequential workflows: Ring
mcp__flow-nexus__swarm_init({ topology: "ring", maxAgents: 4 })
2. エージェントの割り当てを最適化する
// Use vector similarity for optimal matching
mcp__flow-nexus__workflow_agent_assign({
task_id: "complex-task",
use_vector_similarity: true
})
3. 適切なエラー処理を実装する
mcp__flow-nexus__workflow_create({
name: "Resilient Workflow",
steps: [...],
metadata: {
retry_policy: "exponential_backoff",
max_retries: 3,
timeout: 300000, // 5 minutes
on_failure: "notify_and_rollback"
}
})
4. 監視してスケールする
// Regular monitoring
const status = await mcp__flow-nexus__swarm_status()
// Scale based on workload
if (status.workload > 0.8) {
await mcp__flow-nexus__swarm_scale({ target_agents: status.agents + 2 })
}
5. 長時間実行されるワークフローには非同期実行を使用する
// Long-running workflows should use message queues
mcp__flow-nexus__workflow_execute({
workflow_id: "data-pipeline",
async: true // Non-blocking execution
})
// Monitor progress
mcp__flow-nexus__workflow_queue_status({ include_messages: true })
6. リソースをクリーンアップする
// Destroy swarm when complete
mcp__flow-nexus__swarm_destroy({ swarm_id: "id" })
7. テンプレートを活用する
// Use proven templates instead of building from scratch
mcp__flow-nexus__swarm_create_from_template({
template_name: "code-review",
overrides: { maxAgents: 4 }
})
Claude Flow との連携
Flow Nexus のスウォームは、Claude Flow のフックとシームレスに連携します。
# Pre-task coordination setup
npx claude-flow@alpha hooks pre-task --description "Initialize swarm"
# Post-task metrics export
npx claude-flow@alpha hooks post-task --task-id "swarm-execution"
一般的なユースケース
1. 複数リポジトリにまたがる開発
- 複数のリポジトリにまたがる開発を調整します
- テストとデプロイを同期します
- リポジトリ間の依存関係を管理します
2. 研究プロジェクト
- 情報収集を分散して行います
- さまざまなデータソースを並行して分析します
- 協力して情報を統合し、レポートを作成します
3. DevOps の自動化
- Infrastructure as Code をデプロイします
- 複数の環境でテストします
- ロールバックと復旧を自動化します
4. コード品質ワークフロー
- コードレビューを自動化します
- セキュリティスキャンを実行します
- パフォーマンスをベンチマークします
5. データ処理
- 大規模な ETL パイプラインを実行します
- リアルタイムでデータを変換します
- データの検証と品質チェックを行います
認証とセットアップ
# Install Flow Nexus
npm install -g flow-nexus@latest
# Register account
npx flow-nexus@latest register
# Login
npx flow-nexus@latest login
# Add MCP server to Claude Code
claude mcp add flow-nexus npx flow-nexus@latest mcp start
サポートとリソース
- プラットフォーム:https:/$flow-nexus.ruv.io
- ドキュメント:https:/$github.com$ruvnet$flow-nexus
- 課題:https:/$github.com$ruvnet$flow-nexus$issues
お忘れなく:Flow Nexus はクラウドベースのオーケストレーションインフラストラクチャを提供します。ローカルでの実行と連携には、柔軟性を最大限に高めるため、Flow Nexus と併せてコアの claude-flow MCP サーバーを使用してください。