Skip to content

Out-Loop Automation

Two approaches to run ADWs without manual intervention. Both let you walk away.

Mode A — Cron Polling

Polls GitHub every 20 seconds. Requires no public URL.

bash
cd adws
uv run adw_triggers/trigger_cron.py

Fires automatically when:

  • A new issue is opened with no comments → runs adw_plan_build.py
  • The latest comment on an open issue is exactly adw → same

Your workflow becomes: open a GitHub issue, come back to a PR.

Mode B — Webhook (Real-time)

Receives GitHub events instantly. Lets you specify which pipeline to run from issue comments.

Step 1 — Start the webhook server

bash
cd adws
uv run adw_triggers/trigger_webhook.py
# Listens on port 8001
# POST /gh-webhook  — event receiver
# GET  /health      — health check

Step 2 — Expose it to the internet

Cloudflare Tunnel (recommended — free, persistent, no port forwarding):

bash
# Install
brew install cloudflare/cloudflare/cloudflared

# Authenticate
cloudflared tunnel login

# Create tunnel
cloudflared tunnel create adw-webhook

# Route DNS (requires a domain in your Cloudflare account)
cloudflared tunnel route dns adw-webhook adw.yourdomain.com

# Run (forwards adw.yourdomain.com → localhost:8001)
cloudflared tunnel run adw-webhook

ngrok (quick testing):

bash
brew install ngrok
ngrok http 8001
# Gives you: https://abc123.ngrok.io

Step 3 — Configure GitHub webhook

Your repo → Settings → Webhooks → Add webhook:

FieldValue
Payload URLhttps://your-domain.com/gh-webhook
Content typeapplication/json
EventsIssues + Issue comments
Activechecked

Step 4 — Trigger from GitHub

Write any of these in an issue body or comment to trigger a pipeline:

adw_plan_build               → plan + build
adw_plan_build_test          → plan + build + test
adw_plan_build_review        → plan + build + review
adw_sdlc                     → full pipeline

The bot replies immediately:

ADW Webhook: Detected `adw_sdlc` workflow
Starting with ID: `b7x2p9q4`
Logs: agents/b7x2p9q4/

Parallel Execution

Each ADW run is independent. Run as many as you want simultaneously:

bash
# Three issues in parallel
uv run adw_plan_build.py 10 &
uv run adw_plan_build.py 11 &
uv run adw_plan_build.py 12 &
wait

Each run gets its own agents/<adw-id>/ workspace. There are no shared resources to conflict.

With the webhook, parallel execution is automatic — each incoming event spawns an independent background process.

Cron Trigger Behavior

The cron trigger (trigger_cron.py) picks up tasks based on:

ConditionAction
New issue with no commentsRuns adw_plan_build.py
Latest comment is exactly adwRuns adw_plan_build.py
Latest comment is adw_sdlcRuns adw_sdlc.py (if webhook mode active)

The cron polls every 20 seconds and processes one eligible issue at a time to avoid conflicts.

Webhook Security

The webhook server validates GitHub webhook signatures:

bash
# Required for webhook mode
export GITHUB_WEBHOOK_SECRET="your-webhook-secret"

Set this in your GitHub webhook settings and in your environment. The server rejects any payload with an invalid signature.

Agentics SOP — AI Developer Workflow & Agentic Coding Reference