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

FieldTypeRequiredDescription
namestringYesDisplay name for the agent.
systemPrompt / system_promptstringYesCore persona and behavior directive.
callingProvider / calling_providerstringYesCalling provider — local_voice or ultravox.
languagestringYesLanguage code, e.g. en.
modelstringYesReal-time LLM, e.g. gpt-4o-realtime-preview.
temperatureintegerYesSampling temperature, 0100 (default 70).
voiceId / voice_idstringYesVoice profile identifier (e.g. alloy).
ttsVoice / tts_voicestringYesText-to-speech voice name (e.g. af_heart).
toolIds / tool_idsstring[]YesTool identifiers the agent may invoke mid-call.
firstMessage / first_messagestringNoOpening line the agent speaks first.

On this page