createos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CreateOS Platform Skills

CreateOS平台技能

Ship anything to production — AI agents, APIs, backends, bots, MCP servers, frontends, webhooks, workers, and more.
将任意内容发布到生产环境 — AI Agent、API、后端服务、机器人、MCP服务器、前端应用、Webhook、工作进程等。

⚠️ IMPORTANT: Authentication

⚠️ 重要提示:身份验证

For AI Agents (MCP) - USE THIS

针对AI Agent(MCP)- 使用此方式

When connected via MCP (OpenClaw, MoltBot, ClawdBot, Claude), NO API KEY NEEDED. The MCP server handles authentication automatically.
MCP Endpoint:
https://api-createos.nodeops.network/mcp
Just call the tools directly:
CreateProject(...)
UploadDeploymentFiles(...)
ListProjects(...)
当通过MCP(OpenClaw、MoltBot、ClawdBot、Claude)连接时,无需API密钥。 MCP服务器会自动处理身份验证。
MCP端点:
https://api-createos.nodeops.network/mcp
直接调用工具即可:
CreateProject(...)
UploadDeploymentFiles(...)
ListProjects(...)

For REST API (Scripts/External)

针对REST API(脚本/外部调用)

When calling REST endpoints directly (curl, Python requests, etc.):
X-Api-Key: <your-api-key>
Base URL: https://api-createos.nodeops.network
Get API key via MCP:
CreateAPIKey({name: "my-key", expiryAt: "2025-12-31T23:59:59Z"})
当直接调用REST端点时(如curl、Python requests等):
X-Api-Key: <your-api-key>
Base URL: https://api-createos.nodeops.network
通过MCP获取API密钥:
CreateAPIKey({name: "my-key", expiryAt: "2025-12-31T23:59:59Z"})

🚀 Quick Start for MCP Agents

🚀 MCP Agent快速入门

Deploy Files Directly (Fastest)

直接部署文件(最快方式)

json
// 1. Create upload project
CreateProject({
  "uniqueName": "my-app",
  "displayName": "My App",
  "type": "upload",
  "source": {},
  "settings": {
    "runtime": "node:20",
    "port": 3000
  }
})

// 2. Upload files and deploy
UploadDeploymentFiles(project_id, {
  "files": [
    {"path": "package.json", "content": "{\"name\":\"app\",\"scripts\":{\"start\":\"node index.js\"}}"},
    {"path": "index.js", "content": "require('http').createServer((req,res)=>{res.end('Hello!')}).listen(3000)"}
  ]
})

// Result: https://my-app.createos.io is live!
json
// 1. 创建上传项目
CreateProject({
  "uniqueName": "my-app",
  "displayName": "My App",
  "type": "upload",
  "source": {},
  "settings": {
    "runtime": "node:20",
    "port": 3000
  }
})

// 2. 上传文件并部署
UploadDeploymentFiles(project_id, {
  "files": [
    {"path": "package.json", "content": "{\"name\":\"app\",\"scripts\":{\"start\":\"node index.js\"}}"},
    {"path": "index.js", "content": "require('http').createServer((req,res)=>{res.end('Hello!')}).listen(3000)"}
  ]
})

// 结果:https://my-app.createos.io 已上线!

Deploy from GitHub (Auto-deploy on push)

从GitHub部署(推送时自动部署)

json
// 1. Get GitHub installation ID
ListConnectedGithubAccounts()
// Returns: [{installationId: "12345", ...}]

// 2. Find repo ID
ListGithubRepositories("12345")
// Returns: [{id: "98765", fullName: "myorg/myrepo", ...}]

// 3. Create VCS project
CreateProject({
  "uniqueName": "my-app",
  "displayName": "My App", 
  "type": "vcs",
  "source": {
    "vcsName": "github",
    "vcsInstallationId": "12345",
    "vcsRepoId": "98765"
  },
  "settings": {
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "runCommand": "npm start"
  }
})

// Auto-deploys on every git push!
json
// 1. 获取GitHub安装ID
ListConnectedGithubAccounts()
// 返回:[{installationId: "12345", ...}]

// 2. 查找仓库ID
ListGithubRepositories("12345")
// 返回:[{id: "98765", fullName: "myorg/myrepo", ...}]

// 3. 创建VCS项目
CreateProject({
  "uniqueName": "my-app",
  "displayName": "My App", 
  "type": "vcs",
  "source": {
    "vcsName": "github",
    "vcsInstallationId": "12345",
    "vcsRepoId": "98765"
  },
  "settings": {
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "runCommand": "npm start"
  }
})

// 每次git推送时自动部署!

Deploy Docker Image

部署Docker镜像

json
// 1. Create image project
CreateProject({
  "uniqueName": "my-service",
  "displayName": "My Service",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080
  }
})

// 2. Deploy image
CreateDeployment(project_id, {
  "image": "nginx:latest"
})
json
// 1. 创建镜像项目
CreateProject({
  "uniqueName": "my-service",
  "displayName": "My Service",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080
  }
})

// 2. 部署镜像
CreateDeployment(project_id, {
  "image": "nginx:latest"
})

Table of Contents

目录

Introduction

简介

What is CreateOS?

什么是CreateOS?

CreateOS is a cloud deployment platform designed for rapid shipping of any workload — from simple static sites to complex multi-agent AI systems. It provides:
  • Three deployment methods: GitHub auto-deploy, Docker images, direct file upload
  • Multi-environment support: Production, staging, development with isolated configs
  • Built-in CI/CD: Automatic builds and deployments on git push
  • Custom domains: SSL/TLS included, DNS verification
  • Real-time analytics: Request metrics, error tracking, performance monitoring
  • Security scanning: Vulnerability detection for deployments
CreateOS是一个云部署平台,专为快速发布任意工作负载而设计——从简单的静态站点到复杂的多Agent AI系统。它提供:
  • 三种部署方式:GitHub自动部署、Docker镜像、直接文件上传
  • 多环境支持:生产、预发布、开发环境,配置相互隔离
  • 内置CI/CD:git推送时自动构建和部署
  • 自定义域名:包含SSL/TLS,支持DNS验证
  • 实时分析:请求指标、错误追踪、性能监控
  • 安全扫描:部署漏洞检测

Target Users

目标用户

User TypePrimary Use Cases
AI/ML EngineersDeploy agents, MCP servers, RAG pipelines, LLM services
Backend DevelopersShip APIs, microservices, webhooks, workers
Frontend DevelopersDeploy SPAs, SSR apps, static sites
DevOps EngineersManage environments, domains, scaling, monitoring
Bot DevelopersHost Discord, Slack, Telegram bots
用户类型主要使用场景
AI/ML工程师部署Agent、MCP服务器、RAG流水线、LLM服务
后端开发者发布API、微服务、Webhook、工作进程
前端开发者部署SPA、SSR应用、静态站点
DevOps工程师管理环境、域名、扩容、监控
机器人开发者托管Discord、Slack、Telegram机器人

Supported Technologies

支持的技术

Runtimes:
node:18
,
node:20
,
node:22
,
python:3.11
,
python:3.12
,
golang:1.22
,
golang:1.25
,
rust:1.75
,
bun:1.1
,
bun:1.3
,
static
Frameworks:
nextjs
,
reactjs-spa
,
reactjs-ssr
,
vuejs-spa
,
vuejs-ssr
,
nuxtjs
,
astro
,
remix
,
express
,
fastapi
,
flask
,
django
,
gin
,
fiber
,
actix

运行时
node:18
,
node:20
,
node:22
,
python:3.11
,
python:3.12
,
golang:1.22
,
golang:1.25
,
rust:1.75
,
bun:1.1
,
bun:1.3
,
static
框架
nextjs
,
reactjs-spa
,
reactjs-ssr
,
vuejs-spa
,
vuejs-ssr
,
nuxtjs
,
astro
,
remix
,
express
,
fastapi
,
flask
,
django
,
gin
,
fiber
,
actix

Core Skills Overview

核心技能概述

🔌 MCP Tools Available (Direct Call - No Auth Needed)

🔌 可用的MCP工具(直接调用 - 无需身份验证)

When using CreateOS via MCP (OpenClaw, Claude, etc.), these tools are available directly:
Projects:
  • CreateProject
    - Create new project (vcs, image, or upload type)
  • ListProjects
    - List all projects
  • GetProject
    - Get project details
  • UpdateProject
    - Update project metadata
  • UpdateProjectSettings
    - Update build/runtime settings
  • DeleteProject
    - Delete project
