Your OpenAI agents can now pay — but not without control. AgentGate integrates as a native tool in the OpenAI Agents SDK and validates every transaction before execution.
The OpenAI Agents SDK lets your agents call external tools, access APIs, and orchestrate complex workflows. But when an agent can trigger payments, every bug, ambiguous instruction, or prompt injection becomes a direct financial risk. Without guardrails, a misconfigured agent can drain an account in seconds.
Add AgentGate as a tool in your agent. Every time the agent wants to pay, it callspay_with_agentgate — and AgentGate decides: approve, reject, or request human validation according to your rules.
from agents import Agent, tool
import httpx
@tool
def pay_with_agentgate(amount: float, beneficiary: str, iban: str, reason: str) -> str:
"""Submits a payment to AgentGate for validation before execution."""
res = httpx.post(
"https://agentgate.eu/api/v1/payment-intents",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"amount": int(amount * 100), # in cents
"currency": "EUR",
"beneficiary": {"name": beneficiary, "account_identifier": iban},
"category": "payment",
"memo": reason
}
)
data = res.json()
return f"Status: {data.get('status')} — ID: {data.get('id')}"
agent = Agent(
name="FinanceAgent",
instructions="You are a finance assistant. For any payment, use pay_with_agentgate.",
tools=[pay_with_agentgate],
)
No credit card required