A tool has a draft you edit and immutable published versions that calls run. Three endpoints take a draft to production:

Test run

Runs the draft once with the arguments you supply and reports every step. Nothing is saved, no webhook fires, and nothing is billed — but http and code operations execute for real: a tool that books a slot books one.

Request

The phone keys of system_vars resolve empty: there is no call. Operations that need a live conversation are simulated — say, generate_reply, add_message, end_call, handoff, transfer, send_dtmf and frontend_rpc report their resolved config instead of acting. Nobody’s phone rings. A background_execution operation runs in line so you can see it, without publishing. The whole run is capped at 60 seconds.

Response

Each step:
  • path is the operation’s index, joined to its parent by .then. or .else.: 1.else.0 is the first operation in the else of the second.
  • status is ok, failed or simulated.
  • detail is per kind: http has request and response, code has logs and result, if has both resolved sides, op and the branch taken, a simulated kind has its resolved config.
  • published is what the step wrote — the fastest way to find a path one level too deep. Secret values are redacted everywhere.

Error types

In the dashboard, Test opens a panel with Arguments, User Data and Variables and a Run tool button; the run uses your browser’s timezone. The flowchart marks each operation as succeeded, failed, simulated or not reached.

Validate

Errors block publish; warnings do not. The full list of template rules is in templating and data; the tool-level rules are in the overview. TypeScript is compiled during validation, so a code operation that does not compile is an error here.

Publish

Publish validates first. On any error nothing is published and you get a 400 whose errors lists every problem. A tool with no operations is refused. The version freezes the name, description, json_schema, the three flags and the tree, plus the compiled JavaScript of each code operation. silent is frozen as your flag or the silence derived from the tree; the draft keeps your own flag. Versions count up from 1 and are never reused.

Versions and rollback

Rollback discards unpublished draft edits and creates no new version. Agents that pinned another version keep running it until they are republished.

The pin rule

  1. A tool with no published version cannot be attached to an agent.
  2. Publishing an agent pins, for each attached tool and lifecycle hook, the tool version published at that moment.
  3. Publishing the tool again changes nothing on live calls until the agent is published again.
So the fix loop for a tool a live agent uses is: edit, run, publish the tool, then publish the agent. An agent’s draft follows the tool’s current published version. Agent tasks never pin: every task run uses each tool’s current published version.

Next

Agent versions

Publishing and pinning from the agent’s side.

When a tool fails

Reading a failure on a live call.