Skip to main content

What is an Agent?

An Agent is a reusable voice persona you define once at the business level and trigger for any customer at notification time. Agents give you full control over:
  • The AI’s personality, tone, and scope
  • The conversation flow via a system prompt
  • Structured data extracted from the call via output_schema
  • Dynamic content injected per-call via {{variable}} placeholders
Agents are shared across all your projects. You create them once, then reference them by agent_id in any notification request.

Creating an Agent

Fields


Triggering a Notification with an Agent

Once your agent is created, pass its id as agent_id along with a customer_id and any custom variables:
recipient_first_name is a built-in variable — Echo resolves it automatically from the customer record. You don’t need to pass it in variables.

What happens behind the scenes

1

Auth + resolution

Echo validates your API key and resolves your project, business, customer, and agent.
2

Variable map construction

Echo builds a variable map: built-in variables (business name, recipient name, etc.) are populated first, then your variables map is merged in. Caller-provided values override built-ins if they share the same key.
3

Prompt rendering

Every {{token}} in the agent’s system_prompt is replaced with the resolved value.
4

Call initiation

Echo places the outbound call using the rendered prompt.
5

Result delivery

When the call ends, Echo extracts structured data using your output_schema, updates the notification record, and POSTs a signed call.completed event to your webhook URL.

Structured Output with output_schema

output_schema is a JSON Schema object. Echo uses it to extract structured data from the call transcript after the conversation ends.
The extracted data is stored in notification.call_result and included in the outbound webhook payload:
Write clear, specific description fields on each property — Echo uses them to understand what to extract from the transcript. Vague descriptions lead to vague extractions.
If no output_schema is defined, call_result will be null in both the notification record and the webhook payload.

Managing Agents

List all active agents

Get a specific agent

Update an agent (partial)

Only the fields you send are changed. Omitted fields are left unchanged.

Disable an agent

Soft delete — sets status to "disabled". Disabled agents cannot be used in new notifications.

Agent vs LLM Path

See the LLM path guide if you want to send a notification without defining an agent.