Declare the CLI’s version and installation method
First spell out on the Agent which CLI, which version, and how to install it. For a Node.js CLI, usecreateNpmCliInstaller. The code below connects the npm package my-agent@1.0.0 to a custom Adapter:
my-agent run --json outputs a JSON object compatible with OpenAI Responses. turnFromResponses converts its output and usage into a NiceEval Turn. When the CLI outputs another format, replace this line with your own mapping to events, status, and usage; see Write send.
- Write the CLI’s exact version in
identity.version, notlatest. When the version changes silently, two eval runs are not comparing the same Agent. - When the version stays the same but the installation steps change, raise
identity.revisionas well. setuponly writes auth and run configuration. Leave installation toinstaller, so the version is checked before every Attempt starts.- The text in
progressis shown in the terminal while checking, installing, and when ready.
Run it in an Experiment
Put the Agent and the Sandbox Provider in an Experiment:progress in turn. When the Sandbox already has the correct version, NiceEval uses it directly and skips installation. After the run, view results in the terminal with pnpm exec niceeval show, or in the browser with pnpm exec niceeval view.
An ordinary npm package requires Node.js and npm in the Sandbox. createNpmCliInstaller packs on the host, uploads, then runs npm install -g in the Sandbox. Only a platformPackage that bundles its own runtime does not need Node.js and npm.
Check installation failures
When installation or the post-install recheck fails, the Attempt becomeserrored in the agent.ensure phase, and the terminal gives its locator:
identity, the npm package, or the installation steps, run the original command again.
Choose another installation mode
When packing on the host and uploading does not suit your case,AgentInstaller has two other modes:
sandbox-network: let the Sandbox install the CLI over its own network. Use it only when the task explicitly allows this network access.verify-only: accept only an exact version preinstalled in the image. When the version is wrong, the Attempt reports an error directly without trying to install.
AgentInstaller. For the full fields, see the defineSandboxAgent reference.