Skip to content
AstrBot
Main Navigation HomeBlogRoadmapHTTP API

English

简体中文

English

简体中文

Toggle dark mode

Intro & DeployMessaging PlatformsAI IntegrationUsageDevelopment
Sidebar Navigation

Introduction

What is AstrBot

Community

FAQ

Deployment

Package Manager

One-click Launcher

Docker

Kubernetes

BT Panel

1Panel

Manual

Other Deployments

CasaOS

Compshare GPU

Community-provided Deployment

Support Us

Messaging Platforms

Quick Start

QQ Official Bot

Webhook Method

Websockets Method

WeCom Application

WeCom AI Bot

WeChat Official Account

Lark

DingTalk

Telegram

LINE

Slack

Misskey

Discord

OneBot v11

NapCat

Lagrange

Other Clients

Satori

Using LLOneBot

Using server-satori

Community-provided

Matrix

KOOK

VoceChat

AI Integration

✨ Model Providers

NewAPI

AIHubMix

PPIO Cloud

SiliconFlow

TokenPony

302.AI

Ollama

LMStudio

⚙️ Agent Runners

Built-in Agent Runner

Dify

Coze

Alibaba Bailian

Usage

WebUI

Plugins

Built-in Commands

Tool Use

Anthropic Skills

SubAgent Orchestration

Proactive Tasks

MCP

Web Search

Knowledge Base

Custom Rules

Agent Runner

Unified Webhook Mode

Auto Context Compression

Agent Sandbox

Development

Plugin Development

🌠 Getting Started

Minimal Example

Listen to Message Events

Send Messages

Plugin Configuration

AI

Storage

HTML to Image

Session Control

Publish Plugin

Platform Adapter Integration

AstrBot HTTP API

AstrBot Configuration File

Others

Self-hosted HTML to Image

Open Source Summer

OSPP 2025

On this page

Connect to Coze ​

AstrBot v4.2.1 and later versions support connecting to Coze Agent service.

Preparation: Get API Key ​

First, register and log in to your Coze account, then go to the API Key Management Page to create a new API Key.

You can follow the steps in the image to reach the API Key management page, or click the link above to go directly.

Create API Key

Then, click "Create", fill in your API Key name on the following page, select an expiration time (permanent tokens are not recommended), click "Select All" under "Permissions", select a workspace, and then click "Confirm".

Create Token

After that, we will get a new API Key. Please copy and save it, as it will be needed later.

New API Key

Preparation: Configure the Agent ​

Go to the Project Development page, click "+Project" in the upper right corner to create a new project, and select to create an agent.

Create Project

Create Project

Note: After creating the agent, you must first click the Publish button in the upper right corner to publish the agent. In the "Select Publishing Platform" section, check all API options, then click "Publish".

If you don't publish or don't check the API options during publishing, you won't be able to call the agent via API.

Publish Agent

After clicking publish, the agent creation is complete. You can see the publish history on the left side of the publish button on the agent development page to confirm the agent has been published successfully.

Next, note the URL on the agent development page:

Agent Development

For example, if the URL in the example is: "https://www.coze.cn/space/7553214941005004863/bot/7553248674860826660"

Then the bot_id is the string of numbers after bot/ in the URL: 7553248674860826660

We need to record the bot_id for later use.

Configure Coze in AstrBot ​

After completing all the preparation work, we can now configure Coze in AstrBot.

Go to AstrBot Admin Panel -> Service Provider -> Add Service Provider -> Coze to enter the configuration page.

Coze Provider

Fill in the API Key and bot_id you just created, then click Save.

Other configuration notes:

  • API Base URL: Generally no modification is needed. If you are using the international version of Coze, change this to: "https://api.coze.com"
  • Let Coze manage conversation history: As described.

Select Agent Runner ​

Go to the Configuration page in the left sidebar, click "Agent Execution Method", select "Coze", then select the ID of the Coze Agent Runner you just created in the new configuration options that appear below, and click "Save" in the bottom right corner to complete the configuration.

Edit this page on GitHub

Last updated:

Pager
PreviousDify
NextAlibaba Bailian

Deployed on Rainyun Logo