Deployments:
  • CreateDeployment
    - Deploy Docker image (image projects)
  • TriggerLatestDeployment
    - Trigger build from GitHub (vcs projects)
  • UploadDeploymentFiles
    - Upload files to deploy (upload projects)
  • UploadDeploymentBase64Files
    - Upload binary files as base64
  • UploadDeploymentZip
    - Upload zip archive
  • ListDeployments
    - List all deployments
  • GetDeployment
    - Get deployment status
  • GetBuildLogs
    - View build logs
  • GetDeploymentLogs
    - View runtime logs
  • RetriggerDeployment
    - Retry failed deployment
  • CancelDeployment
    - Cancel queued/building deployment
  • WakeupDeployment
    - Wake sleeping deployment
Environments:
  • CreateProjectEnvironment
    - Create environment (production, staging, etc.)
  • ListProjectEnvironments
    - List environments
  • UpdateProjectEnvironment
    - Update environment config
  • UpdateProjectEnvironmentEnvironmentVariables
    - Set env vars
  • UpdateProjectEnvironmentResources
    - Scale CPU/memory/replicas
  • AssignDeploymentToProjectEnvironment
    - Assign deployment to env
  • DeleteProjectEnvironment
    - Delete environment
Domains:
  • CreateDomain
    - Add custom domain
  • ListDomains
    - List domains
  • RefreshDomain
    - Verify DNS
  • UpdateDomainEnvironment
    - Assign domain to environment
  • DeleteDomain
    - Remove domain
GitHub:
  • ListConnectedGithubAccounts
    - Get connected GitHub accounts
  • ListGithubRepositories
    - List accessible repos
  • ListGithubRepositoryBranches
    - List branches
Apps:
  • CreateApp
    - Create app to group projects
  • ListApps
    - List apps
  • AddProjectsToApp
    - Add projects to app
User:
  • GetCurrentUser
    - Get user info
  • GetQuotas
    - Check usage limits
  • GetSupportedProjectTypes
    - List runtimes/frameworks
当通过MCP(OpenClaw、Claude等)使用CreateOS时,可直接调用以下工具:
项目:
  • CreateProject
    - 创建新项目(vcs、image或upload类型)
  • ListProjects
    - 列出所有项目
  • GetProject
    - 获取项目详情
  • UpdateProject
    - 更新项目元数据
  • UpdateProjectSettings
    - 更新构建/运行时设置
  • DeleteProject
    - 删除项目
部署:
  • CreateDeployment
    - 部署Docker镜像(image项目)
  • TriggerLatestDeployment
    - 从GitHub触发构建(vcs项目)
  • UploadDeploymentFiles
    - 上传文件进行部署(upload项目)
  • UploadDeploymentBase64Files
    - 以base64格式上传二进制文件
  • UploadDeploymentZip
    - 上传ZIP归档文件
  • ListDeployments
    - 列出所有部署
  • GetDeployment
    - 获取部署状态
  • GetBuildLogs
    - 查看构建日志
  • GetDeploymentLogs
    - 查看运行时日志
  • RetriggerDeployment
    - 重试失败的部署
  • CancelDeployment
    - 取消排队/构建中的部署
  • WakeupDeployment
    - 唤醒休眠的部署
环境:
  • CreateProjectEnvironment
    - 创建环境(生产、预发布等)
  • ListProjectEnvironments
    - 列出环境
  • UpdateProjectEnvironment
    - 更新环境配置
  • UpdateProjectEnvironmentEnvironmentVariables
    - 设置环境变量
  • UpdateProjectEnvironmentResources
    - 调整CPU/内存/副本数
  • AssignDeploymentToProjectEnvironment
    - 将部署分配到环境
  • DeleteProjectEnvironment
    - 删除环境
域名:
  • CreateDomain
    - 添加自定义域名
  • ListDomains
    - 列出域名
  • RefreshDomain
    - 验证DNS
  • UpdateDomainEnvironment
    - 将域名分配到环境
  • DeleteDomain
    - 移除域名
GitHub:
  • ListConnectedGithubAccounts
    - 获取已连接的GitHub账户
  • ListGithubRepositories
    - 列出可访问的仓库
  • ListGithubRepositoryBranches
    - 列出分支
应用:
  • CreateApp
    - 创建应用以分组项目
  • ListApps
    - 列出应用
  • AddProjectsToApp
    - 将项目添加到应用
用户:
  • GetCurrentUser
    - 获取用户信息
  • GetQuotas
    - 查看使用限制
  • GetSupportedProjectTypes
    - 列出支持的运行时和框架

Functional Skills

功能技能

Skill CategoryCapabilities
Project ManagementCreate, configure, update, delete, transfer projects
DeploymentBuild, deploy, rollback, wake, cancel deployments
Environment ManagementMulti-env configs, env vars, resource scaling
Domain ManagementCustom domains, SSL, DNS verification
GitHub IntegrationAuto-deploy, branch management, repo access
AnalyticsRequest metrics, error rates, performance data
SecurityVulnerability scanning, API key management
OrganizationGroup projects into apps, manage services
技能类别能力
项目管理创建、配置、更新、删除、转移项目
部署构建、部署、回滚、唤醒、取消部署
环境管理多环境配置、环境变量、资源扩容
域名管理自定义域名、SSL、DNS验证
GitHub集成自动部署、分支管理、仓库访问
分析请求指标、错误率、性能数据
安全漏洞扫描、API密钥管理
组织将项目分组为应用、管理服务

Technical Skills

技术技能

SkillDescription
AuthenticationAPI key-based auth with expiry management
Build AIAutomatic build configuration detection
Dockerfile SupportCustom container builds
Environment IsolationSeparate configs per environment
Resource ManagementCPU, memory, replica scaling

技能描述
身份验证基于API密钥的身份验证,支持过期管理
构建AI自动检测构建配置
Dockerfile支持自定义容器构建
环境隔离每个环境的配置相互独立
资源管理CPU、内存、副本数调整

Project Management Skills

项目管理技能

Skill: Create Projects

技能:创建项目

Create new projects with full configuration for build and runtime settings.
创建新项目,配置完整的构建和运行时设置。

Project Types

项目类型

TypeDescriptionBest For
vcs
GitHub-connected repositoryProduction apps with CI/CD
image
Docker container deploymentPre-built images, complex deps
upload
Direct file uploadQuick prototypes, static sites
类型描述最佳适用场景
vcs
连接GitHub仓库带CI/CD的生产应用
image
Docker容器部署预构建镜像、复杂依赖项
upload
直接文件上传快速原型、静态站点

VCS Project Creation

VCS项目创建

What it does: Links a GitHub repository for automatic deployments on push.
Why it's useful: Enables GitOps workflow — push to deploy with zero manual intervention.
How to implement:
json
CreateProject({
  "uniqueName": "my-nextjs-app",
  "displayName": "My Next.js Application",
  "type": "vcs",
  "source": {
    "vcsName": "github",
    "vcsInstallationId": "12345678",
    "vcsRepoId": "98765432"
  },
  "settings": {
    "framework": "nextjs",
    "runtime": "node:20",
    "port": 3000,
    "directoryPath": ".",
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "runCommand": "npm start",
    "buildVars": {
      "NODE_ENV": "production",
      "NEXT_PUBLIC_API_URL": "https://api.example.com"
    },
    "runEnvs": {
      "DATABASE_URL": "postgresql://...",
      "SECRET_KEY": "..."
    },
    "ignoreBranches": ["develop", "feature/*"],
    "hasDockerfile": false,
    "useBuildAI": false
  },
  "appId": "optional-app-uuid",
  "enabledSecurityScan": true
})
Prerequisites:
  • GitHub account connected via
    InstallGithubApp
  • Repository access granted to CreateOS GitHub App
Potential pitfalls:
  • Incorrect
    vcsRepoId
    causes deployment failures
  • Missing
    port
    setting results in health check failures
  • buildVars
    vs
    runEnvs
    confusion (build-time vs runtime)
