OmniDim Logo

    Agent

    The Agent module allows you to create, retrieve, update, and delete AI voice agents. These agents can handle calls, respond to user queries, and perform actions based on your configuration.

    Overview

    Agents are at the core of the OmniDimension platform. They represent AI voice assistants that can:

    • Answer phone calls and engage in natural conversations
    • Access knowledge bases to provide accurate information
    • Integrate with external services via API calls
    • Extract important information from conversations
    • Perform post-call actions like sending emails or updating CRMs

    List Agents

    Get all agents for the authenticated user with pagination support.

    Parameters

    page
    int
    Optional

    Page number for pagination (default: 1)

    page_size
    int
    Optional

    Number of items per page (default: 30)

    Example

    1 2 3 4 5 6 from omnidimension import Client client = Client(api_key) # List all agents with pagination response = client.agent.list(page=1, page_size=10) print(response)

    Get Agent

    Get details of a specific agent by ID.

    Parameters

    agent_id
    string
    Required

    The ID of the agent to retrieve

    Example

    1 2 3 4 5 6 7 from omnidimension import Client client = Client(api_key) # Get details of a specific agent agent_id = "your_agent_id_here" response = client.agent.get(agent_id) print(response)

    Create Agent

    Create a new agent with the provided configuration.

    Parameters

    name
    string
    Required

    Name for the agent

    welcome_message
    string
    Required

    Initial message the agent will say when answering a call

    context_breakdown
    list
    Required

    List of context breakdowns, each containing 'title', 'body' and 'is_enabled'.

    call_type
    string
    Optional

    call type of an assistant

    Options:
    Incoming
    Outgoing
    transcriber
    dict
    Optional

    Configuration for the speech-to-text transcriber

    model
    dict
    Optional

    Configuration for the language model

    voice
    dict
    Optional

    Configuration for the text-to-speech voice

    web_search
    dict
    Optional

    Configuration for web search capabilities

    post_call_actions
    dict
    Optional

    Configuration for actions to perform after a call

    filler
    dict
    Optional

    Configuration for filler phrases during processing

    Examples

    Example 1

    1 2 3 4 5 6 7 8 9 10 11 12 from omnidimension import Client client = Client(api_key) # Create a basic agent response = client.agent.create( name="Customer Support Agent", welcome_message="Hello! I'm your customer support assistant. How can I help you today?", context_breakdown=[ {"title": "Purpose", "body": "This agent helps customers with product inquiries and support issues."} ] ) print(response)

    Example 2

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 from omnidimension import Client client = Client(api_key) # Create an agent with full configuration response = client.agent.create( name="Advanced Support Agent", welcome_message="Hello! I'm your advanced support assistant. How can I help you today?", context_breakdown=[ {"title": "Purpose", "body": "This agent helps customers with product inquiries and support issues."}, {"title": "Products", "body": "Our product line includes smartphones, tablets, and accessories."} ], transcriber={ "provider": "deepgram_stream", "model": "nova-3", "silence_timeout_ms": 400 }, model={ "model": "gpt-4o-mini", "temperature": 0.7 }, voice={ "provider": "eleven_labs", "voice_id": "JBFqnCBsd6RMkjVDRZzb" }, web_search={ "enabled": True, "provider": "DuckDuckGo" }, post_call_actions={ "email": { "enabled": True, "recipients": ["support@example.com"], "include": ["summary", "extracted_variables"], "extracted_variables": [ { "key": "customer_issue", "prompt": "Identify the main issue the customer is experiencing..." }, { "key": "product_mentioned", "prompt": "Identify any products mentioned in the conversation..." } ] }, "webhook": { "enabled": True, "url": "https://your-webhook-endpoint.com/omnidim-callback", "include": ["summary", "fullConversation"], "extracted_variables": [ { "key": "call_outcome", "prompt": "Determine the outcome of the call..." } ] } }, filler={ "enabled": True, "after_sec": 0, "fillers": ['let me check', 'one moment please'] } ) print(response)

    Update Agent

    Update an existing agent with new configuration values.

    Parameters

    agent_id
    string
    Required

    The ID of the agent to update

    data
    dict
    Required

    Dictionary containing the fields to update

    Example

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 from omnidimension import Client client = Client(api_key) # Update an existing agent agent_id = "your_agent_id_here" update_data = { "name": "Updated Support Agent", "welcome_message": "Hello! I'm your updated support assistant. How can I help you today?", "model": { "temperature": 0.8 } } response = client.agent.update(agent_id, update_data) print(response)

    Delete Agent

    Delete an agent by ID.

    Parameters

    agent_id
    string
    Required

    The ID of the agent to delete

    Example

    1 2 3 4 5 6 7 from omnidimension import Client client = Client(api_key) # Delete an agent agent_id = "your_agent_id_here" response = client.agent.delete(agent_id) print(response)