https://retellai.com/?utm_source=discord&utm_medium=seo logo
can i make a call from one agent to another agent ...
# ❓・ai-evy-support
b
@AI Evy can i make a call from one agent to another agent through an api call
a
Thanks for tagging me @bobbyfischer369. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, you can create phone calls using the Create Phone Call API, but the documentation doesn't specifically address agent-to-agent calls [(1) ]() . The Create Phone Call API allows you to make outbound calls using this structure :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
 from_number: '+14157774444',
 to_number: '+12137774445',
}) ;
The API requires a
from_number
(your Retell number in E.164 format) and a
to_number
(the number to call) . You can also use
override_agent_id
to specify which agent handles the call . However, the sources don't explicitly describe how to set up a call where one agent calls another agent directly. The API appears designed for calls between phone numbers rather than between agent entities. For the most accurate information about agent-to-agent calling capabilities, I'd recommend checking these resources: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy what happens when i use a from number and to number that are both connected to an agent that i have in retell
a
Thanks for the follow-up, @bobbyfischer369. I'll get back to you soon.
### Answer The documentation doesn't explicitly describe what happens when both the
from_number
and
to_number
are connected to agents in your Retell account [(1) ]() . Based on the Create Phone Call API documentation, when you make a call, the
from_number
must be a number you own in E.164 format that's purchased from or imported to Retell . The
to_number
is the number you want to call . Each phone number can have both an
inbound_agent_id
and
outbound_agent_id
bound to it [(2) ]() . When a number receives an inbound call, it uses the
inbound_agent_id
. When making outbound calls, it uses the
outbound_agent_id
. However, the sources don't specify the exact behavior when calling from one agent-connected number to another agent-connected number within the same account. For specific information about this scenario, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy yes
a
Thanks for the follow-up, @bobbyfischer369. I'll get back to you soon.
### Answer ### General Answer Based on general knowledge about voice AI systems, when you create a call between two numbers that both have agents assigned in Retell AI, here's what would likely happen: 1. **Outbound Agent Initiates**: The
from_number
would use its assigned
outbound_agent_id
to initiate the call 2. **Inbound Agent Receives**: The
to_number
would use its assigned
inbound_agent_id
to handle the incoming call 3. **Agent-to-Agent Conversation**: Both AI agents would engage in a conversation with each other, following their respective prompts and behaviors This could create an interesting scenario where two AI agents converse, potentially useful for: - Testing agent behaviors - Creating synthetic conversations for training - Simulating customer-agent interactions for quality assurance However, this might not be the most practical use case since: - Both agents would consume resources simultaneously - The conversation might be unpredictable without specific coordination logic - It could result in unexpected costs For production use cases, you'd typically want one agent calling a human, or use this setup specifically for testing and simulation purposes. Keep in mind this is based on general voice AI system behavior - the actual implementation details would depend on Retell AI's specific architecture and policies.
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.