QA Desktop Agent (Playwright CDP + CUA)

~5 min cURL TypeScript Python
LayerCapabilityEndpoint / Interface
Browser DOMLoopback Chromium CDP (browser OS user, /data/chrome-profile)http://127.0.0.1:9222 (Playwright)
Vision & OS UIFast JPEG screenshots, AT-SPI tree, batched actions (up to 25)GET .../desktop/screenshot?format=jpeg&quality=80, POST .../act/batch
SecretsRaw LLM keys never enter VM; non-egress config write-only encryptedPOST /api/v1/egress/secrets, PATCH /api/v1/computers/{id}
PersistenceSurvives sleep ($0 compute), restart, and image upgrades/opt/user, Persistent Volume /data, POST .../image
Live viewer60fps Voxl embed with strict per-tenant CSP frame-ancestorsPOST .../stream-token (view_only: true vs false)

1. Provision Computer, volume, and Egress Secret

# Persistent 20 GiB volume for /data/chrome-profile and QA artifacts
VOL_ID=$(curl -sS -X POST "https://api.miosa.ai/api/v1/volumes" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"qa-chrome-profile","size_bytes":21474836480,"backend":"local"}' | jq -r '.id // .data.id')

# Custom-sized Computer with auto_wake and live soma/elastic-7 autoscale (1c/2G -> 8c/16G)
COMPUTER_ID=$(curl -sS -X POST "https://api.miosa.ai/api/v1/computers" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"qa-desktop-1","template_id":"miosa-desktop","vcpus":2,"memory_gib":4,"cpu_tier":"shared","settings":{"auto_wake":true},"autosize":{"enabled":true,"min_cpu":1,"max_cpu":8,"min_memory_mb":2048,"max_memory_mb":16384}}' | jq -r '.id')

curl -sS -X POST "https://api.miosa.ai/api/v1/computers/${COMPUTER_ID}/volumes" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d "{\"volume_id\":\"${VOL_ID}\",\"mount_path\":\"/data\"}"

# Brokered Egress Secret (raw key never enters VM) + write-only runtime env
curl -sS -X POST "https://api.miosa.ai/api/v1/egress/secrets" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"anthropic_qa","value":"sk-ant-...","type":"api_key","scope":"workspace","expose_as_env":"ANTHROPIC_API_KEY"}'

curl -sS -X PATCH "https://api.miosa.ai/api/v1/computers/${COMPUTER_ID}" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"env":{"QA_BASE_URL":"https://staging.acme.example","OLD_URL":null}}'

2. Drive Playwright CDP (127.0.0.1:9222) + batched JPEG CUA

3. Watch-only Voxl embed & disk-preserving template upgrades

# Watch-only 60fps Voxl stream token (switch to view_only:false for human take-over)
curl -X POST "https://api.miosa.ai/api/v1/computers/${COMPUTER_ID}/stream-token" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"view_only":true}'

# Upgrade template in place while preserving Computer ID, viewer URL, /opt/user, and /data
curl -X POST "https://api.miosa.ai/api/v1/computers/${COMPUTER_ID}/image" \
  -H "Authorization: Bearer $MIOSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"template_id":"tpl_qa_desktop_v2"}'
Was this page helpful?
Opening MIOSA…