DeepSeek Harness Chapter 12: ACP Cloud Platform for Automated Agent Deployment
This chapter teaches how to deploy and manage AI agents on DeepSeek's Agent Cloud Platform (ACP), covering architecture, cloud agent creation via UI/CLI/API, Cron and webhook triggers, API gateway integration, monitoring, alerting, and billing models.
12.1 Chapter Overview
When agents need to run 24/7, execute scheduled tasks, or respond to external events, local deployment falls short. ACP (Agent Cloud Platform) is DeepSeek Harness's cloud deployment and management platform that enables agents to run in the cloud with support for scheduled tasks, event triggers, and API integration.
By the end of this chapter you will be able to:
Understand ACP architecture and core capabilities
Deploy and manage cloud agents
Configure scheduled tasks and webhook triggers
Integrate with external systems via API gateway
Understand billing models and usage limits
12.2 ACP Overview
12.2.1 What is ACP?
ACP (Agent Cloud Platform) is DeepSeek Harness's cloud deployment and management platform, allowing agents to run in the cloud with support for scheduled tasks, event triggers, and API integration.
┌─────────────────────────────────────────────────────────┐
│ ACP Positioning │
├─────────────────────────────────────────────────────────┤
│ │
│ Local Harness:
│ ├── Suitable for development and testing │
│ ├── Requires local execution │
│ └── Manual start/stop │
│ │
│ ACP Cloud:
│ ├── Suitable for production │
│ ├── Always accessible │
│ ├── Auto-scaling │
│ └── Rich trigger mechanisms │
│ │
└─────────────────────────────────────────────────────────┘12.2.2 ACP vs Local Deployment
Runtime : Local depends on local machine; ACP provides 24/7 online
Trigger Methods : Local is manual; ACP supports Cron/Webhook/API
Scalability : Local limited by local resources; ACP provides auto-scaling
Monitoring : Local has basic logs; ACP provides full monitoring & alerting
Maintenance : Local is self-maintained; ACP is platform-managed
Cost : Local incurs hardware cost; ACP uses pay-as-you-go
12.2.3 ACP Core Capabilities
┌─────────────────────────────────────────────────────────┐
│ ACP Core Capabilities │
├─────────────────────────────────────────────────────────┤
│ │
│ ☁️ Cloud Agents
│ ├── One-click deployment │
│ ├── Auto-scaling │
│ └── Load balancing │
│ │
│ ⏰ Scheduled Tasks
│ ├── Cron expressions │
│ ├── Interval execution │
│ └── Calendar triggers │
│ │
│ 🔗 Webhook Integration
│ ├── GitHub Webhook │
│ ├── Custom Webhook │
│ └── Event-driven │
│ │
│ 📊 Monitoring & Operations
│ ├── Real-time logs │
│ ├── Metrics monitoring │
│ └── Alert notifications │
│ │
│ 🔒 Security & Compliance
│ ├── Secret management │
│ ├── Access control │
│ └── Audit logs │
│ │
└─────────────────────────────────────────────────────────┘12.3 ACP Architecture
12.3.1 System Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ ACP Cloud Platform │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ User Layer │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Web UI │ │ CLI │ │ API │ │ Webhook │ │ │
│ │ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │ │
│ └───────┼───────────────┼───────────────┼───────────────┼───────┘ │
│ │ │ │ │ │
│ ┌───────┼───────────────┼───────────────┼───────────────┼───────┐ │
│ │ ▼ ▼ ▼ ▼ │ │
│ │ ┌─────────────────────────────────────────────────────────┐ │ │
│ │ │ API Gateway │ │ │
│ │ │ • Auth & Authorization • Traffic Control • Routing │ │ │
│ │ └────────────────────────┬────────────────────────────────┘ │ │
│ └─────────────────────────────┼────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────┼────────────────────────────────┐ │
│ │ ▼ │ │
│ │ ┌─────────────────────────────────────────────────────────┐ │ │
│ │ │ Agent Orchestrator │ │ │
│ │ │ • Task Scheduling • State Management • Load Balancing │ │ │
│ │ │ • Failure Recovery │ │ │
│ │ └────────────────────────┬────────────────────────────────┘ │ │
│ └─────────────────────────────┼────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────┼────────────────────────────────┐ │
│ │ ┌─────────────┬───────┴───────┬─────────────┐ │ │
│ │ ▼ ▼ ▼ ▼ │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ Agent 1│ │ Agent 2│ │ Agent 3│ │ Agent N│ │ │
│ │ │ Pod 1 │ │ Pod 2 │ │ Pod 3 │ │ Pod N │ │ │
│ │ └────────┘ └────────┘ └────────┘ └────────┘ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Infrastructure Layer │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Storage │ │ Redis │ │ K8s │ │ CDN │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘12.3.2 Core Components
┌─────────────────────────────────────────────────────────┐
│ ACP Core Components │
├─────────────────────────────────────────────────────────┤
│ │
│ 🌐 API Gateway
│ ├── Unified Entry │
│ ├── Auth & Authorization │
│ ├── Traffic Control │
│ └── Request Routing │
│ │
│ 🎭 Agent Orchestrator
│ ├── Task Orchestration │
│ ├── State Management │
│ ├── Failure Recovery │
│ └── Scaling │
│ │
│ 📅 Scheduler
│ ├── Cron Parsing │
│ ├── Scheduled Triggering │
│ └── Dependency Scheduling │
│ │
│ 🔗 Webhook Handler
│ ├── Event Reception │
│ ├── Signature Verification │
│ └── Event Routing │
│ │
│ 📊 Monitoring
│ ├── Metrics Collection │
│ ├── Log Aggregation │
│ └── Alert Management │
│ │
└─────────────────────────────────────────────────────────┘12.4 Cloud Agent Management
12.4.1 Creating Cloud Agents
Method 1: Web UI
┌─────────────────────────────────────────────────────────────────┐
│ ACP Dashboard [User ▼] │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ + Create Agent │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ Existing Agents │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ 🤖 code-review-agent │ │
│ │ Status: Running | Calls: 1,234 | Error Rate: 0.1% │ │
│ │ Created: 2024-01-10 | Uptime: 5 days │ │
│ └─────────────────────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ 🤖 daily-standup-bot │ │
│ │ Status: Running | Calls: 567 | Error Rate: 0.0% │ │
│ │ Created: 2024-01-12 | Uptime: 3 days │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘Method 2: CLI
# Login to ACP
dsh acp login
# Create Agent
dsh acp agent create \
--name code-review-agent \
--model deepseek-chat \
--plugins @dsh/code-review,@dsh/git-tools
# List Agents
dsh acp agent list
# Check Agent Status
dsh acp agent status code-review-agentMethod 3: API
# Create Agent
curl -X POST https://api.acp.deepseek.com/v1/agents \
-H "Authorization: Bearer $ACP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "code-review-agent",
"model": "deepseek-chat",
"plugins": ["@dsh/code-review", "@dsh/git-tools"],
"config": {
"max_concurrent_tasks": 5,
"timeout": 300
}
}'12.4.2 Agent Configuration
{
"name": "code-review-agent",
"model": "deepseek-chat",
"plugins": [
"@dsh/code-review",
"@dsh/git-tools"
],
"config": {
// Concurrency config
"max_concurrent_tasks": 5,
"max_queue_size": 100,
// Timeout config
"default_timeout": 300,
"max_timeout": 3600,
// Retry config
"retry": {
"max_attempts": 3,
"backoff": "exponential"
},
// Resource limits
"resources": {
"memory": "512Mi",
"cpu": "0.5"
},
// Environment variables
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}",
"LOG_LEVEL": "info"
}
},
"triggers": [
// Webhook trigger
{
"type": "webhook",
"events": ["push", "pull_request"]
},
// Scheduled trigger
{
"type": "schedule",
"cron": "0 9 * * 1-5" // Mon-Fri 9:00
}
],
"notifications": {
"on_success": ["slack:#dev-team"],
"on_failure": ["slack:#alerts", "email:[email protected]"]
}
}12.4.3 Agent Version Management
# View version history
dsh acp agent versions code-review-agent
# Deploy new version
dsh acp agent deploy code-review-agent \
--version 1.2.0 \
--config ./agent-config.json
# Rollback to previous version
dsh acp agent rollback code-review-agent
# View current version
dsh acp agent version code-review-agent12.5 Automated Tasks
12.5.1 Scheduled Tasks (Cron)
Cron Expression Format:
┌─────────────────────────────────────────────────────────┐
│ Cron Expression Format │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ ┌─────────── Minute (0-59) │ │
│ │ │ ┌────────── Hour (0-23) │ │
│ │ │ │ ┌──────── Day (1-31) │ │
│ │ │ │ │ ┌────── Month (1-12) │ │
│ │ │ │ │ │ ┌──── Weekday (0-6) │ │
│ │ │ │ │ │ │ │ │
│ │ ▼ ▼ ▼ ▼ │ │
│ │ * * * * * │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Special Characters:
│ • * Any value │
│ • , List (1,3,5) │
│ • - Range (1-5) │
│ • / Interval (*/5 = every 5 units) │
│ │
└─────────────────────────────────────────────────────────┘Common Cron Examples: 0 * * * * — Every hour on the hour 0 9 * * * — Daily at 9:00 0 9 * * 1-5 — Weekdays at 9:00 */15 * * * * — Every 15 minutes 0 0 1 * * — 1st of every month 0 9 * * 1 — Every Monday at 9:00 0 */2 * * * — Every 2 hours
Configuring Scheduled Tasks:
{
"triggers": [
{
"type": "schedule",
"name": "daily-standup",
"description": "Daily standup reminder",
"schedule": {
"type": "cron",
"expression": "0 9 * * 1-5",
"timezone": "Asia/Shanghai"
},
"input": {
"task": "Send team standup reminder to Slack",
"channel": "#standup",
"template": "Good morning! Today is {{date}}, please prepare for standup.
Answer:
1. What did you complete yesterday
2. What will you do today
3. Any blockers"
}
},
{
"type": "schedule",
"name": "weekly-report",
"description": "Weekly code report",
"schedule": {
"type": "cron",
"expression": "0 18 * * 5",
"timezone": "Asia/Shanghai"
},
"input": {
"task": "Generate weekly code analysis report",
"repos": ["org/repo1", "org/repo2"]
}
}
]
}12.5.2 Interval Tasks
{
"triggers": [
{
"type": "schedule",
"name": "health-check",
"schedule": {
"type": "interval",
"interval": 300, // 5 minutes
"unit": "seconds"
},
"input": {
"task": "Check system health status"
}
}
]
}12.5.3 Webhook Triggers
Configuring Webhook Triggers:
{
"triggers": [
{
"type": "webhook",
"name": "github-push",
"description": "GitHub Push event trigger",
"webhook": {
"provider": "github",
"events": ["push", "pull_request"],
"secret": "${WEBHOOK_SECRET}",
"filters": {
"branches": ["main", "develop"],
"paths": ["src/**", "lib/**"]
}
},
"input": {
"task": "Review code changes",
"auto_approve_threshold": "low"
}
},
{
"type": "webhook",
"name": "slack-command",
"description": "Slack command trigger",
"webhook": {
"provider": "slack",
"commands": ["/review", "/deploy", "/help"],
"verification": "slack_signature"
},
"input": {
"task": "Execute Slack command"
}
}
]
}Webhook Event Types:
GitHub: push, pull_request, issue_comment, release GitLab: push, merge_request, note Slack: message, app_mention, slash_command Custom:
http_request12.5.4 Event-Driven Triggers
{
"triggers": [
{
"type": "event",
"name": "deploy-trigger",
"event": {
"source": "ci_system",
"type": "deploy.completed",
"filters": {
"environment": ["staging", "production"],
"status": "success"
}
},
"input": {
"task": "Execute post-deployment verification",
"environment": "{{event.environment}}"
}
}
]
}12.6 API Gateway
12.6.1 API Endpoints
ACP provides RESTful APIs:
┌─────────────────────────────────────────────────────────┐
│ ACP API Endpoints │
├─────────────────────────────────────────────────────────┤
│ │
│ Agent Management
│ POST /v1/agents Create Agent │
│ GET /v1/agents List Agents │
│ GET /v1/agents/{id} Get Agent │
│ PUT /v1/agents/{id} Update Agent │
│ DELETE /v1/agents/{id} Delete Agent │
│ │
│ Task Execution
│ POST /v1/agents/{id}/tasks Submit Task │
│ GET /v1/tasks/{id} Get Task Status │
│ POST /v1/tasks/{id}/cancel Cancel Task │
│ │
│ Invoke Agent
│ POST /v1/agents/{id}/invoke Invoke Agent │
│ GET /v1/agents/{id}/invoke Query Invocation Result │
│ │
└─────────────────────────────────────────────────────────┘12.6.2 Invoking Cloud Agents
Synchronous Invocation:
curl -X POST https://api.acp.deepseek.com/v1/agents/code-review-agent/invoke \
-H "Authorization: Bearer $ACP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {
"task": "Review this code change",
"repo": "org/repo",
"commit": "abc123"
},
"sync": true,
"timeout": 60
}'Asynchronous Invocation:
# Submit async task
curl -X POST https://api.acp.deepseek.com/v1/agents/code-review-agent/invoke \
-H "Authorization: Bearer $ACP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {
"task": "Review all pending PRs"
},
"sync": false,
"callback": "https://your-app.com/webhook/acp-result"
}'
# Response
{
"task_id": "task_xyz789",
"status": "queued",
"created_at": "2024-01-15T10:30:00Z"
}12.6.3 Authentication & Authorization
# API Key Authentication
curl -H "Authorization: Bearer $ACP_TOKEN" \
https://api.acp.deepseek.com/v1/agents
# OAuth 2.0
curl -X POST https://api.acp.deepseek.com/oauth/token \
-d "grant_type=client_credentials" \
-d "client_id=$CLIENT_ID" \
-d "client_secret=$CLIENT_SECRET"
# Response
{
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 3600
}12.7 Monitoring & Alerting
12.7.1 Monitoring Metrics
┌─────────────────────────────────────────────────────────┐
│ Monitoring Metric Types │
├─────────────────────────────────────────────────────────┤
│ │
│ 📊 Invocation Metrics
│ ├── Call Count (QPS)
│ ├── Response Time (Latency)
│ ├── Success/Error Rate
│ └── Token Consumption
│ │
│ 🔧 Task Metrics
│ ├── Queue Depth
│ ├── Running Task Count
│ ├── Average Execution Duration
│ └── Timeout Rate
│ │
│ 💻 Resource Metrics
│ ├── CPU Utilization
│ ├── Memory Utilization
│ └── Network Traffic
│ │
└─────────────────────────────────────────────────────────┘12.7.2 Viewing Monitoring Data
# View Agent Metrics
dsh acp agent metrics code-review-agent
# View Real-time Logs
dsh acp agent logs code-review-agent --follow
# View Historical Logs
dsh acp agent logs code-review-agent --since "1 hour ago"12.7.3 Alert Configuration
{
"alerts": {
"enabled": true,
"rules": [
{
"name": "high-error-rate",
"condition": "error_rate > 0.05",
"duration": "5m",
"severity": "critical",
"actions": ["slack:#alerts", "email:[email protected]"]
},
{
"name": "high-latency",
"condition": "p95_latency > 5000",
"duration": "10m",
"severity": "warning",
"actions": ["slack:#performance"]
},
{
"name": "queue-backlog",
"condition": "queue_depth > 100",
"duration": "15m",
"severity": "warning",
"actions": ["slack:#devops"]
}
],
"notification_channels": {
"slack": {
"#alerts": {
"webhook": "${SLACK_ALERTS_WEBHOOK}"
},
"#performance": {
"webhook": "${SLACK_PERF_WEBHOOK}"
}
},
"email": {
"[email protected]": {}
}
}
}
}12.8 Deployment & Management
12.8.1 Deployment Process
┌─────────────────────────────────────────────────────────┐
│ Agent Deployment Process │
├─────────────────────────────────────────────────────────┤
│ │
│ 1️⃣ Package
│ └── dsh acp package │
│ │
│ 2️⃣ Upload
│ └── dsh acp upload │
│ │
│ 3️⃣ Validate
│ └── Auto-check config and dependencies │
│ │
│ 4️⃣ Deploy
│ └── Rolling update, minimize downtime │
│ │
│ 5️⃣ Verify
│ └── Health checks and smoke tests │
│ │
│ 6️⃣ Monitor
│ └── Track post-deployment metrics │
│ │
└─────────────────────────────────────────────────────────┘12.8.2 Configuration Management
# List Configs
dsh acp config list code-review-agent
# Update Config
dsh acp config set code-review-agent \
max_concurrent_tasks=10
# Export Config
dsh acp config export code-review-agent > config.json
# Import Config
dsh acp config import code-review-agent config.json12.8.3 Secret Management
# Add Secret
dsh acp secrets set code-review-agent \
GITHUB_TOKEN=sgh_xxxx
# Reference Secret from Env Var
dsh acp secrets set code-review-agent \
GITHUB_TOKEN=$GITHUB_TOKEN
# List Secrets (values hidden)
dsh acp secrets list code-review-agent
# Delete Secret
dsh acp secrets delete code-review-agent GITHUB_TOKEN12.9 Billing Models
12.9.1 Billing Items
┌─────────────────────────────────────────────────────────┐
│ ACP Billing Items │
├─────────────────────────────────────────────────────────┤
│ │
│ 💰 Compute Costs
│ ├── Billed by Agent runtime │
│ └── Unit: Yuan/hour/Agent │
│ │
│ 📊 API Call Costs
│ ├── Billed by call count │
│ └── Unit: Yuan/1000 calls │
│ │
│ 🤖 Task Execution Costs
│ ├── Billed by execution duration │
│ └── Unit: Yuan/minute │
│ │
│ 💾 Storage Costs
│ ├── Billed by storage capacity │
│ └── Unit: Yuan/GB/month │
│ │
│ 📤 Traffic Costs
│ ├── Billed by egress traffic │
│ └── Unit: Yuan/GB │
│ │
└─────────────────────────────────────────────────────────┘12.9.2 Plan Types
Free : Free — 100 calls/month — Trial/Learning
Starter : ¥99/month — 10,000 calls — Small Projects
Pro : ¥399/month — 100,000 calls — Medium Projects
Enterprise : Custom — Unlimited calls — Large Enterprises
12.9.3 Viewing Usage
# View Current Usage
dsh acp usage
# View Detailed Bill
dsh acp billing --period 2024-01
# Export Bill
dsh acp billing export --format csv --period 2024-01 > billing.csv12.10 Chapter Summary
Key Points
╔═══════════════════════════════════════════════════════════════════════════╗
║ Chapter 12 Core Summary ║
╠══════════════════════════════════════════════════════════════════════════╣
║ ║
║ ACP Core Capabilities ║
║ ┌─────────────────────────────────────────────────────────────┐ ║
║ │ Cloud Agents One-click deploy, auto-scaling │ ║
║ │ Scheduled Tasks Cron expressions, interval execution │ ║
║ │ Webhook Triggers GitHub, Slack, Custom Events │ ║
║ │ API Gateway REST API, Auth & Authorization │ ║
║ │ Monitoring & Alerts Metrics, Logs, Alert Notifications │ ║
║ └─────────────────────────────────────────────────────────────┘ ║
║ ║
║ Trigger Methods ║
║ ┌─────────────────────────────────────────────────────────────┐ ║
║ │ schedule Scheduled Tasks (Cron) │ ║
║ │ webhook Webhook Events │ ║
║ │ api API Invocation │ ║
║ │ event Event-Driven │ ║
║ └─────────────────────────────────────────────────────────────┘ ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝Command Quick Reference
dsh acp login— Login to ACP dsh acp agent create — Create Agent dsh acp agent list — List Agents dsh acp agent deploy — Deploy Agent dsh acp agent status — View Status dsh acp agent metrics — View Metrics dsh acp agent logs — View Logs dsh acp usage — View Usage dsh acp billing — View Bill
12.11 Discussion Questions
What is ACP's biggest advantage over local deployment? What scenarios are unsuitable for ACP?
What scenarios suit scheduled tasks vs webhook triggers?
How would you configure "auto code review when GitHub PR opens"?
12.12 Post-Chapter Tasks
✅ Required Tasks
Register ACP Account
Create First Cloud Agent
Configure Scheduled Trigger Task
Invoke Agent via API
🎯 Advanced Tasks
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
