How kalvaharshith/agent-checkout works
Agent Checkout lets a buyer agent propose a catalog-based purchase, while a deterministic guard gates payment and an append-only audit trail records events for a timeline viewer. The documented flow also includes a human payment confirmation and signed payment webhooks. The graph preserves these stages and the checkout runner; source excerpts show the principal calls, while some integrations—such as Razorpay’s webhook dispatch—are documented in the README rather than sampled source.
Main entry points: audit.py Audit writer · buyer.py Buyer agent · app.py Merchant API · run_checkout.py Checkout runner
Components 14
Shopping
- Buyer agent
agent/buyer.py - Merchant API
merchant/app.py - Product catalog
merchant/catalog.json
Guarded Checkout
- Checkout runner
scripts/run_checkout.py - Deterministic guard
guard/guard.py - Payment checkout
guard/checkout.py
Payment and Trust
- Webhook receiver
webhooks/app.py
Audit and Timeline
- Audit writer
audit/audit.py - SQLite audit trail
db/audit.db - Timeline viewer
viewer/app.py
Other components
- Mission operator
- Groq LLM
- Human payer
- Razorpay
Connections 18
- Mission operator → Buyer agent: starts mission
agent/buyer.py - Buyer agent → Merchant API: fetches catalog
agent/buyer.py - Merchant API → Product catalog: reads catalog
merchant/app.py - Buyer agent → Groq LLM: requests proposal
agent/buyer.py - Mission operator → Checkout runner: runs checkout
README.md - Checkout runner → Deterministic guard: evaluates cart
scripts/run_checkout.py - Deterministic guard → Product catalog: checks prices
README.md - Checkout runner → Payment checkout: attempts approved payment
scripts/run_checkout.py - Payment checkout → Razorpay: creates payment link
guard/checkout.py - Human payer → Razorpay: confirms payment
README.md - Razorpay → Webhook receiver: sends payment event
README.md - Buyer agent → Audit writer: logs events
agent/buyer.py - Merchant API → Audit writer: logs catalog service
merchant/app.py - Deterministic guard → Audit writer: logs decision
guard/guard.py - Payment checkout → Audit writer: logs payment steps
guard/checkout.py - Webhook receiver → Audit writer: logs verified event
webhooks/app.py - Audit writer → SQLite audit trail: appends events
audit/audit.py - Timeline viewer → SQLite audit trail: reads timeline
viewer/app.py