https://retellai.com/?utm_source=discord&utm_medium=seo logo
I exported my ai voice agent conversational flow a...
# ❓・ai-evy-support
a
@AI Evy I exported my ai voice agent conversational flow and exported it in another account its showing 4000-5000 tokens in that but in my main workspace its showing 7000-8000tokens why is difference in the same agent and how to fix it
a
Thanks for tagging me @AK. I'll look through relevant sources and get back to you shortly.
### Answer I don't have specific information in the available sources about token count discrepancies when exporting and importing conversation flow agents between workspaces. However, there's a related case where someone experienced token count changes in their agent. One user reported that their AI agent went from 2800 to 3600 tokens without making any changes—they closed the dashboard at 2800 tokens and opened it 2 days later to find it at 3600 tokens [(1) ]() . The token count difference you're seeing (7000-8000 tokens in the original workspace vs 4000-5000 tokens in the new account) could potentially be related to: - **Agent Handbook presets**: If your original workspace has different Agent Handbook presets enabled, this could add tokens. Each preset adds a specific number of tokens to every interaction [(2) ]() - **Version or configuration differences**: There may be differences in how the agent is configured between workspaces To troubleshoot this, I'd recommend: 1. Check if both agents have the same Agent Handbook presets enabled 2. Compare the global configuration settings between both workspaces 3. Verify that the export/import process captured all nodes and transitions correctly If the issue persists, you may want to create a support ticket with your agent IDs from both workspaces so the Retell team can investigate the token count discrepancy.
​ To learn more, see the sources I considered: [[1] Discord message from @nicolas_30688 on 2026-03-14](https://discord.com/channels/1186424376300679209/1186462578310910112/1482240647174950963) [[2] Agent Handbook](https://docs.retellai.com/build/agent-handbook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy its the same only
a
Thanks for the follow-up, @AK. I'll get back to you soon.
### Answer If the Agent Handbook settings are identical between both workspaces, the token count difference could be related to how the conversation flow is being compiled. When using Flex Mode, all node prompts, transitions, and tool descriptions are compiled into a single LLM context, which can significantly increase token count [(1) ]() . If Flex Mode is enabled at the agent level in one workspace but not the other, or enabled on different components, this could explain the discrepancy . The token calculation includes [(2) ]() : - Global prompt - Functions (tool descriptions) - State/node prompt - Transcript between agent and user - Tool call history and results Since agent import always creates a new agent with no support for updating an existing agent [(3) ]() , the newly imported agent might have different default settings or configurations that affect token compilation. To troubleshoot further: 1. Check if Flex Mode is enabled differently between the two agents (at agent level vs component level) [(1) ]() 2. Verify that all node instructions, transitions, and tool descriptions were imported correctly 3. Compare the global prompt length between both agents 4. Check if there are any differences in the number or complexity of functions/tools configured If you're unable to identify the difference, I recommend creating a support ticket with both agent IDs so the Retell team can investigate the token compilation discrepancy directly.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[2] Exceptions to Our Per-Minute Pricing](https://docs.retellai.com/accounts/billing-exceptions) [[3] Migrate agents across workspaces](https://community.retellai.com/t/migrate-agents-across-workspaces/532) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy its same everything just token different why
a
Thanks for the follow-up, @AK. I'll get back to you soon.
### Answer I understand this is frustrating. Based on the available sources, I don't have specific documentation explaining token count differences when exporting/importing conversation flows between workspaces. However, one documented factor that significantly impacts token count is Flex Mode. When Flex Mode is enabled, all node instructions, transitions, and tool descriptions are compiled into a single prompt, which significantly increases the total token count [(1) ]() . This is different from rigid mode where only the active node's prompt is sent to the LLM . **Key point about Flex Mode**: When the combined prompt exceeds 3,500 tokens, the token scaling billing rule applies, which can multiply your costs several times over . Since you've confirmed everything appears identical, here are specific things to verify: 1. **Flex Mode settings**: Check if Flex Mode is enabled at the agent level vs component level in both workspaces 2. **Actual node count**: Verify all nodes were imported correctly - the documentation notes that if you use flex mode for more than 20 nodes, performance might degrade 3. **Knowledge Base configuration**: Node level KB is ignored in Flex Mode, so check if KB is configured at agent level in both workspaces If you've verified these are identical and the token difference persists, this appears to be an issue that requires direct investigation by the Retell team with your specific agent IDs from both workspaces.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy does past chats aalso include in tokens?
a
Thanks for the follow-up, @AK. I'll get back to you soon.
### Answer Yes, past chat history is included in the token count. The LLM token limit is based on characters that the AI has generated [(1) ]() . Additionally, there's a context window limit of the model (for example, 128k for GPT-4o) [(2) ]() . For token calculation, the transcript between agent and user is included, along with tool call history and results [(1) ]() . This means the ongoing conversation history contributes to your total token usage. The LLM prompt token limit is set to 32,768 tokens , which allows for more complex and context-rich conversations with conversation history.
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[2] Call length upper limit?](https://discord.com/channels/1186424376300679209/1244723502230012039) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy but it will increase my costs as the way the more users will call my agent so how do I fix it?
a
Thanks for the follow-up, @AK. I'll get back to you soon.
he base token cost per call.
### Answer You're right to be concerned about costs scaling with conversation history. Here are strategies to control token usage and costs: 1. Optimize Your Conversation Flow Structure If you're using Flex Mode, be aware that it can significantly increase LLM costs because all node instructions, transitions, and tool descriptions are compiled into a single prompt [(1) ]() . To control costs, consider: - Use rigid mode instead of Flex Mode - In rigid mode, only the active node's prompt is sent to the LLM, reducing token count - Break your flow into smaller components - This ensures fewer nodes are compiled into a single prompt - Keep node instructions concise to minimize token usage 2. Limit Nodes in Flex Mode If you must use Flex Mode, avoid using it for more than 20 nodes, as performance might degrade and the agent might have higher hallucination risk . The recommendation is to split into smaller components . 3. Be Aware of Token Scaling Costs When the combined prompt exceeds 3,500 tokens, the token scaling billing rule applies, which can multiply your costs several times over . Engineers have noted that generally, the prompt size should remain below 8,000 tokens to ensure optimal performance, as larger prompts also increase latency and costs [(2) ]() . 4. Write Concise Instructions Write node instructions in a concise manner so that the LLM can better focus on the task [(1) ]() . This directly reduces the token count per interaction. Unfortunately, conversation history (transcript between agent and user) is part of the token calculation and cannot be excluded, but optimizing your flow structure and prompt design can significantly reduce t
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[2] Prompt exceeds the limit of 32768 tokens, please contact support if you need longer context.](https://discord.com/channels/1186424376300679209/1432544872421789789) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy if my tokens are 7000-8000 what will be my total per minute cost if my stack is gpt 4.1, cartesia sonic 3 , transcription, background speech removal
a
Thanks for the follow-up, @AK. I'll get back to you soon.
### Answer With 7000-8000 tokens, you'll face LLM token surcharges since your prompt exceeds 3,500 tokens [(1) ]() [(2) ]() . Here's how the cost breaks down: For prompts exceeding 3,500 tokens, the scaling factor applies [(1) ]() : - Scaling Factor = Prompt LLM Tokens ÷ 3,500 - Billed Duration = Original Duration × Scaling Factor Your calculation with 7,500 tokens (mid-range) : - Scaling Factor: 7,500 ÷ 3,500 = 2.14 - This means your LLM cost will be multiplied by 2.14 Per-minute cost estimate: Based on the pricing structure mentioned in the sources, the base GPT-4.1 cost would be scaled by your token factor [(2) ]() . One example shows: "0.07 + (4500 / 3500 × 0.045) = 0.1279 per minute" . For your 7,500 token scenario: - The LLM portion would scale proportionally: 7,500 / 3,500 × base rate [(1) ]() [(2) ]() - Plus your TTS (Cartesia Sonic) , transcription, and background speech removal costs Important note: The sources show that unit prices in call history are displayed per second, not per minute [(3) ]() . For example, if you see "0.11666" for ElevenLabs, multiply by 60 to get the per-minute rate: 0.11666 × 60 = 7 cents . To get your exact total per-minute cost with your specific stack, I recommend using Retell's [pricing calculator]() or checking your call history where costs are broken down by component . To reduce costs: Consider optimizing your prompt to stay under 3,500 tokens, as this eliminates the surcharge entirely [(1) ](
accounts/billing-exceptions) [(2) ]() .
​ To learn more, see the sources I considered: [[1] Exceptions to Our Per-Minute Pricing](https://docs.retellai.com/accounts/billing-exceptions) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Product Pricing Issue](https://discord.com/channels/1186424376300679209/1454631428875747350) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.