功能:链接GitHub仓库,推送时自动部署。
优势:启用GitOps工作流——推送代码即可部署,无需手动干预。
实现方式:
json
CreateProject({
  "uniqueName": "my-nextjs-app",
  "displayName": "My Next.js Application",
  "type": "vcs",
  "source": {
    "vcsName": "github",
    "vcsInstallationId": "12345678",
    "vcsRepoId": "98765432"
  },
  "settings": {
    "framework": "nextjs",
    "runtime": "node:20",
    "port": 3000,
    "directoryPath": ".",
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "runCommand": "npm start",
    "buildVars": {
      "NODE_ENV": "production",
      "NEXT_PUBLIC_API_URL": "https://api.example.com"
    },
    "runEnvs": {
      "DATABASE_URL": "postgresql://...",
      "SECRET_KEY": "..."
    },
    "ignoreBranches": ["develop", "feature/*"],
    "hasDockerfile": false,
    "useBuildAI": false
  },
  "appId": "optional-app-uuid",
  "enabledSecurityScan": true
})
前提条件:
  • 通过
    InstallGithubApp
    连接GitHub账户
  • 授予CreateOS GitHub应用仓库访问权限
潜在陷阱:
  • vcsRepoId
    错误会导致部署失败
  • 缺少
    port
    设置会导致健康检查失败
  • 混淆
    buildVars
    runEnvs
    (构建时 vs 运行时)

Image Project Creation

镜像项目创建

What it does: Deploys pre-built Docker images without build step.
Why it's useful: Faster deployments, complex dependencies, existing CI pipelines.
json
CreateProject({
  "uniqueName": "my-api-service",
  "displayName": "My API Service",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080,
    "runEnvs": {
      "API_KEY": "secret",
      "LOG_LEVEL": "info"
    }
  }
})
Implications:
  • No build logs (image already built)
  • Must manage image registry separately
  • Version control via image tags
功能:部署预构建的Docker镜像,无需构建步骤。
优势:部署速度更快,支持复杂依赖项,适配现有CI流水线。
json
CreateProject({
  "uniqueName": "my-api-service",
  "displayName": "My API Service",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080,
    "runEnvs": {
      "API_KEY": "secret",
      "LOG_LEVEL": "info"
    }
  }
})
注意事项:
  • 无构建日志(镜像已提前构建)
  • 需单独管理镜像仓库
  • 通过镜像标签进行版本控制

Upload Project Creation

上传项目创建

What it does: Deploy by uploading files directly — no Git required.
Why it's useful: Quick prototypes, migrations, CI-generated artifacts.
json
CreateProject({
  "uniqueName": "quick-prototype",
  "displayName": "Quick Prototype",
  "type": "upload",
  "source": {},
  "settings": {
    "framework": "express",
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "buildDir": "dist",
    "useBuildAI": true
  }
})
功能:直接上传文件部署——无需Git。
优势:快速原型开发、迁移、CI生成的产物部署。
json
CreateProject({
  "uniqueName": "quick-prototype",
  "displayName": "Quick Prototype",
  "type": "upload",
  "source": {},
  "settings": {
    "framework": "express",
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "buildCommand": "npm run build",
    "buildDir": "dist",
    "useBuildAI": true
  }
})

Skill: Update Project Settings

技能:更新项目设置

Modify build and runtime configuration without recreating projects.
json
UpdateProjectSettings(project_id, {
  "framework": "nextjs",
  "runtime": "node:22",
  "port": 3000,
  "installCommand": "npm ci",
  "buildCommand": "npm run build",
  "runCommand": "npm start",
  "buildDir": ".next",
  "buildVars": {"NODE_ENV": "production"},
  "runEnvs": {"NEW_VAR": "value"},
  "ignoreBranches": ["wip/*"],
  "hasDockerfile": false,
  "useBuildAI": false
})
Edge cases:
  • Changing
    runtime
    triggers rebuild on next deployment
  • Changing
    port
    requires redeployment to take effect
  • ignoreBranches
    only affects future pushes
无需重新创建项目,即可修改构建和运行时配置。
json
UpdateProjectSettings(project_id, {
  "framework": "nextjs",
  "runtime": "node:22",
  "port": 3000,
  "installCommand": "npm ci",
  "buildCommand": "npm run build",
  "runCommand": "npm start",
  "buildDir": ".next",
  "buildVars": {"NODE_ENV": "production"},
  "runEnvs": {"NEW_VAR": "value"},
  "ignoreBranches": ["wip/*"],
  "hasDockerfile": false,
  "useBuildAI": false
})
边缘情况:
  • 更改
    runtime
    会触发下一次部署时的重建
  • 更改
    port
    需要重新部署才会生效
  • ignoreBranches
    仅影响未来的推送

Skill: Project Lifecycle Management

技能:项目生命周期管理

OperationToolUse Case
List projects
ListProjects(limit?, offset?, name?, type?, status?, app?)
Dashboard, search
Get details
GetProject(project_id)
View full config
Update metadata
UpdateProject(project_id, {displayName, description?, enabledSecurityScan?})
Rename, toggle features
Delete
DeleteProject(project_id)
Cleanup (async deletion)
Check name
CheckProjectUniqueName({uniqueName})
Validation before create
操作工具使用场景
列出项目
ListProjects(limit?, offset?, name?, type?, status?, app?)
仪表板、搜索
获取详情
GetProject(project_id)
查看完整配置
更新元数据
UpdateProject(project_id, {displayName, description?, enabledSecurityScan?})
重命名、切换功能
删除
DeleteProject(project_id)
清理(异步删除)
检查名称
CheckProjectUniqueName({uniqueName})
创建前验证

Skill: Project Transfer

技能:项目转移

Transfer project ownership between users.
1. Owner: GetProjectTransferUri(project_id) → returns {uri, token} (valid 6 hours)
2. Owner: Share URI with recipient
3. Recipient: TransferProject(project_id, token)
4. Audit: ListProjectTransferHistory(project_id)
Security implications:
  • Token expires after 6 hours
  • Transfer is irreversible
  • All environments and deployments transfer

在用户之间转移项目所有权。
1. 所有者:调用`GetProjectTransferUri(project_id)` → 返回{uri, token}(有效期6小时)
2. 所有者:将URI分享给接收方
3. 接收方:调用`TransferProject(project_id, token)`
4. 审计:调用`ListProjectTransferHistory(project_id)`
安全注意事项:
  • Token 6小时后过期
  • 转移不可撤销
  • 所有环境和部署都会被转移

Deployment Skills

部署技能

Skill: Trigger Deployments

技能:触发部署

For VCS Projects

针对VCS项目

Automatic (recommended): Push to GitHub triggers deployment automatically.
Manual trigger:
json
TriggerLatestDeployment(project_id, branch?)
// branch defaults to repo's default branch
自动触发(推荐):推送到GitHub时自动触发部署。
手动触发:
json
TriggerLatestDeployment(project_id, branch?)
// branch默认使用仓库的默认分支

For Image Projects

针对镜像项目

json
CreateDeployment(project_id, {
  "image": "nginx:latest"
})
// Supports any valid Docker image reference:
// - nginx:latest
// - myregistry.com/myapp:v1.2.3
// - ghcr.io/org/repo:sha-abc123
json
CreateDeployment(project_id, {
  "image": "nginx:latest"
})
// 支持任何有效的Docker镜像引用:
// - nginx:latest
// - myregistry.com/myapp:v1.2.3
// - ghcr.io/org/repo:sha-abc123

For Upload Projects

针对上传项目

Direct files:
json
UploadDeploymentFiles(project_id, {
  "files": [
    {"path": "package.json", "content": "{\"name\":\"app\",...}"},
    {"path": "index.js", "content": "const express = require('express')..."},
    {"path": "public/style.css", "content": "body { margin: 0; }"}
  ]
})
Base64 files (for binary content):
json
UploadDeploymentBase64Files(project_id, {
  "files": [
    {"path": "assets/logo.png", "content": "iVBORw0KGgo..."}
  ]
})
ZIP upload:
json
UploadDeploymentZip(project_id, {file: zipBinaryData})
Limitations:
  • Max 100 files per upload
  • Use ZIP for larger projects
