Deploy Example: Composio Agent Orchestrator
This walks through deploying Composio's agent-orchestrator on ORB Cloud — a full-stack TypeScript app with a Next.js dashboard, lifecycle worker, and tmux-based agent sessions.
Prerequisites
- An ORB Cloud API key (see Getting Started)
Step 1: Create Computer
curl
export ORB_KEY="orb_YOUR_KEY"
RESP=$(curl -s -X POST https://api.orbcloud.dev/v1/computers \
-H "Authorization: Bearer $ORB_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"composio-ao","runtime_mb":2048,"disk_mb":8192}')
COMPUTER_ID=$(echo $RESP | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Computer: $COMPUTER_ID"
Step 2: Upload Config
Create orb.toml:
toml
[agent]
name = "agent-orchestrator"
lang = "binary"
entry = "/root/.npm-global/bin/ao"
args = ["start"]
[agent.env]
HOME = "/root"
[source]
git = "https://github.com/ComposioHQ/agent-orchestrator"
branch = "main"
[build]
steps = [
"npm install -g pnpm",
"pnpm install",
"pnpm build",
"cd packages/cli && npm link",
"ao init --auto",
]
working_dir = "/agent/code"
[backend]
provider = "multi"
[ports]
expose = [3000]
[resources]
runtime = "2GB"
disk = "8GB"
Upload:
curl
curl -s -X POST "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}/config" \
-H "Authorization: Bearer $ORB_KEY" \
-H 'Content-Type: application/toml' \
--data-binary @orb.toml
Step 3: Build
curl
curl -s -X POST "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}/build" \
-H "Authorization: Bearer $ORB_KEY"
This clones the repo, runs pnpm install (628 packages), pnpm build (25 workspace projects including Next.js), links the CLI, and runs ao init --auto. Takes 1-3 minutes. Use a long timeout (e.g., curl -m 600).
Step 4: Start the Agent
curl
curl -s -X POST "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}/exec" \
-H "Authorization: Bearer $ORB_KEY" \
-H 'Content-Type: application/json' \
-d '{"command":"cd /agent/code && HOME=/root PATH=/root/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin nohup /root/.npm-global/bin/ao start > /tmp/ao.log 2>&1 & disown; sleep 8 && tail -5 /tmp/ao.log"}'
Wait ~15 seconds for Next.js to compile, then check:
curl
curl -s -X POST "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}/exec" \
-H "Authorization: Bearer $ORB_KEY" \
-H 'Content-Type: application/json' \
-d '{"command":"tail -5 /tmp/ao.log"}'
You should see:
[dev:next] Ready in 1446ms
Step 5: Access the Dashboard
The computer's short ID is the first 8 characters of the computer ID:
curl
SHORT_ID="${COMPUTER_ID:0:8}"
echo "Dashboard: http://${SHORT_ID}.orbcloud.dev"
Open that URL in your browser. The agent-orchestrator dashboard is live.
Step 6: Verify
curl
# Check computer status
curl -s "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}" \
-H "Authorization: Bearer $ORB_KEY"
# Run a command inside
curl -s -X POST "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}/exec" \
-H "Authorization: Bearer $ORB_KEY" \
-H 'Content-Type: application/json' \
-d '{"command":"ps aux | grep -E \"ao|next\" | grep -v grep"}'
Cleanup
curl
curl -s -X DELETE "https://api.orbcloud.dev/v1/computers/${COMPUTER_ID}" \
-H "Authorization: Bearer $ORB_KEY"