Skip to content

armgit / agtx

Public Imported from GitHub
0

πŸ„πŸΌβ€β™‚οΈ The blackboard for coding agents - agentic development environment for claude code, codex, cursor, opencode, grok and more.

feat: add hard benchmark mode (#110)

Fynn Fluegge0a70851785e9
diff --git a/README.md b/README.md
index a98c364..2867f5d 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
<a href="#quick-start">Quick Start</a> β€’
<a href="#features">Features</a> β€’
<a href="#usage">Usage</a> β€’
- <a href="#brainstorm--sweep-skills">Brainstorm & Sweep Skills</a> β€’
+ <a href="#brainstorm--sweep-skills">Skills</a> β€’
<a href="#mcp-server">MCP Server</a> β€’
<a href="#plugins">Plugins</a> β€’
<a href="#orchestrator-agent-experimental">Orchestrator</a> β€’
@@ -669,11 +669,11 @@ The orchestrator communicates with agtx through the [Model Context Protocol (MCP
6. Escalated tasks show a `⚠` badge on the kanban board; opening the task popup shows the reason and dismisses the flag
7. MCP registration is cleaned up when the orchestrator is stopped
-## Benchmarks
+## Benchmark
agtx includes a [SWE-bench Lite](https://www.swebench.com) benchmark runner that uses agtx itself as the agent orchestration layer β€” driving coding agent workflows against 300 real GitHub bug-fix tasks via the MCP server.
-See **[benchmarks/README.md](benchmarks/README.md)** for setup, usage, bundled configs, and evaluation instructions.
+See **[benchmark/README.md](benchmark/README.md)** for setup, usage, bundled configs, and evaluation instructions.
## Contributing
diff --git a/benchmark/README.md b/benchmark/README.md
index 0b6ff25..cfccb92 100644
--- a/benchmark/README.md
+++ b/benchmark/README.md
@@ -132,6 +132,14 @@ uv run --project benchmarks/swebench \
--output-dir swebench_output/agtx_claude_20260427_120000
```
+**Hard mode** (prose only β€” no code blocks or stack traces):
+```bash
+uv run --project benchmarks/swebench \
+ python benchmarks/swebench/benchmark.py \
+ --config benchmarks/swebench/configs/claude-agtx.toml \
+ --hard
+```
+
Alternatively, activate the venv directly for a shorter prompt:
```bash
source benchmarks/swebench/.venv/bin/activate
@@ -154,6 +162,7 @@ deactivate
| `--model-name STRING` | `agtx-{plugin}-{agent}` | Label in predictions.jsonl |
| `--split STRING` | `test` | HuggingFace dataset split |
| `--verbose` / `-v` | off | Print step-by-step progress to stderr (good for debugging) |
+| `--hard` | off | Strip fenced code blocks and stack traces from the problem statement, keeping prose and inline code. The agent must find and fix the bug from first principles. |
---
diff --git a/benchmark/swebench/benchmark.py b/benchmark/swebench/benchmark.py
index a7582cb..e8ab9cd 100755
--- a/benchmark/swebench/benchmark.py
+++ b/benchmark/swebench/benchmark.py
@@ -626,6 +626,27 @@ class TaskRunner:
"Then stop and wait."
)
+ NOTE = (
+ "Note: the repo may not be fully installable in this environment. "
+ "Do not attempt to build, install, or run tests. "
+ "Do not run any git commands (no fetch, pull, merge, or commit). "
+ "Read the source code, understand the bug, and fix it by editing the relevant files directly."
+ )
+
+ @staticmethod
+ def _strip_code(problem_statement: str) -> str:
+ """Remove fenced code blocks and inline code, keep prose."""
+ # Remove fenced code blocks (``` ... ```)
+ text = re.sub(r"```.*?```", "", problem_statement, flags=re.DOTALL)
+ # Collapse runs of blank lines left behind
+ text = re.sub(r"\n{3,}", "\n\n", text)
+ return text.strip()
+
+ def _build_description(self, problem_statement: str) -> str:
+ if self.hard:
+ return self._strip_code(problem_statement) + "\n\n---\n" + self.NOTE
+ return problem_statement + "\n\n---\n" + self.NOTE
+
def __init__(
self,
instance: dict,
@@ -638,6 +659,7 @@ class TaskRunner:
phase_timeout: int,
verbose: bool = False,
smoke_test: bool = False,
+ hard: bool = False,
):
self.instance = instance
self.instance_id = instance["instance_id"]
@@ -650,6 +672,7 @@ class TaskRunner:
self.phase_timeout = phase_timeout
self.verbose = verbose
self.smoke_test = smoke_test
+ self.hard = hard
self.mcp: McpClient | None = None
def _poll_transition(self, request_id: str, timeout: int = 120) -> None:
@@ -737,14 +760,7 @@ class TaskRunner:
if self.smoke_test:
description = self.SMOKE_TEST_DESCRIPTION
else:
- description = (
- problem
- + "\n\n---\n"
- + "Note: the repo may not be fully installable in this environment. "
- + "Do not attempt to build, install, or run tests. "
- + "Do not run any git commands (no fetch, pull, merge, or commit). "
- + "Read the source code, understand the bug, and fix it by editing the relevant files directly."
- )
+ description = self._build_description(problem)
task_resp = self.mcp.call(
"create_task",
title=self.instance_id,
@@ -915,6 +931,7 @@ class BenchmarkOrchestrator:
concurrency: int,
verbose: bool = False,
smoke_test: bool = False,
+ hard: bool = False,
):
self.instances = instances
self.agtx_bin = agtx_bin
@@ -929,6 +946,7 @@ class BenchmarkOrchestrator:
self.concurrency = concurrency
self.verbose = verbose
self.smoke_test = smoke_test
+ self.hard = hard
def _run_one(self, instance: dict, progress: tqdm) -> None:
instance_id = instance["instance_id"]
@@ -984,6 +1002,7 @@ class BenchmarkOrchestrator:
phase_timeout=self.phase_timeout,
verbose=self.verbose,
smoke_test=self.smoke_test,
+ hard=self.hard,
)
result = runner.run()
kill_tmux_session(slug, repo_path)
@@ -1128,6 +1147,13 @@ other agtx project settings. Example:
help="Replace task description with a trivial prompt (create artifact files and stop). "
"Use to verify the full pipeline works without spending tokens on real coding work.",
)
+ parser.add_argument(
+ "--hard",
+ action="store_true",
+ dest="hard",
+ help="Strip code blocks and stack traces from the problem statement, keeping only the prose. "
+ "The agent must find and fix the bug from first principles.",
+ )
args = parser.parse_args()
# Load and validate config
@@ -1184,6 +1210,7 @@ other agtx project settings. Example:
concurrency=args.concurrency,
verbose=args.verbose,
smoke_test=args.smoke_test,
+ hard=args.hard,
)
orchestrator.run()