https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way I can duplicate an agent via api
# ❓・ai-evy-support
m
@AI Evy is there a way I can duplicate an agent via api?
a
Thanks for tagging me @marvin_17392. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Is there a way to duplicate an agent using the typescript sdk?](https://discord.com/channels/1186424376300679209/1335735263288098857) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
### Answer You can duplicate an agent by using the Create Agent API and populating it with the data from the agent you want to copy. There is no dedicated "duplicate" endpoint, but you can programmatically fetch an existing agent's configuration and use those details as input for the creation of a new agent [(1) ]() . For more, see the [Create Agent documentation]() [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
how can I create a conversation flow voice agent via api?
@AI Evy how can I create a conversation flow voice agent via api?
a
Thanks for the follow-up, @marvin_17392. I'll get back to you soon.
### Answer To create a conversation flow voice agent via API, follow these steps: 1. Create a Conversation Flow Use the Retell SDK to define your conversation flow with the desired nodes and logic. Example in JavaScript:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-5', type: 'cascading' },
 nodes: [
   {
     id: 'start',
     instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
     type: 'conversation',
   },
 ],
 start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
[(1) ]() 2. Create an Agent and Attach the Conversation Flow as the Response Engine Use the conversation_flow_id from the previous step as the response engine when creating the agent:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
 response_engine: { llm_id: conversationFlowResponse.conversation_flow_id, type: 'conversation-flow' },
 voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
[(2) ]() , [(3) ]() - First, create the conversation flow to get the conversation_flow_id. - Then, create the agent and use that conversation_flow_id as the response_engine. For more details, see [Create Conversation Flow]() and [Create Agent]() .
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) [[3] Discord message from @omar.13. on 2025-09-11](https://discord.com/channels/1186424376300679209/1186462578310910112/1415822906079969432) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.