直接上传文件:
json
UploadDeploymentFiles(project_id, {
  "files": [
    {"path": "package.json", "content": "{\"name\":\"app\",...}"},
    {"path": "index.js", "content": "const express = require('express')..."},
    {"path": "public/style.css", "content": "body { margin: 0; }"}
  ]
})
Base64文件上传(适用于二进制内容):
json
UploadDeploymentBase64Files(project_id, {
  "files": [
    {"path": "assets/logo.png", "content": "iVBORw0KGgo..."}
  ]
})
ZIP上传:
json
UploadDeploymentZip(project_id, {file: zipBinaryData})
限制:
  • 每次上传最多100个文件
  • 大型项目请使用ZIP上传

Skill: Deployment Lifecycle

技能:部署生命周期

┌─────────┐    ┌──────────┐    ┌───────────┐    ┌──────────┐
│ queued  │ →  │ building │ →  │ deploying │ →  │ deployed │
└─────────┘    └──────────┘    └───────────┘    └──────────┘
                    │                                 │
                    ↓                                 ↓
               ┌────────┐                       ┌──────────┐
               │ failed │                       │ sleeping │
               └────────┘                       └──────────┘
StateDescriptionActions Available
queued
Waiting for build slotCancel
building
Build in progressCancel, View logs
deploying
Pushing to infrastructureWait
deployed
Live and serving trafficAssign to env
failed
Build or deploy errorRetry, View logs
sleeping
Idle timeout (cost saving)Wake up
┌─────────┐    ┌──────────┐    ┌───────────┐    ┌──────────┐
│ 排队中  │ →  │ 构建中  │ →  │ 部署中  │ →  │ 已部署  │
└─────────┘    └──────────┘    └───────────┘    └──────────┘
                    │                                 │
                    ↓                                 ↓
               ┌────────┐                       ┌──────────┐
               │ 失败  │                       │ 休眠中  │
               └────────┘                       └──────────┘
状态描述可用操作
queued
等待构建插槽取消
building
构建进行中取消、查看日志
deploying
推送到基础设施等待
deployed
已上线并处理流量分配到环境
failed
构建或部署错误重试、查看日志
sleeping
空闲超时(节省成本)唤醒

Skill: Deployment Operations

技能:部署操作

OperationToolNotes
List
ListDeployments(project_id, limit?, offset?)
Max 20/page, paginate for more
Get details
GetDeployment(project_id, deployment_id)
Full status, timestamps, URLs
Retry
RetriggerDeployment(project_id, deployment_id, settings?)
settings
: "project" or "deployment"
Cancel
CancelDeployment(project_id, deployment_id)
Only
queued
/
building
states
Delete
DeleteDeployment(project_id, deployment_id)
Marks for async deletion
Wake
WakeupDeployment(project_id, deployment_id)
Restarts sleeping deployment
Download
DownloadDeployment(project_id, deployment_id)
Upload projects only
操作工具说明
列出
ListDeployments(project_id, limit?, offset?)
最多20条/页,分页查看更多
获取详情
GetDeployment(project_id, deployment_id)
完整状态、时间戳、URL
重试
RetriggerDeployment(project_id, deployment_id, settings?)
settings
: "project"或"deployment"
取消
CancelDeployment(project_id, deployment_id)
仅适用于
queued
/
building
状态
删除
DeleteDeployment(project_id, deployment_id)
标记为异步删除
唤醒
WakeupDeployment(project_id, deployment_id)
重启休眠的部署
下载
DownloadDeployment(project_id, deployment_id)
仅适用于上传项目

Skill: Debug with Logs

技能:使用日志调试

Build logs — Debug compilation/build failures:
json
GetBuildLogs(project_id, deployment_id, skip?)
// skip: number of lines to skip (for pagination)
Runtime logs — Debug application errors:
json
GetDeploymentLogs(project_id, deployment_id, since-seconds?)
// since-seconds: look back window (default: 60)
Environment logs — Aggregate logs for an environment:
json
GetProjectEnvironmentLogs(project_id, environment_id, since-seconds?)

构建日志 — 调试编译/构建失败:
json
GetBuildLogs(project_id, deployment_id, skip?)
// skip: 跳过的行数(用于分页)
运行时日志 — 调试应用错误:
json
GetDeploymentLogs(project_id, deployment_id, since-seconds?)
// since-seconds: 回溯时间窗口(默认:60秒)
环境日志 — 环境的聚合日志:
json
GetProjectEnvironmentLogs(project_id, environment_id, since-seconds?)

Environment Management Skills

环境管理技能

Skill: Create Environments

技能:创建环境

Environments provide isolated configurations for the same codebase.
Typical setup:
  • production
    — Live traffic, max resources
  • staging
    — Pre-production testing
  • development
    — Feature development
环境为同一代码库提供隔离的配置。
典型配置:
  • production
    — 处理实时流量,分配最大资源
  • staging
    — 预生产测试
  • development
    — 功能开发

VCS Project Environment (branch required)

VCS项目环境(需要分支)

json
CreateProjectEnvironment(project_id, {
  "displayName": "Production",
  "uniqueName": "production",
  "description": "Live production environment",
  "branch": "main",
  "isAutoPromoteEnabled": true,
  "resources": {
    "cpu": 500,
    "memory": 1024,
    "replicas": 2
  },
  "settings": {
    "runEnvs": {
      "NODE_ENV": "production",
      "DATABASE_URL": "postgresql://prod-db:5432/app",
      "REDIS_URL": "redis://prod-cache:6379"
    }
  }
})
json
CreateProjectEnvironment(project_id, {
  "displayName": "生产环境",
  "uniqueName": "production",
  "description": "线上生产环境",
  "branch": "main",
  "isAutoPromoteEnabled": true,
  "resources": {
    "cpu": 500,
    "memory": 1024,
    "replicas": 2
  },
  "settings": {
    "runEnvs": {
      "NODE_ENV": "production",
      "DATABASE_URL": "postgresql://prod-db:5432/app",
      "REDIS_URL": "redis://prod-cache:6379"
    }
  }
})

Image Project Environment (no branch)

镜像项目环境(无需分支)

json
CreateProjectEnvironment(project_id, {
  "displayName": "Production",
  "uniqueName": "production",
  "description": "Live production environment",
  "resources": {
    "cpu": 500,
    "memory": 1024,
    "replicas": 2
  },
  "settings": {
    "runEnvs": {
      "NODE_ENV": "production"
    }
  }
})
json
CreateProjectEnvironment(project_id, {
  "displayName": "生产环境",
  "uniqueName": "production",
  "description": "线上生产环境",
  "resources": {
    "cpu": 500,
    "memory": 1024,
    "replicas": 2
  },
  "settings": {
    "runEnvs": {
      "NODE_ENV": "production"
    }
  }
})

Skill: Resource Management

技能:资源管理

ResourceMinMaxUnitImplications
CPU200500millicoresHigher = faster processing
Memory5001024MBHigher = more data in memory
Replicas13instancesHigher = more availability
json
UpdateProjectEnvironmentResources(project_id, environment_id, {
  "cpu": 500,
  "memory": 1024,
  "replicas": 3
})
Scaling considerations:
  • Replicas > 1 requires stateless application design
  • Memory limits cause OOM kills if exceeded
  • CPU throttling occurs at limit (not killed)
资源最小值最大值单位影响
CPU200500millicores值越高,处理速度越快
内存5001024MB值越高,可在内存中存储的数据越多
副本数13实例数值越高,可用性越高
json
UpdateProjectEnvironmentResources(project_id, environment_id, {
  "cpu": 500,
  "memory": 1024,
  "replicas": 3
})
扩容注意事项:
  • 副本数>1需要应用为无状态设计
  • 内存限制超出会导致OOM终止
  • CPU达到限制时会被节流(不会终止)

Skill: Environment Variables

技能:环境变量

json
UpdateProjectEnvironmentEnvironmentVariables(project_id, environment_id, {
  "runEnvs": {
    "DATABASE_URL": "postgresql://...",
    "API_KEY": "new-secret-key",
    "LOG_LEVEL": "debug",
    "FEATURE_FLAG_X": "enabled"
  },
  "port": 8080  // Image projects only
})
Best practices:
  • Never commit secrets to code — use
    runEnvs
  • Use different values per environment
  • Redeploy after changing vars for effect
