Agents
List and create voice agents with the SDK.
Agents are the conversational personas that run your calls.
List agents
const agents = await voice.agents.get();agents = client.agents()Create an agent
const agent = await voice.agents.create({
name: "Sales Outreach Bot",
systemPrompt: "You are a friendly sales assistant. Keep replies short.",
callingProvider: "local_voice",
language: "en",
model: "gpt-4o-realtime-preview",
temperature: 70,
voiceId: "alloy",
ttsVoice: "af_heart",
toolIds: ["tool_19ja0s"],
});agent = client.create_agent(
name="Sales Outreach Bot",
system_prompt="You are a friendly sales assistant. Keep replies short.",
calling_provider="local_voice",
language="en",
model="gpt-4o-realtime-preview",
temperature=70,
voice_id="alloy",
tts_voice="af_heart",
tool_ids=["tool_19ja0s"],
)Parameters
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the agent. |
systemPrompt / system_prompt | string | Yes | Core persona and behavior directive. |
callingProvider / calling_provider | string | Yes | Calling provider — local_voice or ultravox. |
language | string | Yes | Language code, e.g. en. |
model | string | Yes | Real-time LLM, e.g. gpt-4o-realtime-preview. |
temperature | integer | Yes | Sampling temperature, 0–100 (default 70). |
voiceId / voice_id | string | Yes | Voice profile identifier (e.g. alloy). |
ttsVoice / tts_voice | string | Yes | Text-to-speech voice name (e.g. af_heart). |
toolIds / tool_ids | string[] | Yes | Tool identifiers the agent may invoke mid-call. |
firstMessage / first_message | string | No | Opening line the agent speaks first. |