Anatomy of a task
Writing instructions
Write instructions the way a real user would brief an agent — not the way you wish they would. The goal is to measure your product’s agent experience, so avoid embedding hints the average user wouldn’t provide:- Good: “Set up error tracking for this Express app using Acme.”
- Too helpful: “Install
@acme/sdk@2.1, then callacme.init()with the DSN from the dashboard.”
Goals and criteria
Each goal contains one or more criteria. A criterion has an evaluation type, a weight, and a max score. Goals are scored byweighted_average, binary, or percentage, against a passing threshold from 0–100.
Criteria are evaluated by one of:
Prefer deterministic checks (
file_exists, bash_command, script_judge) where possible — they’re cheaper and more reproducible. Reserve llm_judge for genuinely subjective criteria like “did the agent follow the documented approach?”
Sandbox setup
Init files and commands prepare the sandbox before the agent starts:- Zip upload — extract an archive into the sandbox (default target: the agent’s home directory)
- Git clone — clone a repository at a specific ref; private repos authenticate via a secret reference
- Init commands — run shell commands in order, each with a working directory and timeout
Secrets
Secrets are encrypted credentials scoped to your organization (or to a single environment). Reference them by name in a task and they’re injected as environment variables during the run — API keys never appear in the task definition or transcripts. Secrets are managed on environments — see Environments for the CLI workflow.Working with tasks from the CLI
Tasks are created from a JSON file. Runtpc sim spec to print the full contract; a minimal task.json looks like:
category is one of coding, research, documentation, or analysis. Don’t include a product field — the CLI injects your active product (set with tpc product switch).
Run a task from a directory
A task and the agent that attempts it can live together in a small, portable directory:environment.json declares the agent config:
environment.json (or pass --environment-id) to run against environments that already exist.
tpc sim task export <task-id> writes a directory in exactly this shape — including environment.json when the task has a single linked environment — so you can pull a task down, edit it, and run it anywhere.