json
UpdateProjectEnvironmentEnvironmentVariables(project_id, environment_id, {
  "runEnvs": {
    "DATABASE_URL": "postgresql://...",
    "API_KEY": "new-secret-key",
    "LOG_LEVEL": "debug",
    "FEATURE_FLAG_X": "enabled"
  },
  "port": 8080  // 仅适用于镜像项目
})
最佳实践:
  • 永远不要将机密信息提交到代码中——使用
    runEnvs
    存储
  • 每个环境使用不同的值
  • 更改变量后需要重新部署才会生效

Skill: Deployment Assignment

技能:部署分配

Manually control which deployment serves an environment:
json
AssignDeploymentToProjectEnvironment(project_id, environment_id, {
  "deploymentId": "deployment-uuid"
})
Use cases:
  • Rollback to previous deployment
  • Blue-green deployment switching
  • Canary releases (with multiple envs)

手动控制哪个部署为环境提供服务:
json
AssignDeploymentToProjectEnvironment(project_id, environment_id, {
  "deploymentId": "deployment-uuid"
})
使用场景:
  • 回滚到之前的部署
  • 蓝绿部署切换
  • 金丝雀发布(配合多个环境)

Domain & Routing Skills

域名与路由技能

Skill: Add Custom Domains

技能:添加自定义域名

json
CreateDomain(project_id, {
  "name": "api.mycompany.com",
  "environmentId": "optional-env-uuid"  // Assign immediately
})
Response includes DNS instructions:
Add CNAME record:
  api.mycompany.com → <createos-provided-target>
json
CreateDomain(project_id, {
  "name": "api.mycompany.com",
  "environmentId": "optional-env-uuid"  // 立即分配
})
响应包含DNS配置说明:
添加CNAME记录:
  api.mycompany.com → <createos提供的目标地址>

Skill: Domain Verification Flow

技能:域名验证流程

1. CreateDomain → Status: pending
2. Configure DNS at your registrar
3. Wait for DNS propagation (up to 48 hours)
4. RefreshDomain → Status: active (if verified)
json
RefreshDomain(project_id, domain_id)
// Only available when status is "pending"
1. 调用CreateDomain → 状态:pending
2. 在域名注册商处配置DNS
3. 等待DNS传播(最多48小时)
4. 调用RefreshDomain → 状态:active(如果验证通过)
json
RefreshDomain(project_id, domain_id)
// 仅当状态为"pending"时可用

Skill: Domain-Environment Assignment

技能:域名-环境分配

Route domain traffic to specific environment:
json
UpdateDomainEnvironment(project_id, domain_id, {
  "environmentId": "production-env-uuid"
})
// Set to null to unassign
Multi-domain setup example:
  • app.example.com
    → production environment
  • staging.example.com
    → staging environment
  • dev.example.com
    → development environment
将域名流量路由到特定环境:
json
UpdateDomainEnvironment(project_id, domain_id, {
  "environmentId": "production-env-uuid"
})
// 设置为null可取消分配
多域名配置示例:
  • app.example.com
    → 生产环境
  • staging.example.com
    → 预发布环境
  • dev.example.com
    → 开发环境

Skill: Domain Operations

技能:域名操作

OperationTool
List
ListDomains(project_id)
Verify
RefreshDomain(project_id, domain_id)
Assign
UpdateDomainEnvironment(project_id, domain_id, {environmentId})
Delete
DeleteDomain(project_id, domain_id)

操作工具
列出
ListDomains(project_id)
验证
RefreshDomain(project_id, domain_id)
分配
UpdateDomainEnvironment(project_id, domain_id, {environmentId})
删除
DeleteDomain(project_id, domain_id)

GitHub Integration Skills

GitHub集成技能

Skill: Connect GitHub Account

技能:连接GitHub账户

json
InstallGithubApp({
  "installationId": 12345678,
  "code": "oauth-code-from-github-redirect"
})
Flow:
  1. User clicks "Connect GitHub" in CreateOS
  2. Redirected to GitHub for authorization
  3. GitHub redirects back with
    code
    and
    installationId
  4. Call
    InstallGithubApp
    to complete connection
json
InstallGithubApp({
  "installationId": 12345678,
  "code": "oauth-code-from-github-redirect"
})
流程:
  1. 用户在CreateOS中点击“连接GitHub”
  2. 重定向到GitHub进行授权
  3. GitHub重定向回来并携带
    code
    installationId
  4. 调用
    InstallGithubApp
    完成连接

Skill: Repository Discovery

技能:仓库发现

json
// 1. Get connected accounts
ListConnectedGithubAccounts()
// Returns: [{installationId, accountName, accountType}, ...]

// 2. List accessible repositories
ListGithubRepositories(installation_id)
// Returns: [{id, name, fullName, private, defaultBranch}, ...]

// 3. List branches for a repo
ListGithubRepositoryBranches(installation_id, "owner/repo", page?, per-page?, protected?)
// Returns: [{name, protected}, ...]

// 4. Get file tree (for monorepo path selection)
GetGithubRepositoryContent(installation_id, {
  "repository": "owner/repo",
  "branch": "main",
  "treeSha": "optional-tree-sha"
})
json
// 1. 获取已连接的账户
ListConnectedGithubAccounts()
// 返回:[{installationId, accountName, accountType}, ...]

// 2. 列出可访问的仓库
ListGithubRepositories(installation_id)
// 返回:[{id, name, fullName, private, defaultBranch}, ...]

// 3. 列出仓库的分支
ListGithubRepositoryBranches(installation_id, "owner/repo", page?, per-page?, protected?)
// 返回:[{name, protected}, ...]

// 4. 获取文件树(用于选择单体仓库的路径)
GetGithubRepositoryContent(installation_id, {
  "repository": "owner/repo",
  "branch": "main",
  "treeSha": "optional-tree-sha"
})

Skill: Auto-Deploy Configuration

技能:自动部署配置

Branch filtering — Ignore branches from auto-deploy:
json
UpdateProjectSettings(project_id, {
  "ignoreBranches": ["develop", "feature/*", "wip/*"]
})
Auto-promote — Automatically assign deployments to environment:
json
CreateProjectEnvironment(project_id, {
  "branch": "main",
  "isAutoPromoteEnabled": true,
  // ... other settings
})
When
isAutoPromoteEnabled: true
, successful deployments from the branch automatically become active in that environment.

分支过滤 — 忽略不需要自动部署的分支:
json
UpdateProjectSettings(project_id, {
  "ignoreBranches": ["develop", "feature/*", "wip/*"]
})
自动升级 — 自动将部署分配到环境:
json
CreateProjectEnvironment(project_id, {
  "branch": "main",
  "isAutoPromoteEnabled": true,
  // ... 其他设置
})
isAutoPromoteEnabled: true
时,该分支的成功部署会自动成为该环境的活跃部署。

Analytics & Monitoring Skills

分析与监控技能

Skill: Comprehensive Analytics

技能:综合分析

json
GetProjectEnvironmentAnalytics(project_id, environment_id, {
  "start": 1704067200,  // Unix timestamp (default: 1 hour ago)
  "end": 1704070800     // Unix timestamp (default: now)
})
Returns:
  • Overall request counts
  • Status code distribution
  • RPM (requests per minute)
  • Success percentage
  • Top hit paths
  • Top error paths
json
GetProjectEnvironmentAnalytics(project_id, environment_id, {
  "start": 1704067200,  // Unix时间戳(默认:1小时前)
  "end": 1704070800     // Unix时间戳(默认:现在)
})
返回内容:
  • 总请求数
  • 状态码分布
  • RPM(每分钟请求数)
  • 成功率
  • 热门访问路径
  • 热门错误路径

Skill: Individual Metrics

技能:单独指标

MetricToolReturns
Overall requests
GetProjectEnvironmentAnalyticsOverallRequests
Total, 2xx, 4xx, 5xx counts
RPM
GetProjectEnvironmentAnalyticsRPM
Peak and average RPM
Success %
GetProjectEnvironmentAnalyticsSuccessPercentage
(2xx + 3xx) / total
Time series
GetProjectEnvironmentAnalyticsRequestsOverTime
Requests by status over time
Top paths
GetProjectEnvironmentAnalyticsTopHitPaths
Top 10 most accessed
Error paths
GetProjectEnvironmentAnalyticsTopErrorPaths
Top 10 error-prone
Distribution
GetEnvAnalyticsReqDistribution
Breakdown by status code
指标工具返回内容
总请求数
GetProjectEnvironmentAnalyticsOverallRequests
总数、2xx、4xx、5xx数量
RPM
GetProjectEnvironmentAnalyticsRPM
峰值和平均RPM
成功率
GetProjectEnvironmentAnalyticsSuccessPercentage
(2xx + 3xx) / 总数
时间序列
GetProjectEnvironmentAnalyticsRequestsOverTime
按状态码划分的请求时序数据
热门路径
GetProjectEnvironmentAnalyticsTopHitPaths
前10个最常访问的路径
错误路径
GetProjectEnvironmentAnalyticsTopErrorPaths
前10个易出错的路径
分布
GetEnvAnalyticsReqDistribution
按状态码细分的请求分布

