Create an agent
create_agentSave an agent. Then call route_number so a number answers with it, or pass its id as agent_id to place_call.
Instructions
Save an agent. Then call route_number so a number answers
with it, or pass its id as agent_id to place_call.
``system_prompt`` is what the agent follows. ``first_message`` is
spoken after the AI line; omit it to let the caller speak first.
``ai_disclosure_line`` replaces the workspace AI line for this
agent; ``{org}`` becomes the organization name. ``language`` is a
lowercase ISO 639-1 code. ``max_duration_seconds`` is 60..3600.
``handover_max_duration_seconds`` (60..3600, default 1800) is the
call limit once a handover contact answers.
``handover_contacts``: People the agent may hand a live call to:
``[{contact_id, note}]`` (max 10; ``note`` 1-200 chars says when to
hand over). ``contact_id`` is an id from ``list_contacts``: a
contact's uuid, or ``member:<user id>`` for a team member. The
person needs a phone number. The agent never sees it.
Returns the API's ``AgentResponse`` as a dict, or
``{"error": "<message>"}``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| tools | No | ||
| language | No | ||
| voice_id | No | ||
| sms_enabled | No | ||
| ai_disclosure | No | ||
| first_message | No | ||
| system_prompt | Yes | ||
| voice_enabled | No | ||
| handover_contacts | No | ||
| recording_enabled | No | ||
| ai_disclosure_line | No | ||
| max_duration_seconds | No | ||
| handover_max_duration_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||