Add a ClawBench benchmark for Kernel MCP - #162
Open
rgarcia wants to merge 24 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The smoke task duplicated what the ClawBench arm already proves. Drop its task definition, runner, verifier, fixtures, and MCP config, and drop stale ignore entries nothing writes. Document only the ClawBench flow.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9e91f52. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this adds
This PR adds a reproducible benchmark for the browser-control tools exposed by
kernel-mcp-server.ClawBench supplies 129 real-website tasks and decides whether each task was completed by inspecting the browser request that represents submission. Its
clawbench-harbor-adaptCLI converts those task definitions into Harbor task directories: each contains atask.toml, the instruction, browser environment and runtime scripts, and the ClawBench verifier.Harbor supplies the experiment runner. For each task, it installs a stock agent (currently Claude Code and Codex), gives that agent the instruction and MCP configuration, runs the verifier, and writes both the reward and an Agent Trajectory Interchange Format (ATIF) JSON record of the agent's messages, tool calls, and observations.
We use Hypeman as Harbor's execution backend. Each trial gets one isolated Hypeman VM containing the selected agent, the ClawBench browser/evaluator runtime, Redis, and the locally built Kernel MCP server.
The benchmark compares Kernel MCP with a Playwright MCP control arm without changing the agent, model, task, judge, or browser. Both arms control the same pre-created stealth Kernel browser with no forced viewport. The control agent receives stock
@playwright/mcptools connected to that browser through ClawBench's credential-free CDP bridge; the Kernel arm receivesget_connection_contextandexecute_playwright_codefrom the local Kernel MCP build instead.How one trial runs
build-image.shcreates the reusable Hypeman image. Starting fromnode:22-bookworm-slim, it installs Bun, the repository dependencies, Redis,mcp-remote, Python, anduv; copies this checkout; builds the Next.js MCP server; installs its launch/wrapper scripts; and records the Git SHA as/opt/kernel-mcp-server/SOURCE_SHA.clawbench/run.shinvokes ClawBench'sclawbench-harbor-adaptCLI. The CLI emits an ordinary Harbor task directory containingtask.toml, the task instruction, ClawBench's browser/runtime assets, and its verifier.prepare-task.pyremoves the generated task's Playwright MCP entry, selects the source-pinned Hypeman image, registers the local Kernel MCP stdio wrapper, and extends task setup to start the local MCP server.execute_playwright_code. ClawBench scores the intercepted submission request, downloads the replay, deletes the browser, and writes the Harbor result directory.ClawBench remains responsible for task scoring and browser cleanup. The only additional diagnostic is
kernel_mcp_valid, which confirms that the agent used the local source build and the exact browser ClawBench created.Run it
Build the source-pinned trial image:
Run one task:
export CLAWBENCH_REPO=../ClawBench ./benchmarks/harbor/clawbench/run.sh codex \ v2-1134-chapter-finder-redcrossRun all 129 tasks with ten concurrent trials:
benchmarks/harbor/README.mddocuments credentials, model/version overrides, timeouts, and the Harbor result directory, including rewards, logs, the portable ATIF trajectory, and retained browser replay.Tool-description result
The first full-suite run showed that agents often used
execute_playwright_codewithout returning useful page state. We updated its description to ask for a relevant accessibility snapshot or compact result after every action, then reran the same 129-task suite with GPT-5.6 Luna:ariaSnapshot()callsThe Playwright MCP control scored 15/129 in the same three-arm run. These are one-attempt-per-task results, so they establish the benchmark and the direction of the tool-description change rather than a leaderboard claim.
Scope and validation
get_connection_contextandexecute_playwright_code; browser lifecycle, coordinate actions, and managed auth are unavailable to the agentbun test— 249 passed