Creating a Chat Agent
Navigate to Agents → Chat Agents → Create AgentBasic Configuration
| Field | Description | Example |
|---|---|---|
| Name | Internal identifier | ”Website Assistant” |
| First Message | Opening greeting | ”Hi! How can I help you today?” |
| System Prompt | Agent instructions | Role, capabilities, guidelines |
Model Configuration
Chat agents use the same AI model options as voice agents. Select your preferred model and adjust settings like response creativity and length in the agent builder.Widget Configuration
Customize the chat widget appearance:Visual Settings
| Setting | Description | Default |
|---|---|---|
| Primary Color | Button and header color | Brand color |
| Position | Widget location | bottom-right |
| Welcome Message | Pre-chat greeting | ”Chat with us!” |
| Placeholder | Input field text | ”Type a message…” |
Widget Positions
bottom-right- Most common, standard positionbottom-left- Alternative for left-aligned designs
Branding
Customize the widget’s color, position, welcome message, agent name, and avatar in the Branding settings.Embedding the Widget
JavaScript Embed
Add this code before the closing</body> tag:
React Integration
For React apps, install the Emanate React package and use the provided component. See the Widget tab for integration details.Next.js Integration
For Next.js apps, add the widget script to your root layout. See the Widget tab for details.Suggested Prompts
Add quick-start buttons by entering common questions in the Suggested Prompts section. These appear as clickable options when visitors open the chat.Lead Capture
Configure lead capture for chat agents:- Go to Overview tab
- Enable Lead Capture
- Set capture timing:
- Immediate: Ask for info at start
- Contextual: Collect naturally during conversation
- End of Chat: Request before closing
Pre-Chat Form
Enable the pre-chat form and choose which fields (name, email, company) to collect before the chat begins.Chat Sessions
Session Lifecycle
- Visitor opens widget → New session created
- Conversation happens → Messages stored
- Lead captured → Contact info extracted
- Session ends → Full transcript saved
Session Persistence
Sessions persist across page navigations:- Conversations persist across page navigations so visitors can pick up where they left off
- Conversation history maintained
- Visitor can return and continue
Session Timeout
Configure session expiration:| Setting | Description | Default |
|---|---|---|
| Idle Timeout | Minutes before session expires | 30 |
| Max Duration | Maximum session length | 24 hours |
Human Handoff
Enable transfer to human agents:Handoff Triggers
- Explicit request: “Can I speak to a human?”
- Sentiment detection: Frustrated visitor
- Topic-based: Complex questions
Handoff Options
Configure where handoff requests go — email, live chat platforms, or support ticket systems.Chat Agent Prompts
System Prompt Example
Chat-Specific Considerations
Unlike voice, chat has:- Visual formatting: Use markdown, bullets, links
- Asynchronous: Visitors may take time to respond
- Multi-tab: Visitor may be browsing while chatting
Testing Chat Agents
Use the built-in test panel:- Click Test in agent editor
- Chat test panel opens
- Verify:
- First message displays
- Responses are formatted correctly
- Links work
- Lead capture triggers
Test Checklist
- Widget loads correctly
- First message appears
- Agent responds appropriately
- Suggested prompts work
- Lead capture collects data
- Handoff triggers correctly
Analytics
Track chat agent performance:| Metric | Description |
|---|---|
| Sessions | Total chat sessions |
| Messages | Average messages per session |
| Duration | Average session length |
| Leads Captured | Successful lead captures |
| Handoff Rate | Sessions transferred to humans |
Troubleshooting
Widget doesn't appear
Widget doesn't appear
- Verify embed code is before
</body> - Check agent ID is correct
- Look for JavaScript errors in console
Responses are slow
Responses are slow
- Try selecting a faster model to improve response times
- Reduce max tokens
- Simplify system prompt
Formatting looks wrong
Formatting looks wrong
- Use markdown in agent responses
- Keep messages concise
- Test on mobile devices
Next Steps
Embed Tutorial
Step-by-step embedding guide
Knowledge Base
Add context documents
Lead Capture
Configure lead collection
Chat Logs
View conversation history