Skill: Performance Monitoring

技能:性能监控

Identify issues:
  1. Check
    SuccessPercentage
    — drop indicates problems
  2. Review
    TopErrorPaths
    — find problematic endpoints
  3. Analyze
    RequestsOverTime
    — spot traffic patterns
  4. Monitor
    RPM
    — detect traffic spikes

识别问题:
  1. 查看
    SuccessPercentage
    — 下降表示存在问题
  2. 查看
    TopErrorPaths
    — 找到有问题的端点
  3. 分析
    RequestsOverTime
    — 发现流量模式
  4. 监控
    RPM
    — 检测流量峰值

Security Skills

安全技能

Skill: Vulnerability Scanning

技能:漏洞扫描

Enable scanning:
json
UpdateProject(project_id, {
  "enabledSecurityScan": true
})
Trigger scan:
json
TriggerSecurityScan(project_id, deployment_id)
View results:
json
GetSecurityScan(project_id, deployment_id)
// Returns: {status, vulnerabilities, summary}
Download full report:
json
GetSecurityScanDownloadUri(project_id, deployment_id)
// Only when status is "successful"
// Returns signed URL for report download
Retry failed scan:
json
RetriggerSecurityScan(project_id, deployment_id)
// Only when status is "failed"

启用扫描:
json
UpdateProject(project_id, {
  "enabledSecurityScan": true
})
触发扫描:
json
TriggerSecurityScan(project_id, deployment_id)
查看结果:
json
GetSecurityScan(project_id, deployment_id)
// 返回:{status, vulnerabilities, summary}
下载完整报告:
json
GetSecurityScanDownloadUri(project_id, deployment_id)
// 仅当状态为"successful"时可用
// 返回用于下载报告的签名URL
重试失败的扫描:
json
RetriggerSecurityScan(project_id, deployment_id)
// 仅当状态为"failed"时可用

Organization Skills (Apps)

组织技能(应用)

Skill: Group Projects

技能:分组项目

Apps provide logical grouping for related projects and services.
json
CreateApp({
  "name": "E-Commerce Platform",
  "description": "All services for the e-commerce system",
  "color": "#3B82F6"
})
应用为相关项目和服务提供逻辑分组。
json
CreateApp({
  "name": "电商平台",
  "description": "电商系统的所有服务",
  "color": "#3B82F6"
})

Skill: Manage App Contents

技能:管理应用内容

json
// Add projects to app
AddProjectsToApp(app_id, {
  "projectIds": ["project-1-uuid", "project-2-uuid"]
})

// Remove projects
RemoveProjectsFromApp(app_id, {
  "projectIds": ["project-1-uuid"]
})

// List projects in app
ListProjectsByApp(app_id, limit?, offset?)

// Same for services
AddServicesToApp(app_id, {"serviceIds": [...]})
RemoveServicesFromApp(app_id, {"serviceIds": [...]})
ListServicesByApp(app_id, limit?, offset?)
json
// 将项目添加到应用
AddProjectsToApp(app_id, {
  "projectIds": ["project-1-uuid", "project-2-uuid"]
})

// 移除项目
RemoveProjectsFromApp(app_id, {
  "projectIds": ["project-1-uuid"]
})

// 列出应用中的项目
ListProjectsByApp(app_id, limit?, offset?)

// 服务同理
AddServicesToApp(app_id, {"serviceIds": [...]})
RemoveServicesFromApp(app_id, {"serviceIds": [...]})
ListServicesByApp(app_id, limit?, offset?)

Skill: App Lifecycle

技能:应用生命周期

OperationTool
List
ListApps()
Update
UpdateApp(app_id, {name, description?, color?})
Delete
DeleteApp(app_id)
Note: Deleting an app sets
appId: null
on associated projects/services (doesn't delete them).

操作工具
列出
ListApps()
更新
UpdateApp(app_id, {name, description?, color?})
删除
DeleteApp(app_id)
注意:删除应用会将关联的项目/服务的
appId
设置为
null
(不会删除项目/服务)。

API Key Management Skills

API密钥管理技能

Skill: Create API Keys

技能:创建API密钥

json
CreateAPIKey({
  "name": "production-key",
  "description": "API key for production CI/CD",
  "expiryAt": "2025-12-31T23:59:59Z"
})
// Returns: {id, name, key, expiryAt}
// IMPORTANT: key is only shown once at creation
json
CreateAPIKey({
  "name": "production-key",
  "description": "生产环境CI/CD的API密钥",
  "expiryAt": "2025-12-31T23:59:59Z"
})
// 返回:{id, name, key, expiryAt}
// 重要提示:key仅在创建时显示一次

Skill: API Key Operations

技能:API密钥操作

OperationTool
List
ListAPIKeys()
Update
UpdateAPIKey(api_key_id, {name, description?})
Revoke
RevokeAPIKey(api_key_id)
Check name
CheckAPIKeyUniqueName({uniqueName})
操作工具
列出
ListAPIKeys()
更新
UpdateAPIKey(api_key_id, {name, description?})
撤销
RevokeAPIKey(api_key_id)
检查名称
CheckAPIKeyUniqueName({uniqueName})

Skill: User & Quota Management

技能:用户与配额管理

json
GetCurrentUser()
// Returns: user profile information

GetQuotas()
// Returns: {projects: {used, limit}, apiKeys: {used, limit}, ...}

GetSupportedProjectTypes()
// Returns: current list of supported runtimes and frameworks

json
GetCurrentUser()
// 返回:用户资料信息

GetQuotas()
// 返回:{projects: {used, limit}, apiKeys: {used, limit}, ...}

GetSupportedProjectTypes()
// 返回:当前支持的运行时和框架列表

Common Deployment Patterns

常见部署模式

Pattern: AI Agent Deployment

模式:AI Agent部署

json
CreateProject({
  "uniqueName": "intelligent-agent",
  "displayName": "Intelligent Agent",
  "type": "vcs",
  "source": {"vcsName": "github", "vcsInstallationId": "...", "vcsRepoId": "..."},
  "settings": {
    "runtime": "python:3.12",
    "port": 8000,
    "installCommand": "pip install -r requirements.txt",
    "runCommand": "python -m uvicorn agent:app --host 0.0.0.0 --port 8000",
    "runEnvs": {
      "OPENAI_API_KEY": "sk-...",
      "ANTHROPIC_API_KEY": "sk-ant-...",
      "LANGCHAIN_TRACING": "true",
      "AGENT_MEMORY_BACKEND": "redis"
    }
  }
})
json
CreateProject({
  "uniqueName": "intelligent-agent",
  "displayName": "Intelligent Agent",
  "type": "vcs",
  "source": {"vcsName": "github", "vcsInstallationId": "...", "vcsRepoId": "..."},
  "settings": {
    "runtime": "python:3.12",
    "port": 8000,
    "installCommand": "pip install -r requirements.txt",
    "runCommand": "python -m uvicorn agent:app --host 0.0.0.0 --port 8000",
    "runEnvs": {
      "OPENAI_API_KEY": "sk-...",
      "ANTHROPIC_API_KEY": "sk-ant-...",
      "LANGCHAIN_TRACING": "true",
      "AGENT_MEMORY_BACKEND": "redis"
    }
  }
})

Pattern: MCP Server Deployment

模式:MCP服务器部署

json
CreateProject({
  "uniqueName": "my-mcp-server",
  "displayName": "Custom MCP Server",
  "type": "vcs",
  "source": {"vcsName": "github", "vcsInstallationId": "...", "vcsRepoId": "..."},
  "settings": {
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "runCommand": "node server.js",
    "runEnvs": {
      "MCP_TRANSPORT": "sse",
      "MCP_PATH": "/mcp"
    }
  }
})
MCP Endpoint:
https://{uniqueName}.createos.io/mcp
json
CreateProject({
  "uniqueName": "my-mcp-server",
  "displayName": "Custom MCP Server",
  "type": "vcs",
  "source": {"vcsName": "github", "vcsInstallationId": "...", "vcsRepoId": "..."},
  "settings": {
    "runtime": "node:20",
    "port": 3000,
    "installCommand": "npm install",
    "runCommand": "node server.js",
    "runEnvs": {
      "MCP_TRANSPORT": "sse",
      "MCP_PATH": "/mcp"
    }
  }
})
MCP端点
https://{uniqueName}.createos.io/mcp

Pattern: RAG Pipeline

模式:RAG流水线

json
CreateProject({
  "uniqueName": "rag-pipeline",
  "displayName": "RAG Pipeline Service",
  "type": "vcs",
  "settings": {
    "runtime": "python:3.12",
    "port": 8000,
    "runCommand": "uvicorn main:app --host 0.0.0.0 --port 8000",
    "runEnvs": {
      "PINECONE_API_KEY": "...",
      "PINECONE_ENVIRONMENT": "us-west1-gcp",
      "OPENAI_API_KEY": "...",
      "EMBEDDING_MODEL": "text-embedding-3-small",
      "CHUNK_SIZE": "512",
      "CHUNK_OVERLAP": "50"
    }
  }
})
json
CreateProject({
  "uniqueName": "rag-pipeline",
  "displayName": "RAG Pipeline Service",
  "type": "vcs",
  "settings": {
    "runtime": "python:3.12",
    "port": 8000,
    "runCommand": "uvicorn main:app --host 0.0.0.0 --port 8000",
    "runEnvs": {
      "PINECONE_API_KEY": "...",
      "PINECONE_ENVIRONMENT": "us-west1-gcp",
      "OPENAI_API_KEY": "...",
      "EMBEDDING_MODEL": "text-embedding-3-small",
      "CHUNK_SIZE": "512",
      "CHUNK_OVERLAP": "50"
    }
  }
})

Pattern: Discord/Slack Bot

模式:Discord/Slack机器人

json
CreateProject({
  "uniqueName": "discord-bot",
  "displayName": "Discord Bot",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080,
    "runEnvs": {
      "DISCORD_TOKEN": "...",
      "DISCORD_CLIENT_ID": "...",
      "BOT_PREFIX": "!",
      "LOG_CHANNEL_ID": "..."
    }
  }
})

