Skip to main content

Coze chatbot

This guide shows you how to connect a Coze chatbot to TEN Agent, enabling voice conversations with your bot. By integrating speech recognition and synthesis, you can transform a text-based Coze bot into a fully voice-enabled assistant.

Prerequisites

Before starting, ensure you have:

  • TEN Agent playground running. See the Agent quickstart
  • API keys for your voice services:
  • Coze credentials:
    • Coze Bot ID
    • Coze Token
    • Coze Base URL (only for non-global environments)

Set up your Coze bot with voice

Set up your voice-enabled Coze bot with these steps:

  1. Open the playground at http://localhost:3000

  2. Select the voice_assistant graph type

  3. Configure modules:

    1. Click Module Picker
    2. Select your preferred STT and TTS modules
    3. For the LLM module, select Coze Chat Bot
    4. Click Save Changes
  4. Configure Coze properties:

    1. Click the settings button next to the graph selector
    2. Enter your Coze Bot ID and token
    3. Add Base URL if using a non-global environment
    4. Click Save Changes
  5. Start your bot:

    1. Click Connect to initialize the agent
    2. Wait a few seconds for startup
    3. Begin speaking to your Coze bot

Azure STT integration

For Azure speech recognition:

  1. Select the voice_assistant_integrated_stt graph type
  2. Configure Azure credentials in the RTC module
  3. Follow the remaining configuration steps above

Troubleshooting

Common issues and solutions:

IssueSolution
Bot not responding
  • Verify Coze Bot ID and Token are correct
  • Check Coze bot status in Coze Console
  • Ensure bot is published and active
Missing bot capabilities
  • Skills may need to be reconfigured in Coze
  • Verify tool permissions in Coze console
  • Update the bot and republish
Base URL issues
  • Only set Base URL if using non-global environment
  • Remove trailing slashes from URL
  • Ensure proper URL format