See PatchFlow in action.
Below is a real sample run against a demo API. The six-agent pipeline ran autonomously, found 3 critical failures, and opened a compiler-verified GitHub Pull Request in under 15 seconds.
Run this on your own APIAgent Pipeline — sample runcompleted
agent-workspace-logs.sh — demo run
DiscoveryAgentthought: Fetching OpenAPI spec from https://api.acme.com/openapi.json
DiscoveryAgentCatalogued 12 endpoints across 4 route groups
ChaosAgentthought: Selecting failure modes: db_connection_drop, http_503, slow_response, malformed_json
ChaosAgentInjected 18 failure scenarios across 12 endpoints
AnalystAgent3 CRITICAL findings — unhandled SQLAlchemyError on GET /orders/{id}
AnalystAgentReliability score: 42 / 100 (HIGH RISK)
FixAgentthought: Cloning repo acme/payments-api, locating route handler…
FixAgentPatch generated: try/except SQLAlchemyError + HTTPException(503)
ReviewAgentAST brackets valid. tsc --noEmit passed. No auth/billing files touched.
GitHubAgentDraft PR #14 opened: fix: 503 resilience on /api/v1/orders
Failure injection results (6 tests run)
db_connection_drophttp_503slow_responsemalformed_jsondb_timeoutempty_response
2 Unhandled2 Degraded2 Handled
fix: 503 resilience on /api/v1/orders #14
Build: Passed ✓# routes/orders.py
+ from fastapi import HTTPException, status
+ from sqlalchemy.exc import SQLAlchemyError
@router.get("/orders/{order_id}")
async def get_order(order_id: str):
- order = await db.fetch_order(order_id)
- return {"ok": True, "order": order}
+ try:
+ order = await db.fetch_order(order_id)
+ if not order:
+ raise HTTPException(404, "Order not found")
+ return {"ok": True, "order": order}
+ except SQLAlchemyError as exc:
+ raise HTTPException(503, "Service unavailable")
What just happened
- 18 chaos failure modes injected across 12 endpoints in 8 seconds.
- 3 critical unhandled exceptions found — 2 leaked error traces to the client.
- FixAgent generated a try/except patch with correct imports and status codes.
- Draft PR opened after ReviewAgent verified the build passed (tsc + runtime checks).
Ready to run this on your real API?
Connect your GitHub repo and PatchFlow will auto-discover your endpoints, inject failures, and open a verified PR fix in minutes.
Connect GitHub — it's free