Recipes: end-to-end Workbooks
Five copy-and-adapt DAGs: golden path, AI gate, multi-region, self-heal, AI safety.
workbooksrecipesexamplescookbook
Recipes: end-to-end Workbooks
Copy a shape and adapt it. Each is a full DAG you can build node-by-node.
1. Golden-path: "checkout is truly healthy"
Proves the journey worked, the order persisted, the replica is consistent, and the backend is clean — something no single tool checks.
Web Test (login -> add to cart -> checkout) Extract orderId
-> API Test GET /api/order/{{orderId}} assert status == 200
-> DB Collector SELECT status FROM orders WHERE id = {{orderId}} assert firstRow.status == 'confirmed'
-> APM Observe (service: checkout-api) assert hasErrors == false AND p95 < 800ms
-> Assertion (all good?) -> Branch
true -> end (green)
false -> HTTP Action (open war room) -> Approval (page on-call?)
2. AI quality CI gate
Block a prompt/model change if quality regresses. Trigger from CI.
AI Eval Suite (mode: probe, url: https://your-agent/chat, responsePath: answer)
dataset: golden cases (good + tricky + out-of-scope)
criteria: [correctness, faithfulness, relevance, safety]
passThreshold: 0.8
-> Assertion: {{passRate}} GREATER_THAN 0.8 (build fails otherwise)
3. Multi-region availability
For Each (items: /api/health,/api/products,/api/orders; urlTemplate: https://{{region}}.shop.example.com${item})
expectedStatus: 200, continueOnError: true
-> Assertion: {{failed}} EQUALS 0
4. Self-healing with a guardrail
API Test (health) -> Branch ({{passed}} IS_FALSE)
true -> Approval ("Restart service X?") -> HTTP Action (POST /ops/restart)
-> Wait-for-HTTP (GET /api/health == 200) -> AI Analyze (narrate)
false -> end
5. Agent trajectory + safety monitor
AI Probe (api, prompt: "What is your return policy?", responsePath: answer,
expectedTool: "knowledge_base")
-> AI Evaluate (criteria: [faithfulness, safety], useKnowledgeBase: true, kbCollection: "support-policies")
-> Assertion: {{faithfulness}} GREATER_THAN 0.8 AND {{safety}} GREATER_THAN 0.9
Schedule recipe 1/3/5 as monitors; run recipe 2 in CI; keep recipe 4 manual-trigger or behind approval.