CLAUDE.md
classic/direct_benchmark/CLAUDE.mdCLAUDE.md
Quality
78/100
Scores the file, not the repository.Length
1,275 words
43 headings · 10 code blocksRepository
186k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# CLAUDE.md - Direct Benchmark Harness23This file provides guidance to Claude Code when working with the direct benchmark harness.45## Overview67The Direct Benchmark Harness is a high-performance testing framework for AutoGPT that directly instantiates agents without HTTP server overhead. It enables parallel execution of multiple strategy/model configurations.89## Quick Reference1011All commands run from the `classic/` directory (parent of this directory):1213```bash14# Install (one-time setup)15cd classic16poetry install1718# Run benchmarks19poetry run direct-benchmark run2021# Run specific strategies and models22poetry run direct-benchmark run \23 --strategies one_shot,rewoo \24 --models claude,openai \25 --parallel 42627# Run a single test28poetry run direct-benchmark run \29 --strategies one_shot \30 --tests ReadFile3132# List available challenges33poetry run direct-benchmark list-challenges3435# List model presets36poetry run direct-benchmark list-models3738# List strategies39poetry run direct-benchmark list-strategies40```4142## CLI Options4344### Run Command4546| Option | Short | Description |47|--------|-------|-------------|48| `--strategies` | `-s` | Comma-separated strategies (one_shot, rewoo, plan_execute, reflexion, tree_of_thoughts) |49| `--models` | `-m` | Comma-separated model presets (claude, openai, etc.) |50| `--categories` | `-c` | Filter by challenge categories |51| `--skip-category` | `-S` | Exclude categories |52| `--tests` | `-t` | Filter by test names |53| `--attempts` | `-N` | Number of times to run each challenge |54| `--parallel` | `-p` | Maximum parallel runs (default: 4) |55| `--timeout` | | Per-challenge timeout in seconds (default: 300) |56| `--cutoff` | | Alias for --timeout |57| `--no-cutoff` | `--nc` | Disable time limit |58| `--max-steps` | | Maximum steps per challenge (default: 50) |59| `--maintain` | | Run only regression tests |60| `--improve` | | Run only non-regression tests |61| `--explore` | | Run only never-beaten challenges |62| `--no-dep` | | Ignore challenge dependencies |63| `--workspace` | | Workspace root directory |64| `--challenges-dir` | | Path to challenges directory |65| `--reports-dir` | | Path to reports directory |66| `--keep-answers` | | Keep answer files for debugging |67| `--quiet` | `-q` | Minimal output |68| `--verbose` | `-v` | Detailed per-challenge output |69| `--json` | | JSON output for CI/scripting |70| `--ci` | | CI mode: no live display, shows completion blocks (auto-enabled when CI env var is set or not a TTY) |71| `--fresh` | | Clear all saved state and start fresh (don't resume) |72| `--retry-failures` | | Re-run only the challenges that failed in previous run |73| `--reset-strategy` | | Reset saved results for specific strategy (can repeat) |74| `--reset-model` | | Reset saved results for specific model (can repeat) |75| `--reset-challenge` | | Reset saved results for specific challenge (can repeat) |76| `--debug` | | Enable debug output |7778### State Management Commands79```bash80# Show current state81poetry run direct-benchmark state show8283# Clear all state84poetry run direct-benchmark state clear8586# Reset specific strategy/model/challenge87poetry run direct-benchmark state reset --strategy reflexion88poetry run direct-benchmark state reset --model claude-thinking-25k89poetry run direct-benchmark state reset --challenge ThreeSum90```9192## Available Strategies9394- `one_shot` - Single-pass reasoning (default)95- `rewoo` - Reasoning with observations96- `plan_execute` - Plan then execute97- `reflexion` - Self-reflection loop98- `tree_of_thoughts` - Multiple reasoning paths99100## Available Model Presets101102### Claude103- `claude` - sonnet-4 smart, haiku fast104- `claude-smart` - sonnet-4 for both105- `claude-fast` - haiku for both106- `claude-opus` - opus smart, sonnet fast107- `claude-opus-only` - opus for both108109### Claude with Extended Thinking110- `claude-thinking-10k` - 10k thinking tokens111- `claude-thinking-25k` - 25k thinking tokens112- `claude-thinking-50k` - 50k thinking tokens113- `claude-opus-thinking` - opus with 25k thinking114- `claude-opus-thinking-50k` - opus with 50k thinking115116### OpenAI117- `openai` - gpt-4o smart, gpt-4o-mini fast118- `openai-smart` - gpt-4o for both119- `openai-fast` - gpt-4o-mini for both120- `gpt5` - gpt-5 smart, gpt-4o fast121- `gpt5-only` - gpt-5 for both122123### OpenAI Reasoning Models124- `o1`, `o1-mini` - o1 variants125- `o1-low`, `o1-medium`, `o1-high` - o1 with reasoning effort126- `o3-low`, `o3-medium`, `o3-high` - o3 with reasoning effort127- `gpt5-low`, `gpt5-medium`, `gpt5-high` - gpt-5 with reasoning effort128129## Directory Structure130131```132direct_benchmark/133├── pyproject.toml # Poetry config134├── README.md # User documentation135├── CLAUDE.md # This file136├── .gitignore137└── direct_benchmark/138 ├── __init__.py139 ├── __main__.py # CLI entry point140 ├── models.py # Pydantic models, presets141 ├── harness.py # Main orchestrator142 ├── runner.py # AgentRunner (single agent lifecycle)143 ├── parallel.py # ParallelExecutor (concurrent runs)144 ├── challenge_loader.py # Load challenges from JSON145 ├── evaluator.py # Evaluate outputs vs ground truth146 ├── report.py # Report generation147 └── ui.py # Rich UI components148```149150## Architecture151152### Execution Flow153154```155CLI args → HarnessConfig156 ↓157BenchmarkHarness.run()158 ↓159ChallengeLoader.load_all() → list[Challenge]160 ↓161ParallelExecutor.execute_matrix(configs × challenges × attempts)162 ↓163[Parallel with semaphore limiting to N concurrent]164 ↓165AgentRunner.run_challenge():166 1. Create temp workspace167 2. Copy input artifacts to agent workspace168 3. Create AppConfig with strategy/model169 4. create_agent() - direct instantiation170 5. Run agent loop until finish/timeout171 6. Collect output files172 ↓173Evaluator.evaluate() - check against ground truth174 ↓175ReportGenerator - write reports176```177178### Key Components179180**AgentRunner** (`runner.py`)181- Manages single agent lifecycle for one challenge182- Creates isolated temp workspace per run183- Copies input artifacts to `{workspace}/.autogpt/agents/{agent_id}/workspace/`184- Instantiates agent directly via `create_agent()`185- Runs agent loop: `propose_action()` → `execute()` until finish/timeout186187**ParallelExecutor** (`parallel.py`)188- Manages concurrent execution with asyncio semaphore189- Supports multiple attempts per challenge190- Reports progress via callbacks191192**Evaluator** (`evaluator.py`)193- String matching (should_contain/should_not_contain)194- Python script execution195- Pytest execution196197**ReportGenerator** (`report.py`)198- Per-config `report.json` files (compatible with agbenchmark format)199- Comparison reports across all configs200201## Report Format202203Reports are generated in `./reports/` with format:204```205reports/206├── {timestamp}_{strategy}_{model}/207│ └── report.json208└── strategy_comparison_{timestamp}.json209```210211## Dependencies212213- `autogpt-forge` - Core agent framework214- `autogpt` - Original AutoGPT agent215- `click` - CLI framework216- `pydantic` - Data models217- `rich` - Terminal UI218219## Key Differences from agbenchmark220221| agbenchmark | direct_benchmark |222|-------------|-----------------|223| `subprocess.Popen` + HTTP server | Direct `create_agent()` |224| HTTP/REST via Agent Protocol | Direct `propose_action()`/`execute()` |225| Sequential (one config at a time) | Parallel via asyncio semaphore |226| Port-based isolation | Workspace-based isolation |227| `agbenchmark run` CLI | Direct JSON parsing |228229## Common Tasks230231### Run Full Benchmark Suite232```bash233poetry run direct-benchmark run \234 --strategies one_shot,rewoo,plan_execute \235 --models claude \236 --parallel 8237```238239### Compare Strategies240```bash241poetry run direct-benchmark run \242 --strategies one_shot,rewoo,plan_execute,reflexion \243 --models claude \244 --tests ReadFile,WriteFile,ThreeSum245```246247### Debug a Failing Test248```bash249poetry run direct-benchmark run \250 --strategies one_shot \251 --tests FailingTest \252 --keep-answers \253 --verbose254```255256### Resume / Incremental Runs257The benchmark automatically saves progress and resumes from where it left off.258State is saved to `.benchmark_state.json` in the reports directory.259260```bash261# Run benchmarks - will resume from last run automatically262poetry run direct-benchmark run \263 --strategies one_shot,reflexion \264 --models claude265266# Start fresh (clear all saved state)267poetry run direct-benchmark run --fresh \268 --strategies one_shot,reflexion \269 --models claude270271# Reset specific strategy and re-run272poetry run direct-benchmark run \273 --reset-strategy reflexion \274 --strategies one_shot,reflexion \275 --models claude276277# Reset specific model and re-run278poetry run direct-benchmark run \279 --reset-model claude-thinking-25k \280 --strategies one_shot \281 --models claude,claude-thinking-25k282283# Retry only the failures from the last run284poetry run direct-benchmark run --retry-failures \285 --strategies one_shot,reflexion \286 --models claude287```288289### CI/Scripting Mode290```bash291# JSON output (parseable)292poetry run direct-benchmark run --json293294# CI mode - shows completion blocks without Live display295# Auto-enabled when CI=true env var is set or stdout is not a TTY296poetry run direct-benchmark run --ci297```298
Also in Significant-Gravitas/AutoGPT
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Significant-Gravitas/AutoGPTautogpt_platform/frontend/src/tests/AGENTS.md · 186k | AGENTS.md | teststylearchtypes+2 | 81/100 | 3 days ago | |
| Significant-Gravitas/AutoGPT.github/copilot-instructions.md · 186k | Copilot instructions | setupbuildtestlint-format+10 | 88/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTAGENTS.md · 186k | AGENTS.md | teststylearchgit+1 | 87/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/AGENTS.md · 186k | AGENTS.md | setuptestarchtesting-strategy+3 | 77/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/backend/AGENTS.md · 186k | AGENTS.md | setuptestlint-formatstyle+9 | 81/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/backend/backend/copilot/graphiti/AGENTS.md · 186k | AGENTS.md | styleperformance | 66/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/frontend/AGENTS.md · 186k | AGENTS.md | setupbuildtestlint-format+7 | 96/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTclassic/CLAUDE.md · 186k | CLAUDE.md | setuptestlint-formatstyle+7 | 89/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTclassic/forge/CLAUDE.md · 186k | CLAUDE.md | teststylearchtypes+3 | 73/100 | 3 days ago | |
| Significant-Gravitas/AutoGPTclassic/original_autogpt/CLAUDE.md · 186k | CLAUDE.md | testarchuiperformance+2 | 90/100 | 3 days ago | |
| Significant-Gravitas/AutoGPT.claude/skills/vercel-react-best-practices/AGENTS.md · 186k | AGENTS.md | buildlint-formatstyledependencies+4 | 61/100 | 3 days ago |
Diff against autogpt_platform/frontend/src/tests/AGENTS.md Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against autogpt_platform/AGENTS.md Diff against autogpt_platform/backend/AGENTS.md Diff against autogpt_platform/backend/backend/copilot/graphiti/AGENTS.md Diff against autogpt_platform/frontend/AGENTS.md Diff against classic/CLAUDE.md Diff against classic/forge/CLAUDE.md Diff against classic/original_autogpt/CLAUDE.md Diff against .claude/skills/vercel-react-best-practices/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago |
