Skip to content
TriedDocs
Voice agents

Generate agent

Draft a new agent and LLM from a plain-language description.

POSThttps://api.tried.com.au/generate-agent

Writes a prompt, welcome message and name from your description, then creates a LLM with that prompt and an end_call tool, and a new agent that uses it. This is the dashboard's generate-from-prompt option.

The prompt follows the house structure: role, dynamic variables, core behaviours, opening, numbered call paths, business information, functions, unclear audio and errors, ending a call, and guardrails. It uses only facts from your description. Details callers usually ask about that the description does not give (staff, hours, address, services, common questions) are written as [ADD: ...] lines, and the agent offers to take a message instead of guessing until you replace them. The prompt editor highlights these lines.

Request#

Body#

Field Type Required Description
description string Yes What the agent should do. 10 to 4000 characters.
voice_id string No Voice for the new agent. Default: the agent default.

Example request#

curl -X POST "https://api.tried.com.au/generate-agent" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments."
}'
const res = await fetch("https://api.tried.com.au/generate-agent", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments."
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/generate-agent",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "description": "A receptionist for Bright Dental in Sydney that books and reschedules appointments.",
    },
)
data = res.json()

Response#

201 Created with the new agent (version 0).

Errors#

Status When
400 Validation failed.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the agents scope.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.