coze-studio Documentation

An AI agent development platform with all-in-one visual tools, simplifying agent creation, debugging, and deployment like never before.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy coze-studio on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name coze-studio -p 8888:8888 --restart always cozedev/coze-studio-server:latest
Configured Services & Ports
βš™οΈ mysql
image: mysql:8.4.5
βš™οΈ redis
image: bitnamilegacy/redis:8.0
βš™οΈ elasticsearch
image: bitnamilegacy/elasticsearch:8.18.0
βš™οΈ minio
image: minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1
βš™οΈ etcd
image: bitnamilegacy/etcd:3.5
βš™οΈ milvus
image: milvusdb/milvus:v2.5.10
βš™οΈ nsqlookupd
image: nsqio/nsq:v1.2.1
βš™οΈ nsqd
image: nsqio/nsq:v1.2.1
βš™οΈ nsqadmin
image: nsqio/nsq:v1.2.1
βš™οΈ coze-server
image: cozedev/coze-studio-server:latest
βš™οΈ coze-web
image: cozedev/coze-studio-web:latest
πŸ”Œ Ports: ${WEB_LISTEN_ADDR:-8888}:80
docker-compose.yml
yaml (docker-compose.yml)
name: coze-studio
x-env-file: &env_file
  - .env

services:
  mysql:
    image: mysql:8.4.5
    container_name: coze-mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
      MYSQL_DATABASE: ${MYSQL_DATABASE:-opencoze}
      MYSQL_USER: ${MYSQL_USER:-coze}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-coze123}
    env_file: *env_file
    # ports:
    #   - '3306'
    volumes:
      - ./data/mysql:/var/lib/mysql
      - ./volumes/mysql/schema.sql:/docker-entrypoint-initdb.d/init.sql
      - ./atlas/opencoze_latest_schema.hcl:/opencoze_latest_schema.hcl:ro
    entrypoint:
      - bash
      - -c
      - |
        /usr/local/bin/docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci &
        MYSQL_PID=$$!

        echo 'Waiting for MySQL to start...'
        until mysqladmin ping -h localhost -u root -p$${MYSQL_ROOT_PASSWORD} --silent 2>/dev/null; do
          echo 'MySQL is starting...'
          sleep 2
        done

        echo 'Waiting for workflow_version table to exist...'
        while true; do
          if mysql -h localhost -u root -p$${MYSQL_ROOT_PASSWORD} $${MYSQL_DATABASE} -e "SHOW TABLES LIKE 'workflow_version';" 2>/dev/null | grep -q "workflow_version"; then
            echo 'Found workflow_version table, continuing...'
            break
          else
            echo 'workflow_version table not found, retrying in 2 seconds...'
            sleep 2
          fi
        done

        echo 'MySQL is ready, installing Atlas CLI...'

        if ! command -v atlas >/dev/null 2>&1; then
          echo 'Installing Atlas CLI...'
          curl -sSf https://atlasgo.sh | sh -s -- -y --community
          export PATH=$$PATH:/root/.local/bin
        else
          echo 'Atlas CLI already installed'
        fi

        if [ -f '/opencoze_latest_schema.hcl' ]; then
          echo 'Running Atlas migrations...'
          ATLAS_URL="mysql://$${MYSQL_USER}:$${MYSQL_PASSWORD}@localhost:3306/$${MYSQL_DATABASE}"
          atlas schema apply -u "$ATLAS_URL" --to "file:///opencoze_latest_schema.hcl" --exclude "atlas_schema_revisions,table_*" --auto-approve
          echo 'Atlas migrations completed successfully'
        else
          echo 'No migrations found'
        fi
        wait $$MYSQL_PID
    healthcheck:
      test:
        [
          'CMD',
          'mysqladmin',
          'ping',
          '-h',
          'localhost',
          '-u$${MYSQL_USER}',
          '-p$${MYSQL_PASSWORD}',
        ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s
    networks:
      - coze-network

  redis:
    image: bitnamilegacy/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
  elasticsearch:
    image: bitnamilegacy/elasticsearch:8.18.0
    container_name: coze-elasticsearch
    restart: always
    user: root
    privileged: true
    env_file: *env_file
    environment:
      - TEST=1
      # Add Java certificate trust configuration
      # - ES_JAVA_OPTS=-Djdk.tls.client.protocols=TLSv1.2 -Dhttps.protocols=TLSv1.2 -Djavax.net.ssl.trustAll=true -Xms4096m -Xmx4096m
    # ports:
    #   - '9200'
    volumes:
      - ./data/bitnami/elasticsearch:/bitnami/elasticsearch/data
      - ./volumes/elasticsearch/elasticsearch.yml:/opt/bitnami/elasticsearch/config/my_elasticsearch.yml
      - ./volumes/elasticsearch/analysis-smartcn.zip:/opt/bitnami/elasticsearch/analysis-smartcn.zip:rw,Z
      - ./volumes/elasticsearch/setup_es.sh:/setup_es.sh
      - ./volumes/elasticsearch/es_index_schema:/es_index_schema
    healthcheck:
      test:
        [
          'CMD-SHELL',
          'curl -f http://localhost:9200 && [ -f /tmp/es_plugins_ready ] && [ -f /tmp/es_init_complete ]',
        ]
      interval: 5s
      timeout: 10s
      retries: 10
      start_period: 10s
    networks:
      - coze-network
    # Install smartcn analyzer plugin and initialize ES
    command: >
      bash -c "
        /opt/bitnami/scripts/elasticsearch/setup.sh
        # Set proper permissions for data directories
        chown -R elasticsearch:elasticsearch /bitnami/elasticsearch/data
        chmod g+s /bitnami/elasticsearch/data

        # Create plugin directory
        mkdir -p /bitnami/elasticsearch/plugins;

        # Unzip plugin to plugin directory and set correct permissions
        echo 'Installing smartcn plugin...';
        if [ ! -d /opt/bitnami/elasticsearch/plugins/analysis-smartcn ]; then

          # Download plugin package locally
          echo 'Copying smartcn plugin...';
          cp /opt/bitnami/elasticsearch/analysis-smartcn.zip /tmp/analysis-smartcn.zip

          elasticsearch-plugin install file:///tmp/analysis-smartcn.zip
          if [[ "$$?" != "0" ]]; then
            echo 'Plugin installation failed, exiting operation';
            rm -rf /opt/bitnami/elasticsearch/plugins/analysis-smartcn
            exit 1;
          fi;
          rm -f /tmp/analysis-smartcn.zip;
        fi;

        # Create marker file indicating plugin installation success
        touch /tmp/es_plugins_ready;
        echo 'Plugin installation successful, marker file created';

        # Start initialization script in background
        (
          echo 'Waiting for Elasticsearch to be ready...'
          until curl -s -f http://localhost:9200/_cat/health >/dev/null 2>&1; do
            echo 'Elasticsearch not ready, waiting...'
            sleep 2
          done
          echo 'Elasticsearch is ready!'

          # Run ES initialization script
          echo 'Running Elasticsearch initialization...'
          sed 's/\r$$//' /setup_es.sh > /setup_es_fixed.sh
          chmod +x /setup_es_fixed.sh
          /setup_es_fixed.sh --index-dir /es_index_schema
          # Create marker file indicating initialization completion
          touch /tmp/es_init_complete
          echo 'Elasticsearch initialization completed successfully!'
        ) &

        # Start Elasticsearch
        exec /opt/bitnami/scripts/elasticsearch/entrypoint.sh /opt/bitnami/scripts/elasticsearch/run.sh
        echo -e "⏳ Adjusting Elasticsearch disk watermark settings..."
      "

  minio:
    image: minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1
    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: ${STORAGE_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 "Waiting for MinIO to be ready..."
            sleep 1
          done

          # Create bucket and copy files
          /usr/bin/mc mb --ignore-existing localminio/$${STORAGE_BUCKET}
          /usr/bin/mc cp --recursive /default_icon/ localminio/$${STORAGE_BUCKET}/default_icon/
          /usr/bin/mc cp --recursive /official_plugin_icon/ localminio/$${STORAGE_BUCKET}/official_plugin_icon/

          echo "MinIO initialization complete."
        ) &

        # Start minio server in foreground
        exec minio server /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: bitnamilegacy/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

  milvus:
    container_name: coze-milvus
    image: milvusdb/milvus:v2.5.10
    user: root
    privileged: true
    restart: always
    env_file: *env_file
    command: >
      bash -c "
        # Set proper permissions for data directories
        chown -R root:root /var/lib/milvus
        chmod g+s /var/lib/milvus

        exec milvus run standalone
      "
    security_opt:
      - seccomp:unconfined
    environment:
      ETCD_ENDPOINTS: etcd:2379
      MINIO_ADDRESS: minio:9000
      MINIO_BUCKET_NAME: ${MINIO_DEFAULT_BUCKETS:-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
  nsqlookupd:
    image: nsqio/nsq:v1.2.1
    container_name: coze-nsqlookupd
    command: /nsqlookupd
    restart: always
    # ports:
    #   - '4160'
    #   - '4161'
    networks:
      - coze-network
    healthcheck:
      test: ['CMD-SHELL', 'nsqlookupd --version']
      interval: 5s
      timeout: 10s
      retries: 10
      start_period: 10s

  nsqd:
    image: nsqio/nsq:v1.2.1
    container_name: coze-nsqd
    command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd
    restart: always
    # ports:
    #   - '4150'
    #   - '4151'
    depends_on:
      nsqlookupd:
        condition: service_healthy
    networks:
      - coze-network
    healthcheck:
      test: ['CMD-SHELL', '/nsqd --version']
      interval: 5s
      timeout: 10s
      retries: 10
      start_period: 10s

  nsqadmin:
    image: nsqio/nsq:v1.2.1
    container_name: coze-nsqadmin
    command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
    restart: always
    # ports:
    #   - '4171'
    depends_on:
      nsqlookupd:
        condition: service_healthy
    networks:
      - coze-network

  coze-server:
    # build:
    #   context: ../
    #   dockerfile: backend/Dockerfile
    image: cozedev/coze-studio-server:latest
    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:
      mysql:
        condition: service_healthy
      redis:
        condition: service_healthy
      elasticsearch:
        condition: service_healthy
      minio:
        condition: service_healthy
      milvus:
        condition: service_healthy
    command: ['/app/opencoze']

  coze-web:
    # build:
    #   context: ..
    #   dockerfile: frontend/Dockerfile
    image: cozedev/coze-studio-web:latest
    container_name: coze-web
    restart: always
    ports:
      - "${WEB_LISTEN_ADDR:-8888}: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

What is Coze Studio?

Coze Studio is an all-in-one AI agent development tool. Providing the latest large models and tools, various development modes and frameworks, Coze Studio offers the most convenient AI agent development environment, from development to deployment.

  • Provides all core technologies needed for AI agent development: prompt, RAG, plugin, workflow, enabling developers to focus on creating the core value of AI.
  • Ready to use for professional AI agent development at the lowest cost: Coze Studio provides developers with complete app templates and build frameworks, allowing you to quickly construct various AI agents and turn creative ideas into reality.

Coze Studio, derived from the "Coze Development Platform" which has served tens of thousands of enterprises and millions of developers, we have made its core engine completely open. It is a one-stop visual development tool for AI Agents that makes creating, debugging, and deploying AI Agents unprecedentedly simple. Through Coze Studio's visual design and build tools, developers can quickly create and debug agents, apps, and workflows using no-code or low-code approaches, enabling powerful AI app development and more customized business logic. It's an ideal choice for building low-code AI products tailored . Coze Studio aims to lower the threshold for AI agent development and application, encouraging community co-construction and sharing for deeper exploration and practice in the AI field.

The backend of Coze Studio is developed using Golang, the frontend uses React + TypeScript, and the overall architecture is based on microservices and built following domain-driven design (DDD) principles. Provide developers with a high-performance, highly scalable, and easy-to-customize underlying framework to help them address complex business needs.

Feature list

Module Feature
Model service Manage the model list, integrate services such as OpenAI and Volcengine
Build agent * Build, publish, and manage agent * Support configuring workflows, knowledge bases, and other resources
Build apps * Create and publish apps * Build business logic through workflows
Build a workflow Create, modify, publish, and delete workflows
Develop resources Support creating and managing the following resources: * Plugins * Knowledge bases * Databases * Prompts
API and SDK * Create conversations, initiate chats, and other OpenAPI * Integrate agents or apps into your own app through Chat SDK

Quickstart

Learn how to obtain and deploy the open-source version of Coze Studio, quickly build projects, and experience Coze Studio's open-source version.

Environment requirements:

  • Before installing Coze Studio, please ensure that your machine meets the following minimum system requirements: 2 Core、4 GB
  • Pre-install Docker and Docker Compose, and start the Docker service.

Deployment steps:

  1. Retrieve the source code.

    bash
    # Clone code
    git clone https://github.com/coze-dev/coze-studio.git
  2. Deploy and start the service. When deploying and starting Coze Studio for the first time, it may take a while to retrieve images and build local images. Please be patient. If you see the message "Container coze-server Started," it means the Coze Studio service has started successfully.

    bash
    cd coze-studio
    # start service
    # for macOS or Linux
    make web  
    # for windows
    cp ./docker/.env.example ./docker/.env
    docker compose -f ./docker/docker-compose.yml up

    For common startup failure issues, please refer to the FAQ.

  3. Register an account by visiting http://localhost:8888/sign, entering your username and password, and clicking the Register button.

  4. Configure the model at http://localhost:8888/admin/#model-management by adding a new model. (The image version must be greater than or equal to 0.5.0.)

  5. Visit Coze Studio at http://localhost:8888/.

[!WARNING]
If you want to deploy Coze Studio in a public network environment, it is recommended to assess security risks before you begin, and take corresponding protection measures. Possible security risks include account registration functions, Python execution environments in workflow code nodes, Coze Server listening address configurations, SSRF (Server - Side Request Forgery), and some horizontal privilege escalations in APIs. For more details, refer to Quickstart.

Developer Guide

  • Project Configuration:
    • Model Configuration: Before deploying the open-source version of Coze Studio, you must configure the model service. Otherwise, you cannot select models when building agents, workflows, and apps.
    • Plugin Configuration: To use official plugins from the plugin store, you must first configure the plugins and add the authentication keys for third-party services.
    • Basic Component Configuration: Learn how to configure components such as image uploaders to use functions like image uploading in Coze Studio .
  • API Reference: The Coze Studio Community Edition API and Chat SDK are authenticated using Personal Access Token, providing APIs for conversations and workflows.
  • Development Guidelines:
    • Project Architecture: Learn about the technical architecture and core components of the open-source version of Coze Studio.
    • Code Development and Testing: Learn how to perform secondary development and testing based on the open-source version of Coze Studio.
    • Troubleshooting: Learn how to view container states and system logs.

Using the open-source version of Coze Studio

Regarding how to use Coze Studio, refer to the Coze Development Platform Official Documentation Center for more information. Please note that certain features, such as tone customization, are limited to the commercial version. Differences between the open-source and commercial versions can be found in the Feature List.

  • Quick Start: Quickly build an AI assistant agent with Coze Studio.
  • Developing Agents: Learn how to create, build, publish, and manage agents. You can use functions such as knowledge, plugins, etc., to resolve model hallucination and lack of expertise in professional fields. In addition, Coze Studio provides rich memory features that enable agents to generate more accurate responses based on a personal user's historical conversations during interactions.
  • Develop workflows: A workflow is a set of executable instructions used to implement business logic or complete specific tasks. It structures data flow and task processing for apps or agents. Coze Studio provides a visual canvas where you can quickly build workflows by dragging and dropping nodes.
  • Resources such as plugins: In Coze Studio, workflows, plugins, databases, knowledge bases, and variables are collectively referred to as resources.
  • API & SDK: Coze Studio supports API related to chat and workflows, and you can also integrate agents or apps with local business systems through Chat SDK.
  • Tutorials for practice: Learn how to use Coze Studio to implement various AI scenarios, such as building web-based online customer service using Chat SDK.

License

This project uses the Apache 2.0 license. For details, please refer to the LICENSE file.

Community contributions

We welcome community contributions. For contribution guidelines, please refer to CONTRIBUTING and Code of conduct. We look forward to your contributions!

Security and privacy

If you discover potential security issues in the project, or believe you may have found a security issue, please notify the ByteDance security team through our security center or vulnerability reporting email.
Please do not create public GitHub Issues.

Join Community

We are committed to building an open and friendly developer community. All developers interested in AI Agent development are welcome to join us!

πŸ› Issue Reports & Feature Requests

To efficiently track and resolve issues while ensuring transparency and collaboration, we recommend participating through:

πŸ’¬ Technical Discussion & Communication

Join our technical discussion groups to share experiences with other developers and stay updated with the latest project developments:

Feishu Group Chat
Scan the QR code below with Feishu mobile app to join:

Discord Server
Click to join: Coze Community

Telegram Group
Click to join: Telegram Group Coze

Acknowledgments

Thank you to all the developers and community members who have contributed to the Coze Studio project. Special thanks:

  • The Eino framework team - providing powerful support for Coze Studio's agent and workflow runtime engines, model abstractions and implementations, and knowledge base indexing and retrieval
  • The FlowGram team - providing a high-quality workflow building engine for Coze Studio's frontend workflow canvas editor
  • The Hertz team - Go HTTP framework with high-performance and strong-extensibility for building micro-services
  • All users who participated in testing and feedback