sanjay_69738
10/14/2025, 5:17 PMAI Evy
10/14/2025, 5:17 PMAI Evy
10/14/2025, 5:17 PM/update-agent/{agent_id} .
Here's the JavaScript code example:
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) ;
The update method allows you to modify various agent properties, including the response_engine which contains the model configuration . You can update parameters like voice_model, post_call_analysis_model, and other agent settings through this single API call .AI Evy
10/14/2025, 5:17 PMAI Evy
10/14/2025, 5:17 PMsanjay_69738
10/14/2025, 5:20 PMAI Evy
10/14/2025, 5:20 PMAI Evy
10/14/2025, 5:20 PMAI Evy
10/14/2025, 5:20 PMresponse_engine parameter in the Update Agent API call [(1) ]() . The model is specified within the response engine configuration .
Here's how to update the response engine with JavaScript:
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) ;
The response_engine object contains the model configuration and has these options :
- `type`: The type of response engine (e.g., "retell-llm")
- `llm_id`: The ID of the LLM Response Engine
- `version`: Version of the Response Engine
To change from one model to another (like from GPT-4.1 to Anthropic) , you would need to create a new Response Engine first with your desired model, then update the agent's response_engine parameter to reference the new engine's llm_id .AI Evy
10/14/2025, 5:20 PM