paybondpaybond
Sign in

Agent middleware

Model-agnostic spend middleware for agent tool calls.

Authorize at the tool boundary, submit evidence automatically, and keep one intent per agent run — across OpenAI, Claude, Gemini, LangGraph, MCP, and custom orchestrators.

Why tool boundary, not model boundary

Paybond does not proxy LLM inference. Model providers handle token usage; Paybond authorizes paid and side-effecting tools before they execute and records proof afterward.

DimensionPaybond middlewareWithout Paybond middleware
Spend scopePaid tools, vendor APIs, bookings, settlement workflowsModel token budgets (LiteLLM, provider dashboards)
Integration pointTool handler / MCP tool / graph nodeModel API proxy or gateway
EvidenceAutomatic on successful side-effecting callsUsage logs or invoices
Authorization modelCapability-scoped authorization — intent bound per agent runPre-call if-check in app (easy to bypass per tool)

Sandbox smoke (CLI)

Rehearse spend authorization and evidence in sandbox without writing integration code. JSON output for coding agents.

paybond login
paybond agent sandbox smoke \
  --operation paid-tool \
  --requested-spend-cents 100 \
  --evidence-preset cost_and_completion \
  --result-body '{"status":"ok","cost_cents":100}' \
  --format json

Clone a starter template

Public GitHub template repos ship paybond.policy.yaml, .env.example, npm run smoke (policy-file based), and CI. git clone → paybond login → npm run smoke in under a minute.

Scaffold locally

paybond init --template travel-agent --framework langgraph

Or clone from GitHub

git clone https://github.com/nonameuserd/paybond-travel-agent.git
cd paybond-travel-agent
cp .env.example .env.local
paybond login
npm install
npm run smoke

Framework adapters

Bilingual frameworks ship TypeScript and Python docs, exports, and smoke on one page — complete sandbox smoke in either language without reading the other kit.

  • Agent-agnostic core

    Defaultavailable

    TypeScriptPython

    Default recommended when you have no framework SDK — custom orchestrators, Claude/Gemini tool-use, or queue workers. createPaybondGenericAgentConfig in TypeScript and Python with identical semantics.

    paybond agent demo generic smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • LangGraph

    available

    TypeScriptPython

    ToolNode hooks in both kits — paybondAwrapToolCall / paybond_awrap_tool_call and paybondToolNode parity. Bilingual docs and smoke; no need to read the other kit.

    paybond agent demo langgraph smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Claude Agents SDK

    available

    TypeScriptPython

    In-process MCP custom tools wrapped with Paybond middleware. TypeScript (@anthropic-ai/claude-agent-sdk) and Python (claude-agent-sdk) parity — bilingual docs and smoke.

    paybond agent demo claude-agents smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Vercel AI SDK

    available

    TypeScript

    toolApproval + paybondVercelWrapTools for AI SDK generateText / streamText. TypeScript only — Python Kit links here.

    paybond agent demo vercel-ai smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • OpenAI Agents SDK

    available

    TypeScriptPython

    Input guardrails with wrapped invoke for OpenAI Agents function tools. TypeScript and Python on the same doc page.

    paybond agent demo openai-agents smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • MCP hosts

    available

    TypeScriptPython

    Tenant-bound MCP tools for Claude Desktop, Codex, and generic orchestrators — stdio via paybond-mcp-server, or Streamable HTTP at mcp.paybond.ai / paybond mcp serve --transport http. TypeScript and Python kits ship the same tool surface.

    paybond login
    # Launch: npx -y -p @paybond/kit paybond-mcp-server
    # Or see /docs/kit/coding-agent-setup
    Adapter docs →
  • Mastra

    available

    TypeScript

    Wrap Mastra createTool execute handlers with spend verify and auto-evidence. TypeScript only — use agent-agnostic or MCP from Python.

    paybond agent demo mastra smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • CrewAI

    available

    Python

    Wrap CrewAI @tool and BaseTool handlers with spend verify and auto-evidence. Python only — use agent-agnostic or MCP from TypeScript.

    paybond agent demo crewai smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Pydantic AI

    available

    Python

    Wrap Pydantic AI Tool and callable handlers with spend verify and auto-evidence. Python only — use agent-agnostic or MCP from TypeScript.

    paybond agent demo pydantic-ai smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Google ADK

    available

    TypeScriptPython

    Wrap Google ADK FunctionTool execute handlers with spend verify and auto-evidence. TypeScript and Python parity on npm (@paybond/google-adk) and pip (paybond-kit[google-adk]).

    paybond agent demo google-adk smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Microsoft Agent Framework

    available

    Python

    Gate MAF tools with Harbor function middleware and auto-evidence. Python only — use agent-agnostic or MCP from TypeScript.

    paybond agent demo microsoft-agent-framework smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →
  • Cloudflare Agents

    available

    TypeScript

    Wrap Cloudflare Agents getTools AI SDK tool execute handlers with spend verify and auto-evidence. TypeScript only — use agent-agnostic or MCP from Python.

    paybond agent demo cloudflare-agents smoke --operation paid-tool --requested-spend-cents 100 --evidence-preset cost_and_completion --format json
    Adapter docs →

Full install surfaces and rails: Kit support matrix