upsert_agent
Create a new voice AI agent or update an existing one by matching on name. Supply system prompt and optional voice to configure agent behavior.
Instructions
Create or update a voice AI agent. If an agent with the given name exists, it will be updated. Otherwise, a new agent is created with sane defaults.
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": "upsert_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Agent name (used for upsert matching) | |
| voice | No | Voice ID from list_voices (e.g., "alloy", "coral"). If omitted on create, defaults to "alloy". If omitted on update, preserves current voice. | |
| agent_id | No | Explicit agent ID to update directly. If provided, skips name-based matching. Use list_agents to find agent IDs. | |
| system_prompt | Yes | System prompt defining the agent's behavior |