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 number for pagination (default: 1)
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
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 for the agent
Initial message the agent will say when answering a call
List of context breakdowns, each containing 'title', 'body' and 'is_enabled'.
call type of an assistant
Configuration for the speech-to-text transcriber
Configuration for the language model
Configuration for the text-to-speech voice
Configuration for web search capabilities
Configuration for actions to perform after a call
Configuration for filler phrases during processing
List of languages the agent should support. Each entry can be a language name (string). Supported values - 'English', 'Hindi', 'Bengali', 'Spanish', 'Tamil', 'Marathi', 'Telugu', 'Gujarati'
Configuration for call transfer to a human agent or another number
Configuration for automatically ending the call when a condition is met
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
64
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']
},
languages=["English", "Hindi"]
)
print(response)Example 3
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
from omnidimension import Client
client = Client(api_key)
# Create an agent with transfer and end call configuration
response = client.agent.create(
name="Support Agent with Transfer",
welcome_message="Hello! How can I assist you today?",
context_breakdown=[
{"title": "Purpose", "body": "This agent handles customer support and transfers to human agents when needed."}
],
transfer={
"enabled": True,
"transfer_options": [
{
"number": "+1234567890",
"backup_numbers": ["+1987654321", "+1122334455"],
"transfer_condition": "Transfer to a human agent if the customer requests to speak with a person or if the issue cannot be resolved.",
"transfer_message": "Please hold while I transfer you to one of our agents."
},
{
"number": "+1555000111",
"backup_numbers": [],
"transfer_condition": "Transfer to billing department if the customer has billing or payment related queries.",
"transfer_message": "Connecting you to our billing team now."
}
]
},
end_call={
"enabled": True,
"condition": "End the call when the customer's issue has been resolved and they have no further questions.",
"message": "Thank you for contacting us. Have a great day! Goodbye."
}
)
print(response)Note
Update Agent
Update an existing agent with new configuration values.
Parameters
The ID of the agent to update
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
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)