AutoRescue stitches Airia orchestration, Apify automations, and sponsor APIs into a post-purchase rescue loop that detects delay/payment incidents and resolves them via policy-backed agents. Start with OVERVIEW.md for the narrative and auto-rescue-usecase.md for the detailed journey log.
srcholds the workflow entrypoint (index.js), shared utilities, and orchestration helpers.apps/contains the demo server, worker, and dashboard shells used in live walkthroughs.scripts/bundles operational helpers (Kafka checks, decision reports, manual replays).data/stores sample events, outbox payloads, and replay fixtures for demos.airia-web-apis.jsonis the OpenAPI 3.1 contract; lint it before committing changes.auto-rescue-usecase.mdanddocs/capture the scenario narrative, policy notes, and outreach playbooks.AGENTS.mdlists shipped agents, triggers, and evaluation datasets.
- Install Node.js 18+ and
npm installdependencies from the repo root. - Copy the redacted
.envtemplate to.env.local, populate sandbox tokens (Shopify, Twilio, Airia), and keep production secrets outside the repo. - Run
npm run workflow:simulateto replay the sample delay event; useSIMULATE_AIRIA=1to mock Airia calls when offline.
npm run workflow:runexecutes the Temporal-style orchestration against live connectors.npm run workflow:apifyinvokes the Apify actor bridge for marketplace-driven rescues.npm run airia:setupprovisions agents, triggers, and datasets defined inAGENTS.md.npm run server:startandnpm run worker:startlaunch the demo API surface and background worker.npm run demo:e2ewalks through the scripted end-to-end rescue used in demos.npm run dashboard:startserves the lightweight dashboard for timeline visualisations.
- Update
airia-web-apis.json, keeping properties alphabetised and descriptions clear on enum values. - Run
jq . airia-web-apis.jsonfor a structural sanity check. - Run
npx @redocly/cli lint airia-web-apis.json(install once withnpm i -g @redocly/cli). - Add or refresh a sample request in the relevant Markdown section; for example:
curl --request POST \ --url https://sandbox.airia.ai/v1/Webhook/demo-tenant/delay-alert \ --header 'Authorization: Bearer <api-key>' \ --header 'Content-Type: application/json' \ --data @data/events/sample-delay-event.json
auto-rescue-usecase.mdtracks the scenario narrative, linked test tables, and a changelog.docs/orchestration-runbook.mddetails Temporal workflows, retries, and incident states.docs/demo-playbook.mdcovers live demo callouts, voice IVR prompts, and fallback notes.- Link new reference material back into the main narrative and store it under
docs/using lowercase kebab-case filenames.
- Record manual test cases in Markdown tables (input, expected outcome, side-effects) and link them from the relevant section of
auto-rescue-usecase.md. - Run
npx markdownlint-cli2 auto-rescue-usecase.md AGENTS.mdto keep long-form docs consistent. - Log sandbox integrations exercised (Shopify, Twilio, Airia) along with redacted tokens in
.env.local.
- Follow Conventional Commits (for example
feat: add webhook retry guard) and keep subjects under 72 characters. - Request reviews from teammates covering the touched surface area (API, orchestration narrative, outreach playbooks).
- Capture verification steps (linting,
jq, manual callouts) in pull request summaries so others can reproduce them quickly.