Skip to main content
pip install whileai puts a whileai command on your path. Everything else is Python.

Sign in

The command prints a link and waits for you to approve it in the browser. Then it saves a key on this machine. --no-browser prints the link only, --no-wait returns at once so you can run it again to finish, --name labels the key on your account (default cli <host>). No browser at all, for example on a server:
That creates the account and saves its key in one step.

Which key is in use

The SDK resolves a key in this order: an explicit api_key= argument, the WHILEAI_API_KEY environment variable, then the saved credentials from login or signup. status says which one won.

Write an eval harness

This writes five files into evals/ (change with --dir): the agent wrapper, a judge, a runner, a test that goes red in CI when the pass rate drops, and a README. The three flags point at the callable, the tool list and the system prompt as module:name. Leave them out and the command looks for them in the project. --force overwrites files that are already there. What the harness computes and how to read it is on the evals guide.

Read and promote what the platform tracks

The platform verbs a coding agent needs, as commands. Each is a thin call into whileai.platform.
All of them take --json to print the API’s JSON and --api-key to use a key other than the saved one. Errors exit 1 with the reason on stderr. verdict defaults to the latest run’s target behavior; --behavior picks another. live records a day of production traffic on the served version: how many replies, how many failed a check, the median latency and the spend, so the platform can compare production with the held-out score.
The old whileai purge command is gone. wai.purge_agent("name") and wai.delete_empty_datasets(max_rows=2) remain in Python, both with dry_run=True, until the ingest module is retired.