AI agent interface

Connect an AI agent to send and receive messages in your chat.

View as Markdown

AI agents can add rich functionality to your chat integration by enabling automatic, context-aware responses to user enquiries.

While TalkJS doesn't provide an out-of-the-box AI agent that can interact with your users without any further operations, it does provide a way for AI agents to interface with the chat:

  • Use webhooks to create a URL to monitor events from users (for example, when a user sends a message)
  • Call your agent to generate responses to incoming events
  • Call the REST API to send your agent's responses to the chat

It is up to your application to appropriately process incoming events and generate relevant responses.

For an example that uses the language model that powers ChatGPT, see: How to integrate a chatbot into your TalkJS chat with the OpenAI API.