Create an agent
create_agentSave an agent for calls, texts, and email replies.
The saved instructions and enabled channels apply when a number or email address routes to this agent. Saving the agent does not change existing routing. The call agent can hand over to listed contacts without seeing their phone numbers.
Without a voice override, the built-in providers use the deployment's configured voice. A workspace provider uses its configured voice or its own default. An omitted language uses the speech providers' defaults (English). Without a tool list, the workspace's channels determine the available tools. The workspace call limit applies unless overridden, and the handover limit defaults to 30 minutes from the contact answering.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"system_prompt": "<system_prompt>"
},
"name": "create_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Agent display name. | |
| tools | No | Names of the tools the agent may use during a call or reply. Omitted: every tool the workspace's channels support. An empty list: none, except that a call keeps the tools every call needs (end_call, send_dtmf and Hail's settings guide). HTTP tools stay on. Hail adds call transfer when handover contacts are configured. | |
| language | No | Spoken language on calls, such as ``es`` for Spanish. | |
| voice_id | No | Text-to-speech voice ID: one of Hail's voices, or a voice from the provider of the workspace's own speech key. Any other voice is refused. | |
| knowledge | No | Whether this agent answers calls, texts and email from the workspace's knowledge base (``add_knowledge_document``). Needs the knowledge base turned on for the workspace by Hail support. | |
| llm_model | No | The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics. | |
| http_tools | No | Up to ten customer APIs the agent may call during calls, texts and email. Each entry: ``name`` (letters, digits, _), ``description`` (read by the model), ``url`` (public https), optional ``parameters`` (JSON Schema, type object), ``headers`` (static, stored encrypted, returned as names only), ``timeout_seconds`` (1 to 10, default 5) and ``wait_message`` (said on a call while waiting). The list replaces the saved one; an empty list removes it. On update, an entry without ``headers`` keeps the saved headers of the same name while the url keeps its host; a url on a new host needs ``headers`` again. The first save returns ``http_tool_secret`` once; requests carry ``X-Hail-Signature`` signed with it. | |
| sms_enabled | No | Whether this agent answers texts on numbers whose texts route to it. | |
| ai_disclosure | No | Speak the AI disclosure line first on every call. | |
| email_enabled | No | Whether this agent replies to mail on addresses routed to it. | |
| first_message | No | Greeting spoken after the AI disclosure, as written, except that a hello the disclosure already said is usually left out (not on a customer's own model, workspace or per call). Without one, an inbound agent waits for the caller. | |
| system_prompt | Yes | Instructions that define the agent's behavior on calls, texts and email replies. | |
| voice_enabled | No | Whether this agent answers calls on numbers whose calls route to it. | |
| handover_contacts | No | Up to ten ``{contact_id, note}`` entries for people a call can be handed over to. ``contact_id`` is an ID from ``list_contacts``, ``lookup_contact`` or ``create_contact`` (a UUID or ``member:<user_id>``); the contact needs a phone number. ``note`` (1 to 200 characters) says when the agent hands over to that person, such as ``billing questions``. | |
| integration_tools | No | Tools of the workspace's connected tools to turn on for this agent, for example zendesk_find_tickets, zendesk_create_ticket and zendesk_update_ticket. Separate from ``tools``. They work once the integration is connected in the console (Integrations). | |
| recording_enabled | No | Recording preference for this agent's calls, overriding the workspace setting. | |
| ai_disclosure_line | No | Custom AI disclosure line replacing the workspace line. ``{org}`` expands to the organization name. | |
| max_duration_seconds | No | Longest a call with this agent may last, in seconds, counted from pickup. At the limit the agent says goodbye and hangs up. | |
| handover_max_duration_seconds | No | Longest a call may last after a handover contact answers, in seconds, counted from that answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||