Agent loop
Counter operates on a linear, verifiable perception-to-execution pipeline for every incoming message:
Merchant policy
The merchant defines non-negotiable boundaries before any conversation starts. These parameters are stored separately in protected memory outside the buyer's reach:
Pricing Guardrails
- • List Price: Starting public offer (e.g. ₹6,000)
- • Floor Price: Absolute lowest acceptable price (e.g. ₹5,200)
- • Max Discount: Strict cap on total price concessions (e.g. ₹800)
Operational Bounds
- • Allowed Bundles: Pre-approved bonuses (e.g. 30-min strategy review)
- • Max Rounds: Hard ceiling on back-and-forth turns (e.g. 4 rounds)
- • Payment Permissions: Strict link generation criteria and TTL
The deal gate
Every offer or agreement proposed by the AI model passes through a deterministic validation gate before any downstream action can take place:
The model cannot move money
The generative AI model has no access to payment credentials, API secret keys, or checkout creation tools.
What AI can propose
Execution Boundary
Razorpay Payment Links are created purely by a secure server-side execution worker after verifying the deterministic deal gate.
Safety against prompt injection
Buyer messages and model outputs are treated as untrusted data inputs. No conversational payload can rewrite the merchant's immutable policy state:
Neutralized Attack Vectors
Deal memory
Counter maintains full state awareness throughout the negotiation lifecycle so it never negotiates each turn in isolation:
Historical Offers
Remembers past price concessions and counter-offers.
Turn Tracking
Enforces max round limits before finalizing or exiting.
Deal Locking
Locks agreed price and delivers immutable checkout parameters.
Razorpay execution boundary
Payment link generation follows a zero-trust handoff:
Failure handling
If an offer violates merchant authority, Counter strictly blocks the action instead of trying to coerce or force a compromised transaction through.
• Fail-Safe Default: Execution state defaults to `BLOCKED` unless all 5 gate criteria evaluate to `PASS`.
• No Hallucinated Discounts: The server verifies the exact arithmetic difference between list price and final quote.
System architecture
Complete data flow across system components:
Stage 1
Buyer
Stage 2
Agent
Stage 3
Memory
Stage 4
Policy Context
Stage 5
Planner
Stage 6
Structured Decision
Stage 7
Deterministic Gate
Stage 8
Execution
The model suggests. Merchant rules decide.
Counter gives merchants complete confidence to deploy autonomous deal negotiation at scale without risking profit margins.