Drafts
What you change in an agent is kept as a draft as you type, shared by everyone in the workspace. Callers hear the published version until somebody presses Publish; Discard goes back to it. Published versions are kept in the agent’s Settings → Versions → History, where one can be brought back into the draft. If the published agent changed after the draft was started (somebody else, or the API), Publish says so first. The agent’s knowledge, its success rules and the switches of its calendar and CRM are not part of the draft: they are saved at once. Three things can run the draft:- Test, next to Publish: choose Draft or Published and talk to it.
- A phone number: in the agent’s Phone tab, set a number to Draft and call it. Use a number only your team knows.
- Your app: add
environment=stagingto the voice socket.
"environment": "staging" in their metadata.
Tests
In the agent’s Tests tab, a simulated caller talks to the agent by text and each call is checked against what you expect. A test is:- The caller: who they are and what they want, in your words.
- It passes when: up to 12 checks, each judged on its own with a reason.
- Its call: whether they call or the agent does, the data it brings, and whether nobody picks up a transfer.
- What tools answer, in that test only. Any other tool answers
ok. Nothing is booked, sent or transferred. - Longest call: 2 to 30 turns, 12 unless you change it.
What it costs
A test is billed by its tokens: about $0.04 with the default model, more with a dearer one or long instructions. Next to **Run all** is what running them all is expected to cost, and next to each result what it did. A run has up to 40 tests, and one expected to cost more than $10 asks first. A test stops at $2, and a run that reaches what it may cost leaves the rest not played, and says so.API
Tests can be written through the Agents API too. A test’scall.script is what the caller says first, word for word, one turn each.
agents:write. Leave out test_ids to run them all. max_usd is the most the run may cost; a run expected to cost more answers 409 tests.run_limit and runs nothing. Results appear in the dashboard as each test ends, each with its cost_usd.