https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can we import and export the conversation flow alo...
# ❓・ai-evy-support
a
@AI Evy Can we import and export the conversation flow alone from one agent to another agent ?
a
Thanks for tagging me @afrah_85175. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can export and import conversation flows between agents [(1) ]() . The Retell AI platform supports both exporting conversation flows as JSON and importing them . You can manage conversation flows programmatically using the Retell AI JavaScript SDK [(2) ]() [(3) ]() [(4) ]() [(5) ]() : To retrieve an existing conversation flow:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
[(2) ]() To create a new conversation flow:
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-4o', 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) ;
[(3) ]() To list all conversation flows:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponses = await client.conversationFlow.list() ;
console.log(conversationFlowResponses) ;
[(4) ]() This allows you to export a conversation flow from one agent and import it to another by retrieving the flow configuration and creating a new one with the same settings [(2) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Conversation Flow: Import / Upload JSON](https://discord.com/channels/1186424376300679209/1394595851942367252) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[3] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[4] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) [[5] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.