Skip to content

Add OpenCode CLI-backed agent runner for AssetOpsBench#409

Merged
DhavalRepo18 merged 1 commit into
mainfrom
opencode_agent
Jun 24, 2026
Merged

Add OpenCode CLI-backed agent runner for AssetOpsBench#409
DhavalRepo18 merged 1 commit into
mainfrom
opencode_agent

Conversation

@ChathurangiShyalika

Copy link
Copy Markdown
Collaborator

Summary

This PR adds an opencode-agent runner so AssetOpsBench can evaluate OpenCode as a CLI-based agent alongside the existing SDK-backed agents.

What Changed

  • Added a new agent.opencode_agent package with:

    • OpenCodeAgentRunner
    • opencode-agent CLI entry point
    • OpenCode runtime config generation
    • OpenCode JSON event parsing into AssetOpsBench trajectories
    • Trajectory persistence through the existing AGENT_TRAJECTORY_DIR flow
  • Registered the new CLI command:

opencode-agent = "agent.opencode_agent.cli:main"
  • Added opencode_agent as a supported benchmark method in scenario_suite_runner.

  • Configured OpenCode MCP access to the existing AssetOpsBench MCP servers

Usage

Run OpenCode directly:

uv run opencode-agent \
  --model-id tokenrouter/MiniMax-M3 \
  --show-trajectory \
  "What is the current time?"

Run through the benchmark suite:

uv run python -m benchmark.scenario_suite_runner \
  --scenario-ids benchmarks/scenario_suite/scenarios.txt \
  --scenario-root /path/to/scenarios_data \
  --agent_name opencode_agent \
  --model-id tokenrouter/MiniMax-M3

Testing

Unit tests:

.venv/bin/pytest src/agent/opencode_agent/tests/test_runner.py

Result:

11 passed

CLI smoke test:

.venv/bin/opencode-agent --help

Manual benchmark check:

Ran scenario 401 with tokenrouter/MiniMax-M3

OpenCode produced a trajectory and report
Final answer matched the ground truth: C

Signed-off-by: Chathurangi Shyalika <chathurangishyalika@Chathurangis-MacBook-Pro.local>
@DhavalRepo18 DhavalRepo18 merged commit 9e564ce into main Jun 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants