https://retellai.com/?utm_source=discord&utm_medium=seo logo
can i ask you a question
# ❓・ai-evy-support
c
@AI Evy can i ask you a question?
a
Thanks for tagging me @clientnexus_71205. I'll look through relevant sources and get back to you shortly.
### Answer Yes, feel free to ask your question about Retell AI. I'm here to help with any questions you have about the platform, its features, or implementation.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
message has been deleted
c
@AI Evy im having issues with the api to make it work book appointmnet, check knowledge base, end call and check available times, my team suggest to do the below Issue File Fix Required KB Query broken retell-webhook-handler/index.ts Update field names to match actual schema No appointments Agent Settings Enable can_book_appointments + set event_type_id Call not ending sync-agent-to-retell/index.ts Add end_call tool to buildToolDefinitions Duplicate contacts Migration SQL Normalize phone numbers in find_or_create_contact_by_phone Plan to Fix All 4 Issues Phase 1: Fix Knowledge Base Query (retell-webhook-handler/index.ts) Update handleKnowledgeBaseQuery function to search actual fields: Search company_info, services, faqs, specializations, objections, pricing, target_audience, unique_aspects, additional_notes Return structured results with field context Also search the services_structured table for service-related queries Add logging to debug KB queries Phase 2: Add end_call Tool (sync-agent-to-retell/index.ts) Add end_call tool definition to buildToolDefinitions function Tool parameters: message, delay, reason Set implementation.type = 'end_call' for Retell to recognize it Phase 3: Fix Phone Number Normalization (SQL Migration) Create improved find_or_create_contact_by_phone function that: Strips all non-digit characters (except leading +) Normalizes to E.164 format before comparison Updates existing contacts with normalized phone if needed Add trigger to normalize phone on INSERT/UPDATE Phase 4: Enable Appointment Booking for Agent Update the agent's can_book_appointments to true Create or assign an event_type_id to the agent Ensure calendar integrations are configured Files to Modify: supabase/functions/retell-webhook-handler/index.ts - Fix KB query supabase/functions/sync-agent-to-retell/index.ts - Add end_call tool New migration - Fix phone normalization Agent settings (via UI or direct DB update) - Enable appointments
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer Based on the issues your team identified, here's guidance on the Retell AI-specific components: ## Knowledge Base Configuration Knowledge bases in Retell AI are linked to agents and automatically retrieve information during calls. [(1) ]() When creating or updating your Retell LLM, you can specify
knowledge_base_ids
to enable this feature. [(2) ]() [(3) ]() The knowledge base retrieval happens automatically for every response generation without needing prompt changes. [(1) ]() You can configure retrieval settings using
kb_config
with parameters like
top_k
(number of results, default 3) and
filter_score
(minimum relevance score, default 0.6) . [(2) ]() [(3) ]() ## End Call Tool To enable call termination, add the end call tool to your agent's
general_tools
array:
Copy code
json
{
  "type": "end_call",
  "name": "end_call",
  "description": "End the call with user."
}
[(2) ]() , [(3) ]() This tool should be included in the
general_tools
configuration when creating or updating your Retell LLM. [(2) ]() [(3) ]() ## Appointment Booking For appointment booking functionality, you can use the Cal.com integration tool in your agent's tools configuration:
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[4] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Copy code
json
{
  "type": "book_appointment_cal",
  "name": "book_appointment",
  "description": "Book an annual check up.",
  "cal_api_key": "cal_live_xxxxxxxxxxxx",
  "event_type_id": 60444,
  "timezone": "America/Los_Angeles"
}
[(2) ]() , [(3) ]() This requires your Cal.com API key and the specific
event_type_id
for the appointment type. [(2) ]() [(3) ]() ## Phone Number Format When creating phone calls, Retell requires E.164 format for both
from_number
and
to_number
. [(4) ]() The
from_number
must be a number purchased from or imported to Retell. Your custom phone normalization logic should ensure numbers match this format before making API calls to Retell.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
### Answer I cannot see screenshots in Discord messages, but I can guide you on webhook setup for Retell AI. ## Webhook Setup Requirements Setting up webhooks in Retell AI involves a few key steps: 1. Create Your Server Endpoint [(1) ]() You need to create an HTTP/HTTPS endpoint that accepts POST requests. This is your own server endpoint that receives webhook requests from Retell AI. [(2) ]() 2. Configure the Webhook URL [(3) ]() [(4) ]() - For call event webhooks (call_started, call_ended, call_analyzed) , you configure the webhook URL in your agent settings or workspace settings [(3) ]() - For inbound call webhooks, you set the
inbound_webhook_url
in your phone number configuration [(4) ]() [(2) ]() 3. Webhook Specifications [(3) ]() [(4) ]() - The webhook will POST the payload to your endpoint - Timeout is 10 seconds - Retries up to 3 times if no success status (2xx) is received - You can verify webhook authenticity using your Retell API Key [(4) ]() 4. Deploy Your Endpoint [(1) ]() For testing, you can use tools like ngrok to make your local endpoint accessible online. ## What You Need to Provide You must provide: - Your own webhook endpoint URL (Retell doesn't provide this - they se
nd requests TO your endpoint) [(2) ]() - Your endpoint must handle incoming POST requests and return appropriate responses [(1) ]() If you're seeing a webhook URL field in the Retell dashboard, that's where you enter YOUR server's webhook endpoint URL, not where Retell provides one to you. [(7) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] Setup guide](https://docs.retellai.com/features/register-webhook) [[2] Discord message from @agentralelkin_91153 on 2025-10-20](https://discord.com/channels/1186424376300679209/1294891368505937952/1429920956096315644) [[3] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[4] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy in the webhook page everything that have is one field to paste the webhook, dont have even a button to save, thats all?
a
to help with this. If the webhook configuration only shows a single field for the URL without an explicit save button, the save likely happens when you update the agent settings overall or when you navigate away from that configuration screen. This is common in modern dashboard interfaces where changes are auto-saved or saved as part of the broader agent configuration update.
### Answer ### Answer Yes, that's typically the setup for webhooks in Retell AI. Here's what you need to know: ## Webhook Configuration Locations Agent-Level Webhooks [(1) ]() In your agent settings, you'll find a
webhook_url
field where you paste your endpoint URL. When you update the agent with this webhook URL, it binds webhook events for that specific agent to your specified URL and will ignore the account-level webhook for that agent. You can also set
webhook_timeout_ms
(default is 10000ms if not set) . Account-Level Webhooks [(2) ]() There's also an account/workspace-level webhook configuration that applies to all agents unless overridden at the agent level. ## How Webhook URLs Work The webhook URL field is where you enter YOUR server's endpoint URL - this is the URL that Retell will send POST requests to when events occur. [(3) ]() Retell doesn't provide you with a webhook URL; instead, you provide Retell with your own endpoint. ## Webhook Events Once configured, your webhook will receive events for: [(2) ]() -
call_started
- When a new call begins -
call_ended
- When a call completes, transfers, or encounters an error -
call_analyzed
- When call analysis is complete ## Webhook Specifications The webhook will: - POST the payload to your endpoint - Timeout after 10 seconds - Retry up to 3 times if no success status (2xx) is received - Trigger events in order but non-blocking ## Security You can verify webhook authenticity using the
x-retell-signature
header together with your Retell API Key. [(4) ]() Retell provides a verify function in their SDKs
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @clientnexus_71205. I'll get back to you soon.
c
@AI Evy where do i check the In the LLM settings, check that you see all 4 tools i set up
a
Copy code
json
{
  "type": "check_availability_cal",
  "name": "check_availability",
  "description": "Check available time slots for booking.",
  "cal_api_key": "cal_live_xxxxxxxxxxxx",
  "event_type_id": 60444,
  "timezone": "America/Los_Angeles"
}
The tools can be configured in either
general_tools
(available in all states) or within specific
states
in the tools array (available only in that state) .
### Answer You can check your configured tools in your Retell LLM settings through the Retell AI Dashboard or via API. ## Checking Tools in the Dashboard Navigate to your agent's Response Engine configuration in the Retell AI Dashboard. In the LLM settings section, you should see your configured tools listed under
general_tools
and any state-specific tools under
states
. [(1) ]() [(2) ]() ## Checking Tools via API You can retrieve your Retell LLM configuration using the Get Retell LLM API endpoint to verify all 4 tools are properly configured. [(1) ]() ## Expected Tool Configuration Based on your earlier message, you should see these 4 tools configured: 1. Knowledge Base Query - This is automatically enabled when you set
knowledge_base_ids
in your LLM configuration [(2) ]() 2. End Call Tool - Should appear in `general_tools`:
Copy code
json
{
  "type": "end_call",
  "name": "end_call",
  "description": "End the call with user."
}
[(1) ]() [(2) ]() 3. Book Appointment - Should appear in your tools array:
Copy code
json
{
  "type": "book_appointment_cal",
  "name": "book_appointment",
  "description": "Book an annual check up.",
  "cal_api_key": "cal_live_xxxxxxxxxxxx",
  "event_type_id": 60444,
  "timezone": "America/Los_Angeles"
}
4. Check Availability - Should appear in your tools array:
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.