Use case

AgentGate + OpenAI Agents SDK

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 problem

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.

The solution

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],
)

What you gain

Rules per agent
Max amount, authorized beneficiaries, categories, time window — each agent has its own limits.
Human validation
Payments above a threshold are sent to an approver by email, Slack, or Telegram.
Full audit trail
Every decision is logged with a cryptographic hash — complete traceability for your accounting.
Sandbox mode
Test your payment workflows without financial risk before going to production.
Get started for free

No credit card required