// Deploy with:
CreateDeployment(project_id, {"image": "my-discord-bot:v1.0.0"})
json
CreateProject({
  "uniqueName": "discord-bot",
  "displayName": "Discord Bot",
  "type": "image",
  "source": {},
  "settings": {
    "port": 8080,
    "runEnvs": {
      "DISCORD_TOKEN": "...",
      "DISCORD_CLIENT_ID": "...",
      "BOT_PREFIX": "!",
      "LOG_CHANNEL_ID": "..."
    }
  }
})

// 部署命令:
CreateDeployment(project_id, {"image": "my-discord-bot:v1.0.0"})

Pattern: Multi-Agent System

模式:多Agent系统

┌─────────────────────────────────────────────────┐
│                  App: Agent Swarm               │
├─────────────────┬─────────────────┬─────────────┤
│  Orchestrator   │   Worker Agent  │  Worker Agent│
│  (coordinator)  │   (researcher)  │  (executor) │
└────────┬────────┴────────┬────────┴──────┬──────┘
         │                 │               │
         └────── HTTP/gRPC communication ──┘
json
// 1. Create app
CreateApp({"name": "Agent Swarm"})

// 2. Create orchestrator
CreateProject({
  "uniqueName": "orchestrator",
  "type": "vcs",
  "appId": app_id,
  "settings": {
    "runEnvs": {
      "WORKER_RESEARCHER_URL": "https://researcher.createos.io",
      "WORKER_EXECUTOR_URL": "https://executor.createos.io"
    }
  }
})

// 3. Create workers
CreateProject({"uniqueName": "researcher", "appId": app_id, ...})
CreateProject({"uniqueName": "executor", "appId": app_id, ...})
┌─────────────────────────────────────────────────┐
│                  应用:Agent集群               │
├─────────────────┬─────────────────┬─────────────┤
│  编排器         │   工作Agent     │  工作Agent  │
│  (协调器)       │   (研究员)      │  (执行者)   │
└────────┬────────┴────────┬────────┴──────┬──────┘
         │                 │               │
         └────── HTTP/gRPC通信 ──┘
json
// 1. 创建应用
CreateApp({"name": "Agent Swarm"})

// 2. 创建编排器
CreateProject({
  "uniqueName": "orchestrator",
  "type": "vcs",
  "appId": app_id,
  "settings": {
    "runEnvs": {
      "WORKER_RESEARCHER_URL": "https://researcher.createos.io",
      "WORKER_EXECUTOR_URL": "https://executor.createos.io"
    }
  }
})

// 3. 创建工作Agent
CreateProject({"uniqueName": "researcher", "appId": app_id, ...})
CreateProject({"uniqueName": "executor", "appId": app_id, ...})

Pattern: Blue-Green Deployment

模式:蓝绿部署

1. CreateProjectEnvironment "blue" with branch "main"
2. CreateProjectEnvironment "green" with branch "main"
3. CreateDomain "app.example.com" → assign to "blue"
4. Deploy new version to "green"
5. Test via green's environment URL
6. UpdateDomainEnvironment → switch to "green"
7. "blue" becomes the standby
1. 创建名为"blue"的ProjectEnvironment,关联分支"main"
2. 创建名为"green"的ProjectEnvironment,关联分支"main"
3. 创建域名"app.example.com" → 分配到"blue"
4. 将新版本部署到"green"
5. 通过green的环境URL进行测试
6. 调用UpdateDomainEnvironment → 切换到"green"
7. "blue"成为备用环境

Pattern: Rollback

模式:回滚

json
// 1. Find previous good deployment
ListDeployments(project_id, {limit: 10})
// Identify deployment_id of last known good

// 2. Assign to environment
AssignDeploymentToProjectEnvironment(project_id, environment_id, {
  "deploymentId": "previous-good-deployment-id"
})

json
// 1. 找到之前正常的部署
ListDeployments(project_id, {limit: 10})
// 确定最后一个正常的deployment_id

// 2. 分配到环境
AssignDeploymentToProjectEnvironment(project_id, environment_id, {
  "deploymentId": "previous-good-deployment-id"
})

Best Practices

最佳实践

Security

安全

  1. Never hardcode secrets — Use
    runEnvs
    for all sensitive data
  2. Enable security scanning — Catch vulnerabilities early
  3. Rotate API keys — Set reasonable expiry dates
  4. Use environment isolation — Different secrets per environment
  1. 永远不要硬编码机密信息 — 使用
    runEnvs
    存储所有敏感数据
  2. 启用安全扫描 — 尽早发现漏洞
  3. 轮换API密钥 — 设置合理的过期时间
  4. 使用环境隔离 — 每个环境使用不同的机密信息

Performance

性能

  1. Right-size resources — Start small, scale based on metrics
  2. Use replicas for availability — Min 2 for production
  3. Monitor analytics — Set up alerts for error rate spikes
  4. Optimize builds — Use
    npm ci
    over
    npm install
  1. 合理分配资源 — 从小规模开始,根据指标扩容
  2. 使用副本保证可用性 — 生产环境至少2个副本
  3. 监控分析数据 — 为错误率峰值设置告警
  4. 优化构建 — 使用
    npm ci
    替代
    npm install

Reliability

可靠性

  1. Enable auto-promote carefully — Test in staging first
  2. Keep previous deployments — Enable quick rollbacks
  3. Use health checks — Ensure
    port
    matches app's listen port
  4. Handle sleeping deployments — Wake or configure keep-alive
  1. 谨慎启用自动升级 — 先在预发布环境测试
  2. 保留之前的部署 — 启用快速回滚
  3. 使用健康检查 — 确保
    port
    与应用监听端口一致
  4. 处理休眠部署 — 唤醒或配置保活

Organization

