🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
🔖 Checkpoint: Edit /workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py
rUv7967c82f965b
diff --git a/benchmark/.claude/checkpoints/1754488412.json b/benchmark/.claude/checkpoints/1754488412.jsonnew file mode 100644index 0000000000..bb149d3bf0--- /dev/null+++ b/benchmark/.claude/checkpoints/1754488412.json@@ -0,0 +1 @@+{"branch": "checkpoint/pre-edit-20250806-135332", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py", "timestamp": "2025-08-06T13:53:32Z", "type": "pre-edit", "original_branch": "alpha-88"}diff --git a/benchmark/.claude/checkpoints/1754488414.json b/benchmark/.claude/checkpoints/1754488414.jsonnew file mode 100644index 0000000000..5a86df2036--- /dev/null+++ b/benchmark/.claude/checkpoints/1754488414.json@@ -0,0 +1 @@+{"tag": "checkpoint-20250806-135334", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py", "timestamp": "2025-08-06T13:53:34Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/system-metrics.json | 24 +++++++++++++++++++++ benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +++--- benchmark/.claude/checkpoints/1754488397.json | 1 + benchmark/.claude/checkpoints/1754488399.json | 1 + .../cli/__pycache__/main.cpython-312.pyc | Bin 37378 -> 37396 bytes benchmark/src/swarm_benchmark/cli/main.py | 2 +- claude-flow-wiki | 0 swarm-memory/state.json | 2 +- 9 files changed, 32 insertions(+), 6 deletions(-) "}diff --git a/benchmark/src/swarm_benchmark/cli/main.py b/benchmark/src/swarm_benchmark/cli/main.pyindex ff9b222207..76536fa41f 100644--- a/benchmark/src/swarm_benchmark/cli/main.py+++ b/benchmark/src/swarm_benchmark/cli/main.py@@ -232,10 +232,120 @@ def serve(ctx, port, host):return 0+# Top-level commands for direct real execution[email protected]('swarm')[email protected]('objective')[email protected]('--strategy',+ type=click.Choice(['auto', 'research', 'development', 'analysis', 'testing', 'optimization', 'maintenance']),+ default='auto',+ help='Execution strategy (default: auto)')[email protected]('--mode',+ type=click.Choice(['centralized', 'distributed', 'hierarchical', 'mesh', 'hybrid']),+ default='centralized',+ help='Coordination mode (default: centralized)')[email protected]('--sparc-mode',+ help='Specific SPARC mode to test (e.g., coder, architect, reviewer)')[email protected]('--all-modes', is_flag=True, help='Test all SPARC modes and swarm strategies')[email protected]('--max-agents', type=int, default=5, help='Maximum agents (default: 5)')[email protected]('--timeout', type=int, default=60, help='Timeout in minutes (default: 60)')[email protected]('--task-timeout', type=int, default=300, help='Individual task timeout in seconds (default: 300)')[email protected]('--parallel', is_flag=True, help='Enable parallel execution')[email protected]('--monitor', is_flag=True, help='Enable monitoring')[email protected]('--output', '-o', 'output_formats', multiple=True,+ type=click.Choice(['json', 'sqlite']),+ help='Output formats (default: json)')[email protected]('--output-dir', type=click.Path(), default='./reports',+ help='Output directory (default: ./reports)')[email protected]('--name', help='Benchmark name')[email protected]('--description', help='Benchmark description')[email protected]_context+def swarm_cmd(ctx, objective, strategy, mode, sparc_mode, all_modes, max_agents, timeout,+ task_timeout, parallel, monitor, output_formats, output_dir, name, description):+ """Run real claude-flow swarm benchmarks.++ OBJECTIVE: The goal or task for claude-flow to accomplish++ Examples:+ swarm-bench swarm "Build a REST API" --strategy development+ swarm-bench swarm "Create a parser" --sparc-mode coder+ swarm-bench swarm "Analyze code" --all-modes --parallel+ swarm-bench swarm "Optimize performance" --mode distributed --monitor+ """+ # Forward to the real swarm implementation+ ctx.invoke(swarm, objective=objective, strategy=strategy, mode=mode,+ sparc_mode=sparc_mode, all_modes=all_modes, max_agents=max_agents,+ timeout=timeout, task_timeout=task_timeout, parallel=parallel,+ monitor=monitor, output_formats=output_formats, output_dir=output_dir,+ name=name, description=description)++[email protected]('hive-mind')[email protected]('task')[email protected]('--queen-type',+ type=click.Choice(['strategic', 'tactical', 'adaptive']),+ default='strategic',+ help='Queen coordinator type (default: strategic)')[email protected]('--max-workers', type=int, default=8, help='Maximum worker agents (default: 8)')[email protected]('--consensus',+ type=click.Choice(['majority', 'weighted', 'byzantine']),+ default='majority',+ help='Consensus algorithm (default: majority)')[email protected]('--timeout', type=int, default=60, help='Timeout in minutes (default: 60)')[email protected]('--monitor', is_flag=True, help='Enable monitoring')[email protected]('--output-dir', type=click.Path(), default='./reports',+ help='Output directory (default: ./reports)')[email protected]_context+def hive_mind_cmd(ctx, task, queen_type, max_workers, consensus, timeout, monitor, output_dir):+ """Run real claude-flow hive-mind benchmarks.++ TASK: The task for the hive-mind to accomplish++ Examples:+ swarm-bench hive-mind "Design architecture" --max-workers 8+ swarm-bench hive-mind "Solve problem" --queen-type adaptive+ swarm-bench hive-mind "Build system" --consensus byzantine+ """+ # Forward to the real hive-mind implementation+ ctx.invoke(hive_mind, task=task, queen_type=queen_type, max_workers=max_workers,+ consensus=consensus, timeout=timeout, monitor=monitor, output_dir=output_dir)++[email protected]('sparc')[email protected]('mode', type=click.Choice(['coder', 'architect', 'tdd', 'reviewer', 'tester',+ 'optimizer', 'documenter', 'debugger']))[email protected]('task')[email protected]('--namespace', help='Memory namespace')[email protected]('--timeout', type=int, default=60, help='Timeout in minutes (default: 60)')[email protected]('--non-interactive', is_flag=True, default=True, help='Non-interactive mode (default: True)')[email protected]('--output-dir', type=click.Path(), default='./reports',+ help='Output directory (default: ./reports)')[email protected]_context+def sparc_cmd(ctx, mode, task, namespace, timeout, non_interactive, output_dir):+ """Run real claude-flow SPARC mode benchmarks.++ MODE: The SPARC mode to use (coder, architect, tdd, etc.)+ TASK: The task to accomplish++ Examples:+ swarm-bench sparc coder "Implement authentication"+ swarm-bench sparc architect "Design microservices"+ swarm-bench sparc tdd "Create test suite"+ swarm-bench sparc reviewer "Review codebase"+ """+ # Forward to the real sparc implementation+ ctx.invoke(sparc, mode=mode, task=task, namespace=namespace,+ timeout=timeout, non_interactive=non_interactive, output_dir=output_dir)+++# Keep the real group for backward compatibility but mark as deprecated@cli.group()@click.pass_contextdef real(ctx):- """Real claude-flow command execution and benchmarking."""+ """[DEPRECATED] Use direct commands instead: swarm, hive-mind, sparc."""+ click.echo("⚠️ The 'real' subcommand is deprecated. Use direct commands instead:")+ click.echo(" swarm-bench swarm ...")+ click.echo(" swarm-bench hive-mind ...")+ click.echo(" swarm-bench sparc ...")pass