Coze Studio is ByteDance's open source AI Intelligence development platform, based on the Apache 2.0 license, which allows free commercial use. It provides visualization tools to support no-code or low-code way to quickly build, debug and deploy AI intelligences and applications. The back-end is developed using Golang, and the front-end is based on the React and TypeScript, following domain-driven design (DDD) and microservice architecture to ensure high performance and scalability. Users can create complex workflows by dragging and dropping nodes, and integrate plug-ins, knowledge bases and databases to quickly realize business logic. The platform supports APIs and multi-language SDKs, which makes it easy to integrate with local systems.Coze Studio lowers the threshold of AI development, encourages community contribution, and is suitable for developers and enterprises to build customized AI applications.
Function List
- Visual workflow orchestration: Rapidly build complex workflows by dragging and dropping nodes to support business logic design and data flow processing.
- Plug-in Management: Create, configure and manage plug-ins that support encapsulation of third-party APIs or private functionality.
- Knowledge base management: Upload documents or data, and intelligences generate accurate answers based on the knowledge base.
- Database support: Integrate database resources to support data storage and querying, and enhance intelligent body functions.
- Model Service Management: Supports integration of modeling services such as OpenAI, Volcano Engine, and other modeling services for flexible selection of large models.
- API and SDK Integration: Provide chat and workflow related APIs, support for Python, JavaScript, Java and other SDKs, to facilitate secondary development.
- Intelligent Body and Application Construction: Rapidly create, publish, and manage AI intelligences or applications with support for multi-platform deployments.
- real time interaction: Support for real-time chat, speech synthesis and transcription via WebSocket.
- Open Source Community Support: Based on the Apache 2.0 license, community contributions of code and feedback are encouraged.
Using Help
Installation and Deployment
Coze Studio is an open source project, you need to clone the code from GitHub repository and deploy it locally. Here are the detailed steps:
- environmental preparation::
- hardware requirement: Minimum 2-core CPU, 4GB RAM.
- software dependency::
- Docker and Docker Compose: Ensure that the Docker service is installed and started.
- Golang: Back-end development requires version 1.18 or above, configure the environment variables.
- Node.js: The LTS version is recommended for front-end development.
- pnpm: Install pnpm globally (recommended version 9.12.0):
npm i -g pnpm@9.12.0
- clone warehouse::
Run the following command to get the source code:git clone https://github.com/coze-dev/coze-studio.git cd coze-studio
- Configuration Modeling Service::
- Copy the model profile template (e.g. volcano engine doubao-seed-1.6):
cp backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml backend/conf/model/ark_doubao-seed-1.6.yaml
- compiler
backend/conf/model/ark_doubao-seed-1.6.yaml
, configure the following fields:id
: Custom model IDs, which need to be non-zero integers, globally unique, and cannot be modified after deployment.meta.conn_config.api_key
: Model Service API Key, e.g., Volcano Engine Ark API Key (for how to get it seehttps://www.volcengine.com/docs/82379/1541594
).meta.conn_config.model
: Model Service Endpoint ID, e.g., Endpoint ID of doubao-seed-1.6 (see Getting thehttps://www.volcengine.com/docs/82379/1099522
).
- Copy the model profile template (e.g. volcano engine doubao-seed-1.6):
- Installation of dependencies::
Install front-end dependencies:pnpm install
Backend dependencies are managed automatically by Golang, running the
go build
Automatically downloads when... - Build and Run::
- Build project:
pnpm build go build
- Deployment services:
cd docker cp .env.example .env docker compose --profile '*' up -d
The first deployment requires pulling the image, which may take a long time. After successful startup, the log shows
Container coze-server Started
The following is an example of the type of work that can be done with thehttp://localhost:3000
Access.
- Build project:
- Configuring Environment Variables::
establish.env
file, add the API key and base URL:COZE_API_TOKEN=your_api_token COZE_API_BASE=https://api.coze.com
interviews
https://www.coze.com/open/oauth/pats
gainCOZE_API_TOKEN
The
Using the Core Functions
1. Creating AI intelligences
- Access to workspace: Log in to Coze Studio and visit
https://www.coze.com/space/<workspace_id>/develop
Recordsworkspace_id
The - New Intelligent Body: Click "New Intelligence" in the interface and select a model (e.g. doubao-seed-1.6). Add functional nodes such as dialogs, knowledge bases or plugins by dragging and dropping.
- Configuring the Knowledge BaseUpload a document (e.g. PDF or TXT) to the Knowledge Base and intelligences can answer questions based on the document. For example, by uploading a product manual, an intelligent body can answer related inquiries.
- Releasing Smart Bodies: Once the configuration is complete, click "Publish" and select the target platform (e.g. Discord). Enter
COZE_BOT_TOKEN
Deployment is complete and access is available athttps://www.coze.com/docs
The
2. Workflow organization
- Open the editor: Select "Workflow" in Coze Studio to access the visualization canvas.
- Building Workflows: Drag and drop nodes (e.g., "Input", "API Call", "Output") from the node library to define the logic by connecting them. For example, connect "user input" to "query database" to "generate answer".
- Debugging and OptimizationClick "Debug" to input test data, check the execution status of nodes and optimize the logic flow.
- Publishing workflows: When debugging is complete, click "Publish" to bind the workflow to the smartbody or application.
3. Plug-in development and integration
- Creating Plug-ins: In the Plugins module, add a third-party API (e.g., weather query). Enter the API URL and parameters, save it and use it in your workflow.
- Calling Plug-ins: Add plugin nodes to the workflow to configure parameters. For example, the weather plugin returns real-time weather data.
- local developmentPython Example: Developing Plugins with the SDK:
from cozepy import Coze, TokenAuth coze = Coze(auth=TokenAuth(os.getenv("COZE_API_TOKEN"))) bot = coze.bots.create(space_id="your_workspace_id", name="TestBot") print(f"Created bot: {bot.name}")
4. Real-time interaction
- WebSocket Support: Enabling real-time chat or voice interaction. java Example:
WebsocketChatClient client = coze.websocket().chat().create(new WebsocketChatCreateReq(botID, new CallbackHandler())); client.inputAudioBufferAppend("base64_audio_data");
- response processing: Handles real-time text or audio output via callback functions.
5. Database and resource management
- Database Configuration: In the Resources module, add a database connection (e.g. MySQL). Once configured, the workflow can query the data directly.
- Resource management: Support management of plug-ins, knowledge bases, variables and other resources, unified in the visualization interface operation.
problem screening
- View Log: Run the following command to check the container status and logs:
docker ps docker logs <container_id>
- common problems: If the service is not started, check the
.env
file configuration is correct, or verify that the Docker network connection is working.
Community Contributions
- consultation
CONTRIBUTING.md
Submit Code. Security issues are addressed through thehttps://security.bytedance.com/src
or e-mailsec@bytedance.com
Report, do not disclose on GitHub.
application scenario
- Online Customer Service
Build intelligent customer service, integrated knowledge base to answer common questions, complex questions to manual to improve efficiency. - Automated data processing
Use workflows to process form data and call APIs to generate reports. For example, automatically collate customer feedback and generate analytics. - Education Assistant
Create intelligences to answer student questions based on the textbook knowledge base and support personalized learning suggestions. - Smart Home Control
Developing intelligences to control IoT devices through APIs, e.g., voice command "turn on the air conditioner" triggers device operation.
QA
- Coze Studio Open Source Edition vs Commercial Edition?
The open source version supports core development features and is free for commercial use, but does not include advanced features such as tone customization. The commercial version requires a subscription, seehttps://www.coze.com/docs/guides/subscription
The - How do I get an API key?
interviewshttps://www.coze.com/open/oauth/pats
, generate a personal access token, save it to the.env
Documentation. - What models are supported?
Support OpenAI, Volcano Engine and other models, need to manually configure the model service, see thehttps://github.com/coze-dev/coze-studio/wiki/3.-Model-configuration
The - Is it suitable for users with no programming experience?
No-code users can create intelligences through a visual interface, and programmed users can customize features using the SDK. - How do I join the community?
Scan the official QR code with Flying Book (seeREADME.md
) Join the Coze Studio technical exchange group.