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.
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 |