home / signed refund-policy sandbox
Live · signed metadata evaluation

Watch a policy evaluate a simulated money action.

Each action sends a fixed demo policy, caller-declared capability, and action metadata to /api/gate/authorize. The endpoint evaluates those supplied fields and signs the result. A separate first-party route at /api/verify recomputes the signature check. No payment provider is called.

simulated actionscapability: read_only
choose demo metadata
change the caller-declared claim
the architecture boundary
agentguard · refund policyattempt 0
› waiting for the agent. press an action on the left.
last signed receipt
no receipt yet
independent verification
awaiting a decision to verify
What just happened

The endpoint returns a signed policy result.

This sandbox signs an evaluation of browser-supplied metadata. It does not authenticate the policy or capability claim, dispatch a tool, or call a payment provider.

01 · wrapped

The live call is an evaluation

The hosted endpoint evaluates metadata and returns a decision. The demo contains no Stripe client and performs no refund or payout.

02 · checked

Declared fields are checked

The endpoint compares the supplied action, amount, capability claim, spend-to-date value, and policy rules. It does not authenticate those fields or implement expiry, replay, or idempotency checks.

03 · proven

Each result is signed

Allow, escalate, and block results produce standalone Ed25519 receipts. The signature protects the recorded fields from later editing; it does not prove human authorization.

Payload-minimized by design

What's in this demo request and its signed result.

This fixed demo sends metadata only. The endpoint rejects reserved content keys and long strings, but integrators must still keep personal data and secrets out of caller-controlled metadata fields.

caller-supplied request metadata
toolrefund_customer
actionmoney:refund
agentsupport-agent-v20
policyrefunds-tier-1
capability_claimpayment_execute
window_spent$0.00
payload-minimized receipt
idag_8af4d2c1
decisionALLOWED
amount$142.50
signered25519:a3f2··c1
policy_hashsha256:9e4d··e0
signatureed25519:8af4··d2c1
This fixed demo omits customer names, account and card details, prompts, and model output. The signature covers the recorded metadata and decision only.
Low lift

Wire a guarded tool in your application.

The SDK can evaluate configured tool policy before invoking an executor. Your application must keep the raw provider client outside the agent's tool registry and configure the policy, signing keys, and decision-log storage it needs.

Node
Python
// wrap the one function that moves money
import { SpendGuard } from "@agentguard-run/spend";

const guard = new SpendGuard({ policy, signingKeys });

// the agent calls refund() instead of the raw Stripe call.
// dispatchToolCall evaluates configured policy before it calls Stripe.
// A block or escalation throws AgentGuardBlockedError, so this executor is not called.
const refund = (orderId, amount) =>
  guard.dispatchToolCall(
    { scope: "money:refund", toolName: "refund_customer", toolArgs: { orderId, amount } },
    (args) => stripe.refunds.create(args)
  );
# wrap the one function that moves money
from agentguard_spend import SpendGuard

guard = SpendGuard(config)

# dispatch_tool_call raises AgentGuardBlockedError when tool policy refuses.
async def refund_customer(order_id, amount):
    return await guard.dispatch_tool_call(
        {"scope": "money:refund", "toolName": "refund_customer",
         "toolArgs": {"order_id": order_id, "amount": amount}},
        lambda args: stripe.Refund.create(**args),
    )
The question every buyer asks

So what stops the agent from calling Stripe directly?

"If it's just an SDK, can't the agent route around it?"

Fair question, and the honest answer matters. In your integration, keep the raw Stripe client outside the agent's tool registry and expose only the wrapped function. dispatchToolCall invokes that executor only after the configured policy approves, so this protection depends on your application not exposing a bypass path. With signing configured, AgentGuard records the application-supplied request metadata and policy result in a content-free receipt whose signed fields can be checked later. It does not custody funds or proxy provider traffic.

Put a gate in front of your money-moving agent.

Install the SDK and wrap the tool in your own runtime. The package license permits production use through 10,000 enforcement calls per calendar month.