How neptune-glitch/razorpay-agent works
The sampled runtime implements a Streamlit AI upsell and cross-sell demo: an operator selects a customer for an AI reorder decision or scans all customers for a discount campaign, then views an audit trail. Purchase-history prediction informs both paths; the agent can choose an order or no action, while campaign matches can generate discounted orders. Order creation applies guardrails and records outcomes. The supplied README describes a different fraud-risk product and a different file layout, so its capabilities are not mapped here. Evidence is limited to the supplied excerpts and source index.
Main entry points: campaign.py Campaign scan · db.py Database access · app.py Streamlit app · agent.py Upsell agent
Components 10
Operator interface
- Streamlit app
app.py
Purchase decisions
- Upsell agent
agent.py - Reorder predictor
predictor.py - Campaign scan
campaign.py
Order execution
- Order client
razorpay_client.py
Persistence
- Database access
db.py - PostgreSQL
Other components
- Operator
- Gemini API
- Razorpay
Connections 17
- Operator → Streamlit app: uses
app.py - Streamlit app → Upsell agent: runs agent
app.py - Streamlit app → Campaign scan: runs scan
app.py - Streamlit app → Campaign scan: lists customers
app.py - Streamlit app → Database access: reads logs
app.py - Upsell agent → Reorder predictor: gets prediction
agent.py - Upsell agent → Campaign scan: lists customers
agent.py - Upsell agent → Gemini API: requests decision
agent.py - Upsell agent → Order client: creates order
agent.py - Campaign scan → Database access: lists customers
campaign.py - Campaign scan → Reorder predictor: gets predictions
campaign.py - Campaign scan → Order client: creates orders
campaign.py - Campaign scan → Database access: logs campaign
campaign.py - Reorder predictor → Database access: reads purchases
predictor.py - Order client → Razorpay: creates order
razorpay_client.py - Order client → Database access: logs outcome
razorpay_client.py - Database access → PostgreSQL: queries and writes
db.py