https://retellai.com/?utm_source=discord&utm_medium=seo logo
Tool creation not working via conversation_flow me...
# ❓・bug-report
t
When creating tools via
Copy code
res = retell_client.conversation_flow.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",
  tools=[
    {
        "name": "send_email",
        "type": "custom", 
        "url": "https://some_real_url.app/api/tools/send-email",
        "description": "sends an email to an email address",
        "headers": {},
        "method": "POST",
        "query_params": {},
        "parameters": {
            "type": "object",
            "properties": {
                "body": {
                    "type": "string",
                    "description": "Email body",
                },
                "subject": {
                    "type": "string", 
                    "description": "Email subject line based on the call content",
                },
                "to": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": 'Array of email addresses. Use ["hello@gmail.com"] to send to the caller\'s email',
                },
            },
            "required": ["to", "subject", "body"],
        },
        "response_variables": {},
        "timeout_ms": 15000,
        "tool_id": "tool-send-email",
    }
  ]
)

agent_response = retell_client.agent.create(
    agent_name="var",
    voice_id="11labs-Adrian",
    response_engine={
        "type": "conversation-flow",
        "conversation_flow_id": res.conversation_flow_id,
    },
)

print(agent_response)
print(conversation_flow_response.tools)
both print statements show the
tools
field to be None agent is successfully created (reflected in dashboard/ui) tools also do not reflect in UI (under functions) https://cdn.discordapp.com/attachments/1408324136060715099/1408324136312508486/image.png?ex=68a9538f&is=68a8020f&hm=9bb483528478f4b896e64acecc2eb93c3b003807b364fb8a0413c3fa7cb4f210& https://cdn.discordapp.com/attachments/1408324136060715099/1408324136593522799/image.png?ex=68a9538f&is=68a8020f&hm=6d88e20e990ee7a1c7848acc7d8dee0a6b893807a45d02f3eef1030f2525996c&
https://docs.retellai.com/api-references/create-conversation-flow#option-1 my code matches the documentations for defining tools within conversation flow endpoint exactly have also looked inside of SDK, importing this type and using it has also failed the only way creating tools works is via UI. i NEED to be able to define them thru code for my use case. my use case is supposedly supported according to your documentation. 200 success code when making the request but the tools arent created? please look into this and fix https://cdn.discordapp.com/attachments/1408324136060715099/1408324647274938429/image.png?ex=68a95409&is=68a80289&hm=f3c895d0e8e519fc765bc6e57498ce8e2237bfe61e3e3c29260529fe96e8295a&
o
t
That worked. Thank you PLEASE update your documentation. It’s extremely misleading that the create conversation flow endpoint accepts a tools parameter that does nothing It should be very clear which endpoint to use in order to create tools. It will save both u and I time
h
+1 this was extremely confusing
o
Sorry for any confusion, for now you can use the update conversation flow API , and i did inform the team about this , thanks.