https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i optimize my retell agent prompt to send a...
# ❓・ai-evy-support
h
@AI Evy how do i optimize my retell agent prompt to send a structured JSON without using function calling and only using the webhook in webhook settings?
a
Thanks for tagging me @harkxn. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, the webhook configured in agent settings is designed to receive event notifications from Retell AI, not to send structured JSON data from your agent during a call [(1) ]() . The webhook URL you set in agent settings receives POST requests from Retell AI for call events like
call_started
,
call_ended
, and
call_analyzed
. This is a one-way communication where Retell sends data to your endpoint, not the other way around . If you need your agent to send structured JSON data to an external system during a call, you would need to use custom functions (function calling) [(2) ]() [(3) ]() . Custom functions allow the LLM to output structured JSON and trigger external APIs when needed . With custom functions, you can: - Define parameters using JSON schema format [(2) ]() - Have the agent call your endpoint with structured data when specific conditions are met - Receive responses back that can be used in the conversation The webhook in webhook settings (
webhook_url
) is specifically for receiving call event notifications from Retell, not for the agent to proactively send structured data during conversations [(4) ]() . Would you like guidance on setting up custom functions to achieve your goal of sending structured JSON during calls? **
​ To learn more, see the sources I considered: [[1] Retell AI Webhooks | AI Voice Agents With Live Data | Retell AI](https://www.retellai.com/blog/retell-ai-webhooks-feature) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.