https://retellai.com/?utm_source=discord&utm_medium=seo logo
What is the Chat Agent exactly
# ❓・ai-evy-support
s
@AI Evy What is the Chat Agent exactly? Like can I sync it to a conversation that is over text messagges
a
Thanks for tagging me @Stix. I'll look through relevant sources and get back to you shortly.
### Answer A Chat Agent is an agent type in Retell that allows you to implement conversational AI experiences through text-based interfaces. [(1) ]() Key points: - Chat agents communicate via written text rather than voice. [(2) ]() - You can create a new chat agent in the dashboard or convert an existing voice agent to a chat agent. [(1) ]() - Chat agents do not support voice-specific functions like call transfers, DTMF (press digits) , or telephony features. Regarding SMS/text message integration: Retell does not provide native integration with SMS or chat applications at this moment. You can only interact with the chat agent via API. This means if you want to use a chat agent over text messages, you would need to build your own integration layer—receiving SMS messages through a third-party provider (like Twilio) , sending them to the Retell Chat API, and then routing the responses back to SMS yourself. Check out these resources for more details: - [Create chat agent]() - [Create Chat Agent API]()
​ To learn more, see the sources I considered: [[1] Create chat agent](https://docs.retellai.com/build/create-chat-agent) [[2] Chatbot](https://www.retellai.com/glossary/chatbot) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
Ok how can I integrate the Chat Agent into GHL workflow
a
Thanks for the follow-up, @Stix. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation on integrating a Chat Agent into Go High Level (GHL) workflows. Here's what I can confirm: - Retell does not provide native integration with SMS or chat applications—you can only interact with the chat agent via API. [(1) ]() - For Go High Level integration, Retell recommends connecting through custom API integrations or with help from Retell's integration partners. [(2) ]() - A tutorial for connecting GHL calendar with Retell is noted as "on the way." [(3) ]() What this means for you: Since the Chat Agent only works via API, you'd need to build a custom workflow in GHL that: 1. Receives messages from your GHL conversation/SMS 2. Sends them to Retell's Chat API (e.g., [Create Chat Session]() or [Chat Completion]() ) 3. Routes the AI responses back into your GHL workflow You may also want to reach out to a [Retell Certified Partner]() who specializes in GHL integrations—several are listed on the integrations page. [(2) ]() Would you like me to try providing a general answer on how to approach this custom integration?
​ To learn more, see the sources I considered: [[1] Create chat agent](https://docs.retellai.com/build/create-chat-agent) [[2] Connect AI call agent to ⁠Go High Level](https://www.retellai.com/integrations/go-high-level) [[3] How to connect GHL calendar](https://discord.com/channels/1186424376300679209/1328384361103491243) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
k then how do I interact with it through an API
a
Thanks for the follow-up, @Stix. I'll get back to you soon.
### Answer To interact with a Chat Agent via API, follow these steps: 1. Create a Chat Agent (if you haven't already) :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatAgentResponse = await client.chatAgent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
}) ;
console.log(chatAgentResponse.agent_id) ;
[(1) ]() 2. Create a Chat Session using the agent ID:
Copy code
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) ;
[(2) ]() 3. Send Messages and Get Completions using the chat ID from step 2:
Copy code
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?',
}) ;
console.log(response.messages) ;
[(3) ]() 4. Retrieve Chat History (optional) :
Copy code
javascript
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
[(4) ]() For your GHL integration, you'd call the Create Chat Completion endpoint each time you receive a message, passing the user's text in the
content
field, then route the response back to GHL. [(3) ]() , [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.