https://retellai.com/?utm_source=discord&utm_medium=seo logo
how should the structure be to import a
# ❓・ai-evy-support
e
@AI Evy how should the structure be to import a .json conversation flow agent using the nodes and flows?
a
Thanks for tagging me @enes (ekkovoice). I'll look through relevant sources and get back to you shortly.
### Answer To import a conversation flow agent via JSON, you can use the Dashboard's import agent feature. [(1) ]() When creating a conversation flow programmatically via the API, the JSON structure requires these key fields: Required fields: -
model_choice
- The model configuration (e.g.,
{ "model": "gpt-4.1", "type": "cascading" }
) [(2) ]() -
start_speaker
- Either
"user"
or
"agent"
-
nodes
- Array of node objects defining the conversation flow Node structure example:
Copy code
json
{
  "id": "start",
  "type": "conversation",
  "instruction": {
    "type": "prompt",
    "text": "Greet the customer and ask how you can help them."
  },
  "edges": [
    {
      "id": "edge_1",
      "transition_condition": {
        "type": "prompt",
        "prompt": "Customer wants to book appointment"
      },
      "destination_node_id": "book_appointment"
    }
  ]
}
Optional fields include: -
global_prompt
- Prompt used across all nodes -
tools
- Array of available tools/functions -
start_node_id
- ID of the starting node -
default_dynamic_variables
- Variables referenced throughout the flow -
knowledge_base_ids
- For RAG integration -
components
- Local sub-flows embedded in the conversation Note: If importing via the Dashboard and using a custom voice, you may encounter a "failed to get voice id" error. [(1) ]()
​ To learn more, see the sources I considered: [[1] Conversation Flow: Import / Upload JSON](https://discord.com/channels/1186424376300679209/1394595851942367252) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.