paybondpaybond
Sign in

Mastra adapter

Planned Paybond adapter for Mastra agents. Use agent-agnostic middleware or MCP until the native adapter ships.

A dedicated Paybond adapter for Mastra is planned. Paybond does not ship createPaybondMastraConfig or a @paybond/kit/mastra subpath yet.

Integrate today

Use one of these supported paths while the Mastra-specific runner helper is in development:

PathWhen to use
Agent-agnostic adapterYou control Mastra tool execute handlers — wrap them with createPaybondGenericAgentConfig or paybond.instrument({ tools }).
MCP serverYour Mastra host can launch a stdio MCP child process for Paybond authorize/evidence tools.

TypeScript (agent-agnostic):

import { Paybond } from "@paybond/kit";

const paybond = await Paybond.open({ apiKey: process.env.PAYBOND_API_KEY! });

const { agentTools: tools } = await paybond.instrument({
  policy: "./paybond.policy.yaml",
  tools: {
    "travel.book_hotel": bookHotel,
  },
});

// Register `tools` with your Mastra agent/tool definitions.

Sandbox smoke (no Mastra runtime required):

paybond agent demo generic smoke \
  --operation paid-tool \
  --requested-spend-cents 100 \
  --evidence-preset cost_and_completion \
  --format json

Request a Mastra adapter

If Mastra is your primary framework, request a Mastra adapter and mention Mastra in your message. We prioritize native adapters by production demand and community signal.