Skip to content
TriedDocs
Build agents

Versions and environments

Publish frozen agent versions, keep several drafts, compare versions, and route calls through environment tags such as prod and staging.

Every agent has numbered versions. You edit a draft; publishing freezes it. Calls, phone numbers and API requests can target a specific version, the latest one, the latest published one, or an environment tag.

Drafts and published versions#

State Badge Editable
Draft Draft · V3 Yes
Published Published · V2 No. Published versions are read-only.

The header shows the version you are editing. Publish opens Publish version N? and freezes the draft as that version. Tried then creates a new draft (N + 1) with the same configuration for you to keep editing.

Publishing an agent also publishes its Retell LLM or conversation flow draft and pins the agent version to it, so a published agent version always runs the same prompt, tools and nodes. The API is Publish agent version.

Version history#

Version history in the header opens Versions and environments, with a Versions tab and an Environments tab.

The Versions tab lists every version with its tags, Published or Draft, and Editing on the one open in the builder. Each version's menu has:

Action What it does
Compare with Vn Opens a comparison with the version you are editing.
New draft from Vn Creates a new draft copied from that version. Several drafts can exist at once.
Point prod here Published versions only. Moves the prod tag to this version.
Delete draft Drafts other than the one you are editing.

A published version cannot be deleted, a version that a tag points at cannot be deleted, and an agent always keeps at least one version.

Compare versions#

Compare opens Compare versions. Pick a Base and Compare to version, then read:

  • Summary: changes in plain words, such as "Prompt edited (+212 characters)", "Added function: book_appointment", "Voice: "11labs-Adrian" to "11labs-Mia"".
  • JSON diff: every changed field path with its before and after values, labelled added, removed or changed.

The comparison covers the agent and its Retell LLM or conversation flow.

Compare versions summary
curl "https://api.tried.com.au/compare-agent-versions/agent_3f1c9a7b2d4e6f8091a2b3c4?base=prod&target=latest" \
  -H "Authorization: Bearer $TRIED_API_KEY"

base defaults to latest_published and target to latest.

Environments#

An environment tag is a named pointer to a published version. Each agent starts with two:

  • prod: points at the latest published version when tags are first created. It cannot be deleted.
  • staging: points at nothing.

A tag that points at nothing follows the latest published version. A tag that points at a version stays there until you move it; publishing a new version does not move it.

Add more tags in the Environments tab, up to 10 per agent. Tag names are lowercase letters, numbers, - and _, start with a letter, and are at most 32 characters, for example canary.

Environments tab with prod and staging tags

Roll back#

Move a tag to an older published version to roll back. Calls that use the tag switch immediately. Tags can only point at published versions.

Variables per environment#

Each tag has Dynamic variables for calls that use this tag. Use them for values that differ between environments, such as an API base URL or a test calendar ID. They rank above the agent's defaults and below contact fields and per-call values. See Dynamic variables.

Version references#

Anywhere a version is chosen, you can pass a reference instead of a number:

Reference Resolves to
3 Version 3
latest The newest version, which is usually a draft
latest_published The newest published version
prod, staging or any tag The tag's version, and the tag's variables are applied
Where Field
Create phone call override_agent_version
Create web call agent_version
Register phone call agent_version

A call that does not name a version uses the agent's latest version, including an unpublished draft. Pin production traffic to prod or a published version.

Bind a phone number to a version#

On Phone Numbers, a number's Agent version section sets the version reference for Inbound calls and Outbound calls on that number. "Inbound and outbound calls on this number use the bound version."

curl -X PUT "https://api.tried.com.au/phone-number-bindings/%2B61355505030" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "inbound_version_ref": "prod", "outbound_version_ref": "staging" }'

A version set explicitly on the call request takes priority over the binding. On inbound calls, an agent_version set on the number's inbound agent list also takes priority.

Phone number version binding

API#

Action Endpoint
List versions with tags GET /agent-versions/{agent_id}
Create a draft POST /create-agent-version/{agent_id} with optional base_version (number or reference)
Edit a specific draft PATCH /agent-versions/{agent_id}/{version}
Delete a draft DELETE /agent-versions/{agent_id}/{version}
Publish POST /publish-agent-version/{agent_id}
Compare GET /compare-agent-versions/{agent_id}?base=&target=
Resolve a reference GET /resolve-agent-version/{agent_id}?ref=
Tags GET, POST /agents/{agent_id}/tags; PATCH, DELETE /agents/{agent_id}/tags/{name}
Number bindings GET, PUT /phone-number-bindings/{phone_number}