AgentRaaS
Online shopping and quick commerce

Let AI agents refund, message and pay, inside your limits

For teams whose agents already handle support refunds, WhatsApp order updates, rider and vendor payouts or stock orders. AgentRaaS sits between the agent and Razorpay, Cashfree, RazorpayX, Gupshup or your own systems: every action runs once, a refund is checked against what the order really cost, big ones wait for a person, and every action is in the audit trail.

See the refund agentSelf-host it

What it stops

What goes wrongWhat AgentRaaS does
A retried refund is paid twiceThe same refund runs once; a repeat gets the first answer back.
The agent refunds more than the order was worth, or was talked into itAgentRaaS reads the order from the provider itself before the refund runs, and holds anything over your limit (for example half the order) for a person.
Small refunds add upA spend cap limits refunds per agent per day, counted in India time.
A customer gets the same WhatsApp message five timesThe same message to the same number is sent once.
An agent stuck in a loop messages customers at nightA policy allows messages only during the hours you set.
A rider payout times out and is paid againEvery payout carries one idempotency key that survives retries; a call that may have gone through is never retried blindly.
A pricing agent sets a price far too lowA validation rule checks the price range; a big drop can wait for approval.
The payment gateway goes down during a saleThe circuit breaker pauses calls instead of hammering it; failed calls wait in Failed requests to be replayed.
"Why did the bot refund this?"Every action, run or refused, is in the audit trail with the reason.

A support agent that refunds orders

A customer says an item was missing. The agent may refund it, but never more than half of what the order cost, and never more than a day's budget. The limit comes from the order Cashfree has, not from anything the agent sends:

POST /api/v1/action-policies
{ "org_id": "org_acme", "agent_id": "support-agent",
  "service": "cashfree", "action": "refund.create", "effect": "require",
  "fields": { "refund_amount": { "max_from": {
      "action": "order.get", "with": { "order_id": "order_id" },
      "field": "order_amount", "factor": 0.5 } } },
  "on_violation": "hitl" }

A refund over half the order, a refund with no amount (which would refund everything) and a refund for an order Cashfree can't find all wait for a person instead of running. With Razorpay, the same rule reads payment.get and subtracts what was already refunded. For store credits or wallet top-ups, point it at your own order API through a custom action.

Every case of this tutorial, with the real requests and responses, and the same steps clicked through in the dashboard: A support agent that refunds orders.

Built in for India

ServiceWhat an agent can do
RazorpayCreate orders, read a payment, refund it
Cashfree PaymentsCreate and read orders, refund them (with a test-mode version for sandbox keys)
RazorpayX PayoutsPay riders, sellers and vendors; read a payout
GupshupSend WhatsApp messages
Your own systemsWallet credits, coupons, order changes, stock: any HTTP API as a custom action, with the same checks

Setup for each, with a first rule worth adding: Recipes.

When there is no API

Quick-commerce platforms don't offer open seller APIs. Brands that sell through them work from portal reports, emailed purchase orders and the seller panel. AgentRaaS can't sit inside someone else's portal, but most of the work around it does go through an API you control:

Busy days

Measured on one 4-core desktop running everything itself: 1,000 new calls a second with a p50 of 3 ms, a p99 of 142 ms and no errors, and 300 refunds a second with a lookup limit at a p99 of 3.4 ms. Two server instances sharing one database still ran every call exactly once, with every call sent to both at the same moment. More instances can share the load; the speedup on separate machines is not measured yet. The numbers and how to reproduce them.

Keep it on your servers

Self-hosted, AgentRaaS runs on your own servers, for example in an Indian cloud region: your provider keys, your customers' order data and the audit trail stay with you. Install with one command, Docker or Podman, or the Helm chart and AWS template: Self-hosting.

Before you go live

Using another service?

PhonePe, Paytm, Shiprocket, Delhivery or MSG91: any of them works today as a custom action, with the same checks. Tell us which ones you want built in.

Ask in the communityCustom actions