### Answer
Based on the documentation, Retell AI now offers a Chat Widget that makes adding an agent to your website much simpler [(1) ](
) .
## Chat Widget Solution
You can embed a Retell Chat agent directly into your website using the new Chat Widget . This enables users to interact with your AI agents via a modern, lightweight text UI without any setup overhead .
How to set it up:
1. Copy and paste the embed script into your website
2. Replace the publicKey, agentId, and version
3. Customize widget name
The embed code requires no backend work . You'll need to use Public Keys (not API keys) for frontend authorization, which you can manage in Dashboard → Keys → Public Keys .
## Chat Agent Requirements
First, you'll need to create a chat agent. You can either create a new chat agent or convert an existing voice agent [(2) ](
) . To create a new one:
1. Navigate to the Agents section in your Retell dashboard
2. Click "Create New Agent"
3. Select "Chat Agent" as the agent type
4. Configure your agent settings and prompts
Note that chat agents do not support certain voice-specific functions like call transfers, DTMF, or telephony features .
## API Integration
Once your chat agent is created, you can create chat sessions using the API [(3) ](
) :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;