maurizio_isendoorn
08/05/2025, 9:22 AMAI Evy
08/05/2025, 9:22 AMAI Evy
08/05/2025, 9:23 AMcreate-agent endpoint [(1) ]() . The API allows you to create agents that can be used for both voice and chat functionality .
To create an agent, you would use the JavaScript SDK like this:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
Once you have an agent created, you can convert an existing voice agent to a chat agent through the dashboard, or create a new chat agent directly [(2) ]() . After creating your chat agent, you can then use it with the chat APIs to create chat sessions [(3) ]() and generate responses [(4) ]() .AI Evy
08/05/2025, 9:23 AMAI Evy
08/05/2025, 9:23 AMmaurizio_isendoorn
08/05/2025, 9:23 AMAI Evy
08/05/2025, 9:23 AMAI Evy
08/05/2025, 9:24 AMcreate-agent endpoint, but the documentation shows that creating a "Chat Agent" specifically requires either using the dashboard to select "Chat Agent" as the agent type or converting an existing voice agent [(1) ]() .
The API documentation for creating agents [(2) ]() shows how to create a general agent:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
However, the documentation indicates that to specifically create a "Chat Agent" (as opposed to a voice agent) , you need to either navigate to the Agents section in your Retell dashboard and select "Chat Agent" as the agent type, or convert an existing voice agent [(1) ]() .
The sources don't show a direct API parameter or endpoint specifically for creating chat agents programmatically. You would need to create the agent via API and then potentially convert it to a chat agent through the dashboard interface.AI Evy
08/05/2025, 9:24 AMAI Evy
08/05/2025, 9:24 AMmaurizio_isendoorn
09/29/2025, 10:51 AMAI Evy
09/29/2025, 10:51 AMAI Evy
09/29/2025, 10:51 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
And generate responses with [(3) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const response = await client.chat.createChatCompletion({
chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
content: 'hi how are you doing?',
}) ;
However, the initial creation of the chat agent itself still appears to require the dashboard interface based on the available documentation [(1) ]() .AI Evy
09/29/2025, 10:51 AMAI Evy
09/29/2025, 10:51 AMmaurizio_isendoorn
09/29/2025, 10:52 AMAI Evy
09/29/2025, 10:52 AMAI Evy
09/29/2025, 10:52 AM- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
- {{user_location}} == "New York"
- {{user_location}} != "New York"
- "New York, Los Angeles" CONTAINS {{user_location}}
- "New York, Los Angeles" NOT CONTAINS {{user_location}}
- {{user_age}} < 18 OR {{user_location}} == "New York"
- {{name}} existsAI Evy
09/29/2025, 10:52 AMAI Evy
09/29/2025, 10:52 AMAI Evy
09/29/2025, 10:52 AMmaurizio_isendoorn
09/29/2025, 10:56 AMAI Evy
09/29/2025, 10:56 AMAI Evy
09/29/2025, 10:56 AMAI Evy
09/29/2025, 10:56 AMAI Evy
09/29/2025, 10:56 AMmaurizio_isendoorn
09/29/2025, 11:01 AMAI Evy
09/29/2025, 11:01 AMAI Evy
09/29/2025, 11:02 AMAI Evy
09/29/2025, 11:02 AMAI Evy
09/29/2025, 11:02 AMAI Evy
09/29/2025, 11:02 AM