Q4
01/19/2026, 8:58 AMAI Evy
01/19/2026, 8:58 AMAI Evy
01/19/2026, 8:58 AMend_call from the global prompt in Conversation Flow agents.
In Conversation Flow agents, tools (including end_call) can be configured at the global level and referenced in your global prompt. [(1) ]() [(2) ]()
Here's how to approach this:
1. Add the End Call tool at the agent level - Configure the tool in the tools section of your conversation flow. [(1) ]()
2. Reference it in your global prompt - You can instruct the agent when to use the function directly in the global prompt. For example, include instructions like: "If the user says 'goodbye', use the end_call tool to terminate the conversation." [(3) ]()
3. **Best practice tip**: When referencing the function in your prompt, consider giving it an identifier (e.g., end_call_152) so the AI can more reliably identify it as a function to call. [(4) ]()
Additionally, for actions that should be available anytime throughout the conversation (like ending the call) , using global-level tools and referencing them in the global prompt is the recommended approach. [(5) ]()
**Note on timing**: If you're using Flex Mode and the call ends abruptly without the farewell message, you may need to add explicit instructions in your global prompt to output the farewell sentence first, then trigger the end_call tool immediately after. [(6) ]()AI Evy
01/19/2026, 8:59 AMAI Evy
01/19/2026, 8:59 AMQ4
01/19/2026, 9:05 AMAI Evy
01/19/2026, 9:05 AMAI Evy
01/19/2026, 9:05 AMtools array when creating or updating the conversation flow. [(1) ]() [(2) ]()
Via the API (JavaScript SDK example) :
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-4.1', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;
[(1) ]()
Tool structure example from the API response:
json
"tools": [
{
"type": "custom",
"name": "get_customer_info",
"description": "Get customer information from database",
"tool_id": "tool_001",
"url": "<https://api.example.com/customer%22,>
"method": "GET"
}
]AI Evy
01/19/2026, 9:05 AMAI Evy
01/19/2026, 9:05 AMAI Evy
01/19/2026, 9:05 AMQ4
01/19/2026, 9:21 AMQ4
01/19/2026, 9:28 AMAI Evy
01/19/2026, 9:28 AMAI Evy
01/19/2026, 9:29 AMPrompt and Static Sentence.
- **Global Node**: You can configure the End Node as a global node to make it accessible from anywhere in your flow.
You can create multiple end nodes within a single agent to handle different termination scenarios.
In your global prompt, you can define conditions that should trigger a transition to the End Node. For example, include instructions like: "If the user says 'thank you', 'goodbye', or 'bye', transition to the end call node."
[(2) ]()
**Best practice**: When referencing tools/functions in your prompt, use trigger words and define clear conditions for when they should be called.
[(3) ]()AI Evy
01/19/2026, 9:29 AMAI Evy
01/19/2026, 9:29 AMQ4
01/19/2026, 9:38 AMAI Evy
01/19/2026, 9:38 AMAI Evy
01/19/2026, 9:38 AMGlobal Node checkbox in the End Node settings
- When enabled, you must define a condition for when this global node should be transitioned to [(2) ]()
2. Set the Global Node condition
- Configure a prompt-based transition condition like: When user indicates they want to end the call or User said something about ending the conversation or saying goodbye
- This condition is evaluated whenever the agent is performing a transition from any node
3. Enable "Speak During Execution" if you want a farewell message [(1) ]()
- When enabled, you can write instructions for the agent to generate an utterance like Goodbye, have a nice day before the call ends
**Key point**: Global nodes can be transitioned to from anywhere in the call, and since they handle universal scenarios, they don't necessarily need to be connected to the rest of the graph. [(2) ]()
For transition conditions, you can use prompt-based conditions like:
- When user indicates they want to end the call
- User declines the invitation
- User said something about saying goodbye [(3) ]()
If this still isn't working, coAI Evy
01/19/2026, 9:38 AMAI Evy
01/19/2026, 9:38 AMAI Evy
01/19/2026, 9:38 AM