微信扫码
添加专属顾问
我要投稿
字节跳动开源的Coze Studio智能体平台评测与部署指南,为企业AI应用提供新选择。 核心内容: 1. Coze Studio的核心优势与功能亮点分析 2. 平台当前存在的四大改进空间 3. 详细部署教程与实战应用建议
7 月底字节跳动的 Coze-Studio 正式开源,算是 AI 智能体领域的一个大事件。这个月终于有时间在内网环境进行了部署和评测,希望能为团队的企业知识库和 AI 应用建设提供多一个选项。
其实,我们厂的知识库系统一直是自研的。没有直接采用市面上的开源方案,主要是基于几点考虑:
Coze空间
的开源版本让我能以更低的成本体验一个大厂能展现的功能完整的智能体平台。以下把我的评测和部署记录分享给大家。
prompt-optimizer
这样的开源优化工具,会极大提升创建效率。平台的核心功能在上面图中都体现了,设计得非常周全:
支持三种类型的知识库,适应不同场景:
支持 Markdown 格式的可视化编辑,并可将调试好的提示词保存到库中,方便团队复用。
text2sql
方案。Coze Studio 的物理架构图,展示各个部署角色之间的关系。
配置管理层消息队列层数据存储层应用服务层负载均衡层coze-web (Nginx)coze-server (Go后端)MySQL 8.4.5Redis 8.0Elasticsearch 8.18.0Milvus v2.5.10MinIONSQ LookupdNSQ DaemonNSQ Adminetcd 3.5
docker-compose 部署的文件列表
➜ coze git:(master) ✗ tree -L 3
.
├── backend
│ └── conf
│ ├── model
│ ├── plugin
│ └── prompt
├── nginx
│ ├── conf.d
│ │ └── default.conf
│ ├── ssl
│ └── nginx.conf
├── volumes
│ ├── elasticsearch
│ │ ├── es_index_schema
│ │ ├── analysis-smartcn.zip
│ │ ├── elasticsearch.yml
│ │ └── setup_es.sh
│ ├── etcd
│ │ └── etcd.conf.yml
│ ├── minio
│ │ ├── default_icon
│ │ └── official_plugin_icon
│ ├── mysql
│ │ ├── schema.sql
│ │ └── sql_init.sql
│ └── rocketmq
│ └── broker.conf
├── docker-compose.yml
├── example.env.env
└── readme.md
备注:elasticsearch,kafka,mysql 这几个服务我之前有部署,所以没有包括在 docker-compose 里面部署
minio 和 coze-server 是用 coze-web(nginx) 代理的,具体见 nginx/default.conf
name: coze-studio
x-env-file:&env_file
-coze.env
services:
redis:
image:bitnami/redis:8.0
container_name:coze-redis
restart:always
user:root
privileged:true
env_file:*env_file
environment:
-REDIS_AOF_ENABLED=${REDIS_AOF_ENABLED:-no}
-REDIS_PORT_NUMBER=${REDIS_PORT_NUMBER:-6379}
-REDIS_IO_THREADS=${REDIS_IO_THREADS:-4}
-ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD:-yes}
ports:
-'6379'
volumes:
-./data/bitnami/redis:/bitnami/redis/data:rw,Z
command:>
bash -c "
/opt/bitnami/scripts/redis/setup.sh
# Set proper permissions for data directories
chown -R redis:redis /bitnami/redis/data
chmod g+s /bitnami/redis/data
exec/opt/bitnami/scripts/redis/entrypoint.sh/opt/bitnami/scripts/redis/run.sh
"
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
networks:
- coze-network
minio:
image: minio/minio:RELEASE.2025-07-23T15-54-02Z
container_name: coze-minio
user: root
privileged: true
restart: always
env_file: *env_file
ports:
- '9000'
- '9001'
volumes:
- ./data/minio:/data
- ./volumes/minio/default_icon/:/default_icon
- ./volumes/minio/official_plugin_icon/:/official_plugin_icon
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin123}
MINIO_DEFAULT_BUCKETS: ${MINIO_BUCKET:-opencoze},${MINIO_DEFAULT_BUCKETS:-milvus}
entrypoint:
- /bin/sh
- -c
- |
# Run initialization in background
(
# Wait for MinIO to be ready
until (/usr/bin/mc alias set localminio http://localhost:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}) do
echo "WaitingforMinIOtobeready..."
sleep1
done
# Create bucket and copy files
/usr/bin/mcmb--ignore-existinglocalminio/$${STORAGE_BUCKET}
/usr/bin/mccp--recursive/default_icon/localminio/$${STORAGE_BUCKET}/default_icon/
/usr/bin/mccp--recursive/official_plugin_icon/localminio/$${STORAGE_BUCKET}/official_plugin_icon/
echo"MinIO initialization complete."
)&
# Start minio server in foreground
execminioserver/data--console-address":9001"
healthcheck:
test:
[
'CMD-SHELL',
'/usr/bin/mc alias set health_check http://localhost:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} && /usr/bin/mc ready health_check',
]
interval:30s
timeout:10s
retries:3
start_period:30s
networks:
-coze-network
etcd:
image:bitnami/etcd:3.5
container_name:coze-etcd
user:root
restart:always
privileged:true
env_file:*env_file
environment:
-ETCD_AUTO_COMPACTION_MODE=revision
-ETCD_AUTO_COMPACTION_RETENTION=1000
-ETCD_QUOTA_BACKEND_BYTES=4294967296
-ALLOW_NONE_AUTHENTICATION=yes
ports:
-'2379'
-'2380'
volumes:
-./data/bitnami/etcd:/bitnami/etcd:rw,Z
-./volumes/etcd/etcd.conf.yml:/opt/bitnami/etcd/conf/etcd.conf.yml:ro,Z
command:>
bash -c "
/opt/bitnami/scripts/etcd/setup.sh
# Set proper permissions for data and config directories
chown -R etcd:etcd /bitnami/etcd
chmod g+s /bitnami/etcd
exec/opt/bitnami/scripts/etcd/entrypoint.sh/opt/bitnami/scripts/etcd/run.sh
"
healthcheck:
test: ['CMD', 'etcdctl', 'endpoint', 'health']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
networks:
- coze-network
# milvusdb/milvus:v2.5.10
milvus:
container_name: coze-milvus
image: milvusdb/milvus:2.2.0-20230427-9286d7a4
user: root
privileged: true
restart: always
env_file: *env_file
command: >
bash -c "
# Set proper permissions for data directories
chown-Rroot:root/var/lib/milvus
chmodg+s/var/lib/milvus
execmilvusrunstandalone
"
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
MINIO_BUCKET_NAME: ${MINIO_BUCKET:-milvus}
MINIO_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minioadmin}
MINIO_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin123}
MINIO_USE_SSL: false
LOG_LEVEL: debug
volumes:
- ./data/milvus:/var/lib/milvus:rw,Z
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
ports:
- '19530'
- '9091'
depends_on:
etcd:
condition: service_healthy
minio:
condition: service_healthy
networks:
- coze-network
coze-server:
image: cozedev/coze-studio-server:0.3.11
restart: always
container_name: coze-server
env_file: *env_file
# environment:
# LISTEN_ADDR: 0.0.0.0:8888
networks:
- coze-network
ports:
- '8888'
- '8889'
volumes:
- .env:/app/.env
- ./backend/conf:/app/resources/conf
# - ../backend/static:/app/resources/static
depends_on:
minio:
condition: service_healthy
milvus:
condition: service_healthy
command: ['/app/opencoze']
coze-web:
image: cozedev/coze-studio-web:0.0.1
container_name: coze-web
restart: always
ports:
- "${WEB_LISTEN_ADDR:-9081}:80"
# - "443:443" # SSL port (uncomment if using SSL)
volumes:
-./nginx/nginx.conf:/etc/nginx/nginx.conf:ro# Main nginx config
-./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro# Proxy config
# - ./nginx/ssl:/etc/nginx/ssl:ro # SSL certificates (uncomment if using SSL)
depends_on:
-coze-server
networks:
-coze-network
networks:
coze-network:
driver: bridge
# Server
export LISTEN_ADDR=":8888"
export LOG_LEVEL="debug"
export MAX_REQUEST_BODY_SIZE=1073741824
export SERVER_HOST="http://localhost${LISTEN_ADDR}"
export USE_SSL="0"
export SSL_CERT_FILE=""
export SSL_KEY_FILE=""
export WEB_LISTEN_ADDR="0.0.0.0:9081"
# MySQL
export MYSQL_DATABASE=opencoze
export MYSQL_USER=coze
export MYSQL_PASSWORD=xxx
export MYSQL_HOST=192.168.68.11
export MYSQL_PORT=3306
export MYSQL_DSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=True"
export ATLAS_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=True"
# Redis
export REDIS_AOF_ENABLED=no
export REDIS_IO_THREADS=4
export ALLOW_EMPTY_PASSWORD=yes
export REDIS_ADDR="redis:6379"
export REDIS_PASSWORD=""
# This Upload component used in Agent / workflow File/Image With LLM , support the component of imagex / storage
export FILE_UPLOAD_COMPONENT_TYPE="storage"
# Storage component
export STORAGE_TYPE="minio"# minio / tos / s3
export STORAGE_UPLOAD_HTTP_SCHEME="http"# http / https. If coze studio website is https, you must set it to https
export STORAGE_BUCKET="opencoze"
# MiniIO
export MINIO_ROOT_USER=minioadmin
export MINIO_ROOT_PASSWORD=minioadmin123
export MINIO_DEFAULT_BUCKETS=milvus
export MINIO_AK=$MINIO_ROOT_USER
export MINIO_SK=$MINIO_ROOT_PASSWORD
export MINIO_ENDPOINT="minio:9000"
export MINIO_API_HOST="http://${MINIO_ENDPOINT}"
# Elasticsearch
export ES_ADDR="http://192.168.68.12:9200"
export ES_VERSION="v8"
export ES_USERNAME="elastic"
export ES_PASSWORD="xxx"
export COZE_MQ_TYPE="kafka"# nsq / kafka / rmq
export MQ_NAME_SERVER="192.168.68.13:9092"
# RocketMQ
export RMQ_ACCESS_KEY=""
export RMQ_SECRET_KEY=""
# Settings for VectorStore
# VectorStore type: milvus / vikingdb
# If you want to use vikingdb, you need to set up the vikingdb configuration.
export VECTOR_STORE_TYPE="milvus"
# milvus vector store
export MILVUS_ADDR="milvus:19530"
export MILVUS_USER=""
export MILVUS_PASSWORD=""
# Settings for Embedding
export EMBEDDING_TYPE="http"
export EMBEDDING_MAX_BATCH_SIZE=100
# http embedding
export HTTP_EMBEDDING_ADDR="" # (string, required) http embedding address
export HTTP_EMBEDDING_DIMS=1024 # (string, required) http embedding dimensions
# Settings for OCR
export OCR_TYPE="ve"
# ve ocr
export VE_OCR_AK=""
export VE_OCR_SK=""
# paddleocr ocr
export PADDLEOCR_OCR_API_URL=""
# Settings for Document Parser
# Supported parser types: `builtin`, `paddleocr`
export PARSER_TYPE="builtin"
# paddleocr structure
export PADDLEOCR_STRUCTURE_API_URL=""
# Settings for Model
# Model for agent & workflow
# add suffix number to add different models
export MODEL_PROTOCOL_0="ark" # protocol
export MODEL_OPENCOZE_ID_0="100001"# id for record
export MODEL_NAME_0="" # model name for show
export MODEL_ID_0="" # model name for connection
export MODEL_API_KEY_0="" # model api key
export MODEL_BASE_URL_0="" # model base url
# Model for knowledge nl2sql, messages2query (rewrite), image annotation, workflow knowledge recall
export BUILTIN_CM_TYPE="ark"
# type openai
export BUILTIN_CM_OPENAI_BASE_URL=""
export BUILTIN_CM_OPENAI_API_KEY=""
export BUILTIN_CM_OPENAI_BY_AZURE=false
export BUILTIN_CM_OPENAI_MODEL=""
# type ark
export BUILTIN_CM_ARK_API_KEY=""
export BUILTIN_CM_ARK_MODEL=""
export BUILTIN_CM_ARK_BASE_URL=""
# type DeepSeek
export BUILTIN_CM_DEEPSEEK_BASE_URL=""
export BUILTIN_CM_DEEPSEEK_API_KEY=""
export BUILTIN_CM_DEEPSEEK_MODEL=""
# Workflow Code Runner Configuration
# Supported code runner types: sandbox / local
# Default using local
# - sandbox: execute python code in a sandboxed env with deno + pyodide
# - local: using venv, no env isolation
export CODE_RUNNER_TYPE="local"
# Sandbox sub configuration
# Access restricted to specific environment variables, split with comma, e.g. "PATH,USERNAME"
export CODE_RUNNER_ALLOW_ENV=""
# Read access restricted to specific paths, split with comma, e.g. "/tmp,./data"
export CODE_RUNNER_ALLOW_READ=""
# Write access restricted to specific paths, split with comma, e.g. "/tmp,./data"
export CODE_RUNNER_ALLOW_WRITE=""
# Subprocess execution restricted to specific commands, split with comma, e.g. "python,git"
export CODE_RUNNER_ALLOW_RUN=""
# Network access restricted to specific domains/IPs, split with comma, e.g. "api.test.com,api.test.org:8080"
# The following CDN supports downloading the packages required for pyodide to run Python code. Sandbox may not work properly if removed.
export CODE_RUNNER_ALLOW_NET="cdn.jsdelivr.net"
# Foreign Function Interface access to specific libraries, split with comma, e.g. "/usr/lib/libm.so"
export CODE_RUNNER_ALLOW_FFI=""
# Directory for deno modules, default using pwd. e.g. "/tmp/path/node_modules"
export CODE_RUNNER_NODE_MODULES_DIR=""
# Code execution timeout, default 60 seconds. e.g. "2.56"
export CODE_RUNNER_TIMEOUT_SECONDS=""
# Code execution memory limit, default 100MB. e.g. "256"
export CODE_RUNNER_MEMORY_LIMIT_MB=""
# The function of registration controller
# If you want to disable the registration feature, set DISABLE_USER_REGISTRATION to true. You can then control allowed registrations via a whitelist with ALLOW_REGISTRATION_EMAIL.
export DISABLE_USER_REGISTRATION=""# default "", if you want to disable, set to true
export ALLOW_REGISTRATION_EMAIL=""# is a list of email addresses, separated by ",". Example: "[email protected],[email protected]"
# Plugin AES secret.
# PLUGIN_AES_AUTH_SECRET is the secret of used to encrypt plugin authorization payload.
# The size of secret must be 16, 24 or 32 bytes.
export PLUGIN_AES_AUTH_SECRET='^*6x3hdu2nc%-p38'
# PLUGIN_AES_STATE_SECRET is the secret of used to encrypt oauth state.
# The size of secret must be 16, 24 or 32 bytes.
export PLUGIN_AES_STATE_SECRET='osj^kfhsd*(z!sno'
# PLUGIN_AES_OAUTH_TOKEN_SECRET is the secret of used to encrypt oauth refresh token and access token.
# The size of secret must be 16, 24 or 32 bytes.
export PLUGIN_AES_OAUTH_TOKEN_SECRET='cn+$PJ(HhJ[5d*z9'
从 backend/conf/model/template 里面复制一个
cp backend/conf/model/template/model_template_deepseek.yaml backend/conf/model/template/deepseek.yaml
修改的配置项目
meta:
protocol: deepseek
capability:
function_call: true
conn_config:
base_url: "https://api.deepseek.com/v1"
api_key: "sk-xxx"
model: "deepseek-chat"
# 建库
CREATE DATABASE opencoze DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;
CREATE USER 'coze'@'%' IDENTIFIED BY 'xxx';
grant all privileges on opencoze.* to coze@'%' IDENTIFIED BY 'xxx';
flush privileges;
执行 volumes/mysql/schema.sql
初始化表结构
执行 volumes/mysql/sql_init.sql
初始化示例数据
es_index_schema:
https://github.com/coze-dev/coze-studio/tree/e7070b419c5e1a5f3cb789f4433b84ab7cf43519/docker/volumes/elasticsearch/es_index_schema
由于我使用已有的模型,将内置的 analyzer,由 smartcn
改为 ik_analyzer
# 新增模板
PUT _index_template/coze_resource_template
{
"index_patterns": ["coze_resource*"],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"text_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "stop", "snowball"]
}
}
}
},
"mappings": {
"dynamic": false,
"properties": {
"res_type": { "type": "keyword" },
"app_id": { "type": "keyword", "null_value": "NULL" },
"res_id": { "type": "keyword" },
"res_sub_type": { "type": "keyword" },
"name": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart",
"fields": { "raw": { "type": "keyword" } }
},
"owner_id": { "type": "keyword" },
"space_id": { "type": "keyword" },
"biz_status": { "type": "keyword" },
"publish_status": { "type": "keyword" },
"create_time": { "type": "long" },
"update_time": { "type": "long" },
"publish_time": { "type": "long" }
}
}
},
"priority": 200,
"_meta": {
"description": "resource library's index template"
}
}
PUT _index_template/project_draft_template
{
"index_patterns": ["project_draft*"],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"text_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "stop", "snowball"]
}
}
}
},
"mappings": {
"dynamic": false,
"properties": {
"create_time": {
"type": "long"
},
"has_published": {
"type": "keyword"
},
"id": {
"type": "keyword"
},
"name": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"owner_id": {
"type": "keyword"
},
"publish_time": {
"type": "long"
},
"space_id": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"update_time": {
"type": "long"
},
"fav_time": {
"type": "long"
},
"recently_open_time": {
"type": "long"
},
"is_fav": {
"type": "keyword"
},
"is_recently_open": {
"type": "keyword"
}
}
}
},
"priority": 200,
"_meta": {
"description": "Project draft index template"
}
}
# 新增索引
PUT /project_draft
PUT /coze_resource
Coze-Studio 开源版的发布展示了字节在 AI 工程化方面的强大实力,其功能完整性令人印象深刻,为业内提供了一个高起点的智能体开发平台。
对于技术团队而言,它是一个绝佳的学习和参考项目。但在决定是否用于生产前,仍需仔细评估其与自身业务需求的匹配度,以及潜在的二次开发与运维成本。是否顺手,还需要亲手试一试才知道。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2025-08-29
如何评测 AI 智能体:试试字节开源的扣子罗盘
2025-08-29
HiMarket 正式开源,为企业落地开箱即用的 AI 开放平台
2025-08-28
美团 M17 团队开源 Meeseeks 评测集:揭秘大模型的 “听话”能力
2025-08-28
我摊牌了,PDF的终结者出现了!这个开源神器,让你的RAG项目吞吐能力暴增10倍!
2025-08-28
面壁开源多模态新旗舰MiniCPM-V 4.5,8B 性能超越 72B,高刷视频理解又准又快
2025-08-28
1.9K Star 微软开源TTS王炸!90分钟超长语音合成,4人对话自然切换!
2025-08-27
初探:从0开始的AI-Agent开发踩坑实录
2025-08-27
ollama v0.11.7发布:深度集成DeepSeek-V3.1与Turbo云端推理模式解析
2025-07-23
2025-06-17
2025-08-20
2025-06-17
2025-07-23
2025-08-05
2025-07-14
2025-08-20
2025-07-29
2025-07-12