How abhiramarise/checkout-mandate-agent works
Checkout Mandate Agent is a conversational purchasing system that gates payment through signed intent, cart, and payment mandates. The main workflow is a user request, bounded item selection, explicit cart confirmation, payment authorization, and Razorpay order/payment-link creation, with events recorded for audit. The autonomous buyer is a separate optional interaction mode; dispute evidence is another documented capability built from audit records. Some implementation files were not sampled, so those links rely on README statements rather than inspected call sites.
Main entry points: core.py Checkout agent · razorpay_client.py Razorpay client · buyer_agent.py Autonomous buyer · audit.py Audit logger
Components 14
Checkout authorization
- Checkout agent
agent/core.py - Intent mandate
agent/mandates.py - Cart mandate
agent/mandates.py - Payment mandate
agent/mandates.py - Product catalog
tools/catalog.py
Agent interaction
- Autonomous buyer
agent/buyer_agent.py - Groq language model
Payment integration
- Razorpay client
tools/razorpay_client.py - Orders API
- Payment Links API
Audit and evidence
- Audit logger
agent/audit.py - Audit records
agent/audit.py - Evidence package
agent/evidence.py
Other components
- User
Connections 15
- User → Checkout agent: sends request
README.md - Checkout agent → Intent mandate: creates mandate
README.md - Checkout agent → Product catalog: finds item
README.md - Checkout agent → Cart mandate: proposes cart
README.md - User → Cart mandate: confirms cart
README.md - Checkout agent → Payment mandate: authorizes payment
README.md - Checkout agent → Razorpay client: requests payment
README.md - Razorpay client → Orders API: creates order
tools/razorpay_client.py - Razorpay client → Payment Links API: creates link
tools/razorpay_client.py - Autonomous buyer → Checkout agent: sends messages
eval/run_multi_agent.py - Autonomous buyer → Groq language model: phrases messages
- Checkout agent → Groq language model: parses language
README.md - Checkout agent → Audit logger: records transitions
README.md - Audit logger → Audit records: writes events
- Evidence package → Audit records: reads session
agent/evidence.py