https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hey I have made changes to the agent prompt, sav...
# ❓・ai-evy-support
d
Hey @AI Evy I have made changes to the agent prompt, saved it and published it. Yet when I am triggering it through API, it's not following updated prompt
a
Thanks for tagging me @demigod0007_86086. I'll look through relevant sources and get back to you shortly.
### Answer When you make changes to your voice agent in Retell AI, you need to publish the agent for the changes to take effect in production [(1) ]() . The Update Agent API updates the agent's "latest draft version", which means changes are made to a draft that needs to be published . Here are a few things to check: 1. Verify you're using the correct agent ID - Make sure your API call is referencing the same agent ID that you updated [(2) ]() . You can verify this by checking that both your dashboard and API calls use the same agent ID . 2. Check if the agent is properly published - The response from the Update Agent API will show
"is_published": false
for the updated draft version, indicating it needs to be published to go live [(1) ]() . 3. Ensure proper transitions if using multi-prompt agents - If you're using a multi-prompt agent, the issue might be related to state transitions not working properly between dashboard testing and API calls [(2) ]() . Some users have found that complex multi-prompt agents can feel "quirky" and have found conversation flow to be more reliable for complex scenarios [(3) ]() . You can update your agent using the API like this:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', { agent_name: 'Jarvis' }) ;
console.log(agentResponse.agent_id) ;
[(4) ]() If the problem persists after confirming the agent is published and you're using the correct agent ID, you may need to better engineer the prompt, especially the transitions part [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Discord message from @brandonhayesai on 2025-10-07](https://discord.com/channels/1186424376300679209/1186462578310910112/1425155725709021335) [[2] Agent follows prompt 100% on Test Audio but deviates a lot when used via API from my live platform](https://discord.com/channels/1186424376300679209/1273558161361469483) [[3] Discord message from @jrok1308 on 2025-10-18](https://discord.com/channels/1186424376300679209/1186462578310910112/1429218557765484544) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) ​