Skip to content
TriedDocs
Voice agents

Create agent from template

Build a ready-to-test agent from a template with your business name, facts, calendar and transfer number.

POSThttps://api.tried.com.au/create-agent-from-template

Creates a conversation flow (or a single prompt LLM) from a template and an agent that uses it. This is what Quick setup on Home calls. Needs an admin or developer. See Agent templates and quick setup.

Without calendar, booking templates get sample functions that return made-up times, so test calls work before you connect anything.

Request#

Body#

Field Type Required Description
template_id string Yes A template id from List agent templates.
kind string No flow (default) for a conversation flow with sticky notes, or single for one prompt with the same content.
business_name string No Up to 80 characters. The agent is named <persona> at <business_name>.
business_description string No A few words about the business, up to 200 characters.
facts string[] No Up to 30 facts the agent may use: hours, services, prices, policies. Replaces the template's examples.
website string No A URL. When business_name or facts is missing, the site is read for them, as in Scan business site.
transfer_number string No E.164 number for transfers, for example +61290000000.
voice_id string No Voice for the agent. Default: the template's voice.
calendar object No How bookings work. See below.

calendar#

type Other fields What the agent does
sample None Sample functions with made-up times. The default.
request None Notes the time the caller wants. Your team confirms it.
cal_com booking_email (required), and app_id or api_key, optional event_type_id Checks and books real times in Cal.com. booking_email is the attendee email on every booking, so callers are never asked for one.
calendly booking_email (required), and app_id or access_token, optional event_type_uri Checks free times in Calendly and books them under booking_email (needs a paid Calendly plan).

With api_key or access_token, a new app is created. Without an event type, the first one on the account is used.

Example request#

curl -X POST "https://api.tried.com.au/create-agent-from-template" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template_id": "dental",
  "business_name": "Sunny Smiles Dental",
  "facts": ["Open Monday to Friday, 8am to 6pm, and Saturday mornings.", "A check-up and clean is 220 dollars."],
  "transfer_number": "+61290000000",
  "calendar": { "type": "request" }
}'
const res = await fetch("https://api.tried.com.au/create-agent-from-template", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    template_id: "dental",
    business_name: "Sunny Smiles Dental",
    transfer_number: "+61290000000",
    calendar: { type: "request" },
  }),
});
const agent = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/create-agent-from-template",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "template_id": "dental",
        "business_name": "Sunny Smiles Dental",
        "transfer_number": "+61290000000",
        "calendar": {"type": "request"},
    },
)
agent = res.json()

Response#

201 Created with the new agent plus:

Field Type Description
template_id string The template used.
booking_mode string or null sample, request, cal_com or calendly; null for templates without bookings.
site object or null What was read from website, in the shape Scan business site returns.
next_steps string[] What to do before the agent takes real calls, for example replacing sample functions.

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.