组织

  1. Use Apps — Group related projects logically
  2. Naming conventions
    {app}-{service}-{env}
    pattern
  3. Document environments — Clear descriptions for each
  4. Clean up unused — Delete old projects and deployments

  1. 使用应用分组 — 按逻辑分组相关项目
  2. 命名规范 — 使用
    {app}-{service}-{env}
    模式
  3. 记录环境信息 — 为每个环境添加清晰的描述
  4. 清理未使用的资源 — 删除旧项目和部署

Troubleshooting & Edge Cases

故障排除与边缘案例

Common Errors

常见错误

ErrorDiagnosisSolution
Build failed
GetBuildLogs
Fix code errors, check dependencies
Runtime crash
GetDeploymentLogs
Check startup errors, missing env vars
Health check failApp not responding on portVerify
port
setting matches app
502 Bad GatewayApp crashed after deployCheck logs, increase memory if OOM
Domain pendingDNS not propagatedWait 24-48h, verify CNAME record
Quota exceeded
GetQuotas
Upgrade plan or delete unused
Deployment sleepingIdle timeout
WakeupDeployment
or add keep-alive
错误诊断解决方案
构建失败调用
GetBuildLogs
修复代码错误,检查依赖项
运行时崩溃调用
GetDeploymentLogs
检查启动错误,缺失的环境变量
健康检查失败应用未在指定端口响应验证
port
设置与应用一致
502 Bad Gateway部署后应用崩溃查看日志,若OOM则增加内存
域名pendingDNS未传播等待24-48小时,验证CNAME记录
配额超出调用
GetQuotas
升级套餐或删除未使用的资源
部署休眠空闲超时调用
WakeupDeployment
或添加保活

Edge Cases

边缘案例

High-load scenarios:
  • Max 3 replicas per environment
  • Consider external load balancer for higher scale
  • Monitor RPM and adjust resources
Monorepo projects:
  • Set
    directoryPath
    to subdirectory
  • Use
    GetGithubRepositoryContent
    to explore structure
Private npm/pip packages:
  • Add auth tokens to
    buildVars
  • Use
    .npmrc
    or
    pip.conf
    in repo
Long-running builds:
  • Build timeout is 15 minutes
  • Use
    hasDockerfile: true
    for complex builds
  • Pre-build images for image projects

高负载场景:
  • 每个环境最多3个副本
  • 更高规模请考虑外部负载均衡器
  • 监控RPM并调整资源
单体仓库项目:
  • 设置
    directoryPath
    为子目录
  • 使用
    GetGithubRepositoryContent
    探索结构
私有npm/pip包:
  • 将认证令牌添加到
    buildVars
  • 在仓库中使用
    .npmrc
    pip.conf
长时间构建:
  • 构建超时时间为15分钟
  • 复杂构建使用
    hasDockerfile: true
  • 为镜像项目预构建镜像

API Quick Reference

API快速参考

Project Lifecycle

项目生命周期

CreateProject → ListProjects → GetProject → UpdateProject → UpdateProjectSettings → DeleteProject
CheckProjectUniqueName | GetProjectTransferUri → TransferProject | ListProjectTransferHistory
CreateProject → ListProjects → GetProject → UpdateProject → UpdateProjectSettings → DeleteProject
CheckProjectUniqueName | GetProjectTransferUri → TransferProject | ListProjectTransferHistory

Deployment Lifecycle

部署生命周期

CreateDeployment | TriggerLatestDeployment | UploadDeploymentFiles | UploadDeploymentBase64Files | UploadDeploymentZip
ListDeployments → GetDeployment → AssignDeploymentToProjectEnvironment
RetriggerDeployment | CancelDeployment | DeleteDeployment | WakeupDeployment | DownloadDeployment
GetBuildLogs | GetDeploymentLogs
CreateDeployment | TriggerLatestDeployment | UploadDeploymentFiles | UploadDeploymentBase64Files | UploadDeploymentZip
ListDeployments → GetDeployment → AssignDeploymentToProjectEnvironment
RetriggerDeployment | CancelDeployment | DeleteDeployment | WakeupDeployment | DownloadDeployment
GetBuildLogs | GetDeploymentLogs

Environment Lifecycle

环境生命周期

CreateProjectEnvironment → ListProjectEnvironments → UpdateProjectEnvironment → DeleteProjectEnvironment
CheckProjectEnvironmentUniqueName | AssignDeploymentToProjectEnvironment
UpdateProjectEnvironmentEnvironmentVariables | UpdateProjectEnvironmentResources
GetProjectEnvironmentLogs
CreateProjectEnvironment → ListProjectEnvironments → UpdateProjectEnvironment → DeleteProjectEnvironment
CheckProjectEnvironmentUniqueName | AssignDeploymentToProjectEnvironment
UpdateProjectEnvironmentEnvironmentVariables | UpdateProjectEnvironmentResources
GetProjectEnvironmentLogs

Domain Lifecycle

域名生命周期

CreateDomain → ListDomains → RefreshDomain → UpdateDomainEnvironment → DeleteDomain
CreateDomain → ListDomains → RefreshDomain → UpdateDomainEnvironment → DeleteDomain

GitHub Integration

GitHub集成

InstallGithubApp → ListConnectedGithubAccounts
ListGithubRepositories → ListGithubRepositoryBranches → GetGithubRepositoryContent
InstallGithubApp → ListConnectedGithubAccounts
ListGithubRepositories → ListGithubRepositoryBranches → GetGithubRepositoryContent

Analytics

分析

GetProjectEnvironmentAnalytics (comprehensive)
GetProjectEnvironmentAnalyticsOverallRequests | GetProjectEnvironmentAnalyticsRPM
GetProjectEnvironmentAnalyticsSuccessPercentage | GetProjectEnvironmentAnalyticsRequestsOverTime
GetProjectEnvironmentAnalyticsTopHitPaths | GetProjectEnvironmentAnalyticsTopErrorPaths
GetEnvAnalyticsReqDistribution
GetProjectEnvironmentAnalytics (综合)
GetProjectEnvironmentAnalyticsOverallRequests | GetProjectEnvironmentAnalyticsRPM
GetProjectEnvironmentAnalyticsSuccessPercentage | GetProjectEnvironmentAnalyticsRequestsOverTime
GetProjectEnvironmentAnalyticsTopHitPaths | GetProjectEnvironmentAnalyticsTopErrorPaths
GetEnvAnalyticsReqDistribution

Security

安全

TriggerSecurityScan → GetSecurityScan → GetSecurityScanDownloadUri
RetriggerSecurityScan
TriggerSecurityScan → GetSecurityScan → GetSecurityScanDownloadUri
RetriggerSecurityScan

Apps

应用

CreateApp → ListApps → UpdateApp → DeleteApp
AddProjectsToApp | RemoveProjectsFromApp | ListProjectsByApp
AddServicesToApp | RemoveServicesFromApp | ListServicesByApp
CreateApp → ListApps → UpdateApp → DeleteApp
AddProjectsToApp | RemoveProjectsFromApp | ListProjectsByApp
AddServicesToApp | RemoveServicesFromApp | ListServicesByApp

API Keys & User

API密钥与用户

CreateAPIKey → ListAPIKeys → UpdateAPIKey → RevokeAPIKey
CheckAPIKeyUniqueName | GetCurrentUser | GetQuotas | GetSupportedProjectTypes
CreateAPIKey → ListAPIKeys → UpdateAPIKey → RevokeAPIKey
CheckAPIKeyUniqueName | GetCurrentUser | GetQuotas | GetSupportedProjectTypes

Naming Constraints

命名约束

FieldMinMaxPattern
Project uniqueName432
^[a-zA-Z0-9-]+$
Project displayName448
^[a-zA-Z0-9 _-]+$
Description42048Any text
Environment uniqueName432
^[a-zA-Z0-9-]+$
Environment displayName448
^[a-zA-Z0-9 _-]+$
API key name448
^[a-zA-Z0-9-]+$
Domain name3255Valid domain

Last updated: January 2025
字段最小长度最大长度格式
Project uniqueName432
^[a-zA-Z0-9-]+$
Project displayName448
^[a-zA-Z0-9 _-]+$
Description42048任意文本
Environment uniqueName432
^[a-zA-Z0-9-]+$
Environment displayName448
^[a-zA-Z0-9 _-]+$
API key name448
^[a-zA-Z0-9-]+$
Domain name3255有效的域名

最后更新:2025年1月