How abhiraj-bambhore/razor-revx works
Razor-RevX is a stateful revenue-recovery platform: Razorpay-shaped failures are detected and scored, routed to a specialist, reviewed for safety, and addressed through recovery actions with audit reporting. The README documents the hierarchical routing, reflection and compliance stages, three-tier scoring fallback, and voice/IVR capability. Source-index references support the implementation links shown; some UI and optional integrations are documented but their runtime wiring was not sampled.
Main entry points: orchestrator.py Workflow Orchestrator · schemas.py Event Models · audit_trail.py Append-Only Ledger · actions Recovery Actions
Components 23
Events & Detection
- Event Models
src/data/schemas.py - Payment Detection
src/detection/payment_detector.py - Checkout Detection
src/detection/checkout_detector.py - Subscription Detection
src/detection/subscription_detector.py - Receivables Aging
src/detection/receivables_detector.py - Event Simulator
src/data/simulator.py
Risk Intelligence
- Risk Scorer
src/agents/risk_scorer.py - Gemini & Heuristics
src/utils/llm.py - Feature Engineering
src/ml/feature_engineering.py - ML Fallback
src/ml/risk_model.py
Agent Recovery
- Workflow Orchestrator
src/agents/orchestrator.py - Supervisor Routing
src/agents/supervisor.py - Payment Recovery
src/agents/payment_recovery.py - Checkout Recovery
src/agents/checkout_recovery.py - Subscription Recovery
src/agents/subscription_recovery.py - Receivables Chaser
src/agents/receivables_chaser.py
Actions & Compliance
- Compliance Gate
src/agents/compliance_agent.py - Recovery Actions
src/actions
Audit & Dashboard
- Append-Only Ledger
src/audit/audit_trail.py - Recovery Reports
src/audit/recovery_report.py - Recovery Dashboard
web/index.html
Other components
- Razorpay Events
- Operator / Customer
Connections 33
- Razorpay Events → Event Models: sends event
README.md - Event Models → Payment Detection: classifies type
src/detection/payment_detector.py - Event Models → Checkout Detection: classifies type
src/detection/checkout_detector.py - Event Models → Subscription Detection: classifies type
src/detection/subscription_detector.py - Event Models → Receivables Aging: classifies type
src/detection/receivables_detector.py - Payment Detection → Workflow Orchestrator: detects events
src/agents/orchestrator.py - Checkout Detection → Workflow Orchestrator: detects events
src/agents/orchestrator.py - Subscription Detection → Workflow Orchestrator: detects events
src/agents/orchestrator.py - Receivables Aging → Workflow Orchestrator: detects events
src/agents/orchestrator.py - Workflow Orchestrator → Risk Scorer: requests scoring
src/agents/orchestrator.py - Risk Scorer → Gemini & Heuristics: tries scoring
src/agents/risk_scorer.py - Risk Scorer → ML Fallback: falls back to
src/agents/risk_scorer.py - ML Fallback → Feature Engineering: builds vectors
src/ml/risk_model.py - Workflow Orchestrator → Supervisor Routing: requests route
src/agents/orchestrator.py - Workflow Orchestrator → Payment Recovery: dispatches
src/agents/orchestrator.py - Workflow Orchestrator → Checkout Recovery: dispatches
src/agents/orchestrator.py - Workflow Orchestrator → Subscription Recovery: dispatches
src/agents/orchestrator.py - Workflow Orchestrator → Receivables Chaser: dispatches
src/agents/orchestrator.py - Workflow Orchestrator → Compliance Gate: validates proposal
README.md - Workflow Orchestrator → Supervisor Routing: reflection reroute
README.md - Payment Recovery → Recovery Actions: executes recovery
src/agents/payment_recovery.py - Checkout Recovery → Recovery Actions: executes recovery
src/agents/checkout_recovery.py - Subscription Recovery → Recovery Actions: executes recovery
src/agents/subscription_recovery.py - Receivables Chaser → Recovery Actions: executes recovery
src/agents/receivables_chaser.py - Payment Recovery → Append-Only Ledger: records outcome
src/agents/payment_recovery.py - Checkout Recovery → Append-Only Ledger: records outcome
src/agents/checkout_recovery.py - Subscription Recovery → Append-Only Ledger: records outcome
src/agents/subscription_recovery.py - Receivables Chaser → Append-Only Ledger: records outcome
src/agents/receivables_chaser.py - Compliance Gate → Append-Only Ledger: logs verdict
src/agents/compliance_agent.py - Append-Only Ledger → Recovery Reports: reads ledger
src/audit/recovery_report.py - Operator / Customer → Recovery Dashboard: views telemetry
README.md - Recovery Dashboard → Workflow Orchestrator: invokes recovery
- Event Simulator → Event Models: generates events
src/data/simulator.py