π 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/test_swe_bench_official.py
rUv6f9d30a199fe
diff --git a/benchmark/.claude/checkpoints/1754575115.json b/benchmark/.claude/checkpoints/1754575115.jsonnew file mode 100644index 0000000000..d278a90525--- /dev/null+++ b/benchmark/.claude/checkpoints/1754575115.json@@ -0,0 +1 @@+{"branch": "checkpoint/pre-edit-20250807-135835", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/swe_bench_command.py", "timestamp": "2025-08-07T13:58:35Z", "type": "pre-edit", "original_branch": "swe-bench"}diff --git a/benchmark/.claude/checkpoints/1754575117.json b/benchmark/.claude/checkpoints/1754575117.jsonnew file mode 100644index 0000000000..b47aa6f249--- /dev/null+++ b/benchmark/.claude/checkpoints/1754575117.json@@ -0,0 +1 @@+{"tag": "checkpoint-20250807-135837", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/swe_bench_command.py", "timestamp": "2025-08-07T13:58:37Z", "type": "post-edit", "branch": "swe-bench", "diff_summary": " .claude-flow/metrics/system-metrics.json | 36 ++++++++ benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +- benchmark/.claude/checkpoints/1754575086.json | 1 + benchmark/.claude/checkpoints/1754575087.json | 1 + .../src/swarm_benchmark/cli/swe_bench_command.py | 98 ++++++++++++++++++++++ 6 files changed, 140 insertions(+), 4 deletions(-) "}diff --git a/benchmark/test_swe_bench_official.py b/benchmark/test_swe_bench_official.pynew file mode 100644index 0000000000..e23c92448c--- /dev/null+++ b/benchmark/test_swe_bench_official.py@@ -0,0 +1,111 @@+#!/usr/bin/env python3+"""+Test script for official SWE-bench integration+"""++import asyncio+import sys+from pathlib import Path++# Add src to path+sys.path.insert(0, str(Path(__file__).parent / "src"))++from swarm_benchmark.swe_bench.official_integration import OfficialSWEBenchEngine+from swarm_benchmark.core.models import BenchmarkConfig, StrategyType, CoordinationMode+++async def test_official_integration():+ """Test the official SWE-bench integration."""++ print("""+ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+β Testing Official SWE-bench Integration β+ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+""")++ # Create optimal configuration+ config = BenchmarkConfig(+ name="SWE-bench-Test",+ description="Testing official integration",+ strategy=StrategyType.OPTIMIZATION,+ mode=CoordinationMode.MESH,+ max_agents=8,+ task_timeout=60, # 1 minute for testing+ output_directory="benchmark/swe-bench-official/test-results"+ )++ # Initialize engine+ engine = OfficialSWEBenchEngine(config)++ # Test 1: Load dataset+ print("\n1οΈβ£ Testing dataset loading...")+ success = await engine.load_dataset(use_lite=True)++ if not success:+ print("β Failed to load dataset")+ print("\nInstalling required packages...")+ import subprocess+ subprocess.run(["pip", "install", "datasets", "swebench"], check=True)+ success = await engine.load_dataset(use_lite=True)++ if success:+ print(f"β Dataset loaded: {len(engine.dataset)} instances")+ else:+ print("β Could not load dataset. Please check your connection.")+ return++ # Test 2: Run on single instance+ print("\n2οΈβ£ Testing single instance execution...")++ if engine.dataset:+ first_instance = engine.dataset[0]+ print(f" Instance: {first_instance['instance_id']}")+ print(f" Repo: {first_instance['repo']}")++ result = await engine.run_instance(first_instance)++ if result['success']:+ print(f"β Generated patch in {result['duration']:.1f}s")+ if result['patch']:+ print(f" Patch length: {len(result['patch'])} chars")+ else:+ print(f"β οΈ No patch generated: {result['error']}")++ # Test 3: Run mini evaluation+ print("\n3οΈβ£ Running mini evaluation (3 instances)...")++ report = await engine.run_evaluation(+ instances_limit=3,+ use_lite=True,+ save_predictions=True+ )++ if "error" not in report:+ print(f"β Mini evaluation complete!")+ print(f" Success rate: {report['success_rate']:.1%}")+ print(f" Avg duration: {report['average_duration']:.1f}s")++ # Test 4: Validate submission format+ print("\n4οΈβ£ Testing submission validation...")++ predictions_file = Path(config.output_directory) / "predictions.json"+ if predictions_file.exists():+ is_valid = await engine.validate_submission(str(predictions_file))+ if is_valid:+ print("β Submission format is valid!")+ else:+ print("β Submission format has issues")+ else:+ print("β οΈ No predictions file generated")++ print("\n" + "="*60)+ print("β Integration test complete!")+ print("="*60)+ print("\nTo run full evaluation:")+ print(" swarm-bench swe-bench official --limit 10")+ print("\nTo run on all 300 SWE-bench-Lite instances:")+ print(" swarm-bench swe-bench official")+++if __name__ == "__main__":+ asyncio.run(test_official_integration())\ No newline at end of file