Agent-trials: Tool for Comparing Coding Agent Performance
Agent-trials is a tool that runs the same task suite across multiple coding agent CLIs, providing a scoreboard to compare performance, time, and resource usage.
Overview of agent-trials and its functionality
Agent-trials is a tool designed to run the same task suite across multiple coding agent CLIs, providing a scoreboard that indicates which agents passed, the time they took, and their resource usage. It helps developers compare the performance of different agent implementations in a standardized way. To get started, users can initialize a trials configuration with npx agent-trials init, which creates a trials.json file in their repository. The tool also supports direct installation from GitHub using npx github:princejain756/agent-trials. Once set up, users can run the task suite with agent-trials run --unsafe, which generates a report in TRIALS.md. The --unsafe flag is necessary when using built-in agents, as those configurations disable the agent's approval prompts.
Installation and setup process
To install and set up Agent-trials, use the command npx agent-trials init, which generates a trials.json file in your repository. The tool also supports direct installation from GitHub with npx github:princejain756/agent-trials. Once installed, you can initialize a test suite with agent-trials init, check installed agent CLIs with agent-trials doctor, and run the suite using agent-trials run --unsafe. The --unsafe flag is required when using built-in agents, as these configurations disable the agent's approval prompts. Additional flags like --jobs, --out, and --json allow customization of parallelism, output format, and result storage. Unknown or improperly formatted flags will cause the run to fail with an error message, ensuring strict adherence to command-line conventions.
Execution and configuration details
The agent-trials tool provides a structured approach to running smoke tests for coding agent CLIs. To initialize a test suite, users can run agent-trials init, which sets up a starter configuration. The agent-trials doctor command lists installed agent CLIs, helping users verify their environment. When executing tests, the --unsafe flag is required for built-in agents, as these agents disable their own approval prompts by default. Each test cell operates by copying the user's repository (excluding node_modules, .git, and secret-looking files) into a temporary working directory. An optional setup command runs once, followed by the agent executing headless on the task prompt with timeout guards and a minimal environment. Checker paths are restored from the original repository to prevent agents from rewriting their own tests. The verify command runs in the working copy, and a successful exit code (0) indicates a pass. Additional flags like --jobs, --out, and --json allow customization of parallelism, output format, and result storage.
Security and environment considerations
Security and environment considerations are critical when running agent-trials, as the tool executes agent CLIs in isolated environments. By default, agent CLIs receive only a limited set of environment variables, including PATH, HOME, SHELL, TERM, LANG, LC_ALL, TMPDIR, and TZ Hacker News Show. This restriction helps prevent unintended access to sensitive system information. However, if an agent CLI requires additional variables, they must be explicitly added, as the tool does not automatically inject them Hacker News Show. For security, the tool also requires the --unsafe flag to bypass certain restrictions, such as redefining built-in names or passing bypass flags Hacker News Show. This ensures that only explicitly allowed behaviors are permitted, reducing the risk of unintended or malicious behavior during testing.
Testing and verification improvements
The Agent-trials suite improves testing and verification by addressing flaws in earlier implementations. Previously, the slug-test checker relied on the agent's own test file and its exit code, which allowed a test file with console.log("ok") to pass without actually producing a deliverable. This flaw has been corrected by requiring at least three real assertions and independently verifying slugify against the agent's lib.js. As a result, a do-nothing agent that previously passed now fails, while a correctly implemented test still passes. These changes ensure more rigorous validation of agent behavior and output, reducing the risk of false positives in testing. The improvements are based on observations from multiple test runs, highlighting the importance of independent verification in agent CLI testing.
Sources and reporting notes
Based on published source material. No independent hands-on testing is claimed.