AI Agent for Customer Support: A Refund Within the Agent's Limit

This is a story about an AI agent for customer support that resolves a double charge on first contact by asking a billing agent, run by another team on another platform, to issue the refund. The organisation is invented, the amounts and times are illustrative, and the scene shows a pattern, not a measured result. I'm Harry Edwards, Head of Solutions Engineering at StudioX, and this is the handoff I walk support and billing leaders through most often.
The Moment
It is 7:40 on a Monday evening at a mid-sized online retailer of kitchen equipment that ships a few thousand orders a week. A customer opens a ticket: "I was charged twice for order 58213. Same amount, same day. Please fix this."
The support desk has closed for the evening. The billing team, which owns payments and refunds, works a different shift on its own systems. On a normal evening this ticket waits until morning. Tonight the support assistant, built in StudioX, picks it up as it arrives.
What Used to Happen
A support rep read the ticket next morning and opened the order system. If it showed only one payment, the rep emailed billing a screenshot and asked them to check the payment processor. Billing replied, sometimes that day, sometimes the next, confirming the duplicate. The rep then asked billing for the refund, because support had no access to payments. Billing re-keyed the order number and amount into a refund form, issued it, and emailed back a reference, which the rep copied into a reply.
Several people's attention, at least two emails, one re-keyed refund, and a customer who had already written a second time. First-contact resolution on billing tickets was low because every one became an internal escalation to another team. Giving support reps direct access to payments was rejected by billing and security for good reasons: billing owns refunds and answers for them at month end.
What Happened Instead: An AI Agent for Customer Support Takes the Ticket
The trigger. The ticket arrives. The support assistant reads the message, finds order 58213, and pulls the order history through its connector, using tools over MCP, the Model Context Protocol.
What it read and decided. The history shows two card payments of $86.40 (illustrative), four minutes apart, against one order with one shipment. The agent's instructions define a duplicate charge as two payments matching in amount and card against a single order with no second shipment. The pattern matches. The right outcome is a refund of one payment, and the agent is not allowed to issue it. Billing is.
The handoff. Billing runs its own refund agent on another platform. It speaks Agent2Agent (A2A), the Linux Foundation protocol that lets agents discover each other and pass work between them.
The support agent first reads the billing agent's Agent Card, a JSON document published at a well-known URL on billing's host. It gives the agent's name, its endpoint, its skills (one is "refund a captured payment"), the content types it accepts, that it supports streaming, and that callers authenticate with OAuth 2.0.
Before anything goes out, the action is checked by Agent Policies, which evaluates every tool call against the retailer's Rego rules in Open Policy Agent. The support team's rule allows this agent to request refunds up to $150 without a person. $86.40 is under the refund limit, so the check allows it, and the allow is logged.
The support agent sends a message with a text part explaining the request and a structured data part: order number, duplicate payment ID, amount, currency and ticket number. The billing agent creates a task, and the support agent follows its states as a stream: submitted, then working while billing checks the payment against its own records and rules, then completed. The support agent never sees how billing decided or which systems it called. A2A agents are opaque to each other.
The artifact. The result comes back as an artifact: a refund reference, the amount, the payment it was refunded against, and when the credit should reach the card.
What the support agent did with it. It writes the reference into the ticket, notes that the duplicate was confirmed from the order history and refunded by billing, and drafts the reply.
Where a person came in. For this ticket, nobody needed to. The refund was inside the limit the support lead set, so the agent sent the reply and closed the ticket. The support lead sees it next morning in the resolved queue, with the full trace.
Change one number. If the duplicate had been $620 on a large cookware order, the same rule would not allow it. The workflow pauses at a defined approval step before the A2A request is sent. A support lead opens the ticket, sees both payments and the proposed refund, and approves; only then does the task go to billing. The customer gets a holding reply meanwhile.
The outcome. Within minutes (illustrative), the customer reads: "You were charged twice for order 58213. We've refunded the second charge of $86.40. Your refund reference is RF-77140. The credit should appear on your card within a few business days." No second email, no internal escalation, and billing still issued the refund under its own rules.
Why It Worked
Two agents, two teams, two platforms. Support owns the support assistant; billing owns the refund agent. Neither rebuilt its agent on the other's platform or handed over system access. A2A is the agreement about how to ask and how to answer, and the ownership line between support and billing stayed where it was.
The Agent Card. No custom integration was built. The support agent read the card and learned the skill, endpoint, accepted content and required authentication. If billing changes its agent internally, the card stays the contract. In the other direction, StudioX publishes its assistants and missions as A2A agents with their own Agent Cards, so other teams' agents can send them work. Any external agent can be tried from the A2A playground in Studio before you rely on it.
The task lifecycle. A refund is not instant on billing's side. Streamed task states told the support agent at each point whether the work was accepted, in progress, done or failed. A failed task leaves the ticket open and routes it to a person with the reason attached.
Policy and approval. The refund limit is a rule, not a line in a prompt. Agent Policies checks it before the action runs and logs every allow and deny, and the approval step puts a support lead exactly where judgment is needed. IBM's 2025 research found that 97% of AI breaches traced back to missing access controls; a refund limit enforced outside the model is that control, applied to money.
The provenance record. StudioX lets you download a W3C PROV provenance record for any agent run: which agent or person acted, what data it used, what it produced. Here that is the order history read, the policy decision, the task sent and the reference returned. With OpenTelemetry the run is one trace, sent to Datadog, Grafana, Splunk or any OTLP endpoint. When billing reconciles at month end, the answer is already written down.
The limits: A2A only works if the other side speaks it, so billing's agent must publish a card and accept tasks. The protocol is new, and both teams still have to agree on what a refund request contains. StudioX supports A2A 1.0 through its gateway at /a2a; the billing platform has to support it too.
What This Pattern Generalizes To
One agent owns the customer conversation and asks another team's agent to do what only that team may do:
- Goodwill credit for a late delivery. Support confirms the delay from the shipment record and asks billing's agent for a store credit, with its own credit limit.
- Mid-cycle subscription change. Billing's agent prorates and returns the adjusted amount for the reply.
- Charge already under dispute. Support asks billing's agent for the dispute status first, so the customer is not refunded twice.
- Return authorisation. The warehouse team's agent issues a return label and reference; billing refunds once the item arrives.
The support lead sets the limits, the owning team keeps its system, and the customer gets one reply that finishes the job.
Frequently Asked Questions
Does the support agent get access to the payment system?
No. It reads the order history it already has and sends a request to billing's agent, which decides under billing's rules and issues the refund in billing's system. Connections that do exist use OAuth 2.0, granted per connection and revocable at the source.
Who sets the refund limit, and can it vary?
The support team, with whoever owns risk, writes it as a Rego policy rule. It can be as specific as the business needs: a different limit for credits than for cash refunds, a lower limit for new accounts, none on disputed orders. Anything above it pauses for a support lead's approval.
What if billing's agent fails the request?
The task ends in a failed state and the support agent sees the reason. The ticket stays open, moves to a person with the order details attached, and the customer receives a holding reply. The trace shows where the handoff stopped.
Call to Action
If your support team escalates billing tickets every day, start with one handoff: duplicate charges under a limit your support lead is comfortable with. Map who owns the refund, what the request contains, and where a person approves. StudioX customers report employee productivity up 32% and operational costs down 40%; your figures will depend on your volumes and rules. See how support teams use StudioX on our solutions page, or read about the Enterprise AI Platform.
Related Reading
Discussion
No comments yet — start the conversation.