Guardrails for money movement: Integrating Stripe MCP with Portia AI
Source
stripe.dev
Author
Mounir Mouawad
Date
Context
A refund AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → can assess a request while leaving the final payment decision with a person. The Portia AI example published by Stripe uses the open-source Portia agent framework to compare a customer's request with a policy document, then pauses immediately before the tool call that creates the refund. A programmatic execution agent hookA script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.Full definition → requires human approval and presents the agent's rationale; declining exits without issuing the refund. This puts the approval requirement in the execution path, rather than relying solely on the model to remember it. Permission to access the email inbox is a separate authorization from permission to send money.
Terms in this piece · Glossary
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
guardrails — The checks around a model that block bad inputs and outputs — filters, validators, and permission rules the model itself can't override.
MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.