Skip to main content
A task tells the agent what to accomplish and tells the platform how to score the attempt. Both halves live on the task itself, so every environment that runs it is measured the same way.

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 call acme.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 by weighted_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
The two compose, and the rule of thumb is simple: init files put bytes in place (a starter repo, fixtures, a docs bundle), while init commands execute setup (install dependencies, build, seed data). Use them together to start the agent from a realistic state, like a half-finished app that needs your product integrated — and keep this setup out of the instruction so you measure the task, not the plumbing.

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. Run tpc 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:
An environment.json declares the agent config:
One command reconciles the directory with your product and queues runs: it reuses a matching task and environment, updates them if the files changed, and creates them if they’re new — so running it again never makes duplicates. Omit 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.