# Hosted GitHub demo flow ## Goal Show a real coding-agent action in GitHub under approval and receipt control. ## Prerequisite ```bash export DEMO_API_KEY='' ``` ## Steps ### 1. Reset runtime ```bash curl -X POST https://ai-operator.ai/api/runtime/reset \ -H "x-demo-key: $DEMO_API_KEY" ``` ### 2. Request branch creation ```bash BRANCH="aiop-demo-$(date +%s)" curl -X POST https://ai-operator.ai/api/runtime/request \ -H 'Content-Type: application/json' \ -H "x-demo-key: $DEMO_API_KEY" \ -d '{"actor":"demo/coding-agent","tool":"github","action":"create_branch","target":"'"$BRANCH"'","scope":["repo:ai-operator-demo","branch:'"$BRANCH"'"]}' ``` ### 3. Approve ```bash curl -X POST https://ai-operator.ai/api/runtime/approve \ -H 'Content-Type: application/json' \ -H "x-demo-key: $DEMO_API_KEY" \ -d '{"actionId":"","actor":"demo/reviewer","note":"approved github branch action"}' ``` ### 4. Execute ```bash curl -X POST https://ai-operator.ai/api/runtime/execute \ -H 'Content-Type: application/json' \ -H "x-demo-key: $DEMO_API_KEY" \ -d '{"actionId":""}' ``` ### 5. Read state ```bash curl https://ai-operator.ai/api/runtime/state \ -H "x-demo-key: $DEMO_API_KEY" ``` ## Expected outcome - action becomes `pending_approval` - then `approved` - then `receipt_issued` - a real branch exists on the remote demo repo