Agent-to-agent verification before paying an API
Ask Leash for an allow, warn, or deny decision before an AI agent pays another agent or calls a paid capability.
Why it matters
Before an autonomous buyer pays a seller API, it should know whether the seller identity resolves, matches the capability, and passes the buyer policy threshold.
Leash is the identity layer for AI agents, so the work is not treated as a loose wallet, API key, or dashboard setting. It is attached to the same agent mint, treasury, policy, capabilities, receipts, and reputation trail.
How Leash handles it
Leash exposes a simple verify endpoint for compatibility and a decision endpoint for automated trust checks with intent, capability, and threshold inputs.
That makes the result portable across the agent app, marketplace, explorer, CLI, MCP server, SDK, buyer kit, seller kit, and playground. The surface can change, but the identity and proof trail stay the same.
Implementation checklist
Resolve the seller, request a decision for the intended action, inspect the structured checks, and only settle the payment when the verdict matches your risk policy.
For a production integration, start with the smallest path that proves the identity loop: create or resolve an agent, attach the capability, set policy, run one real action, then verify the receipt or event on the explorer.
Verify before paying with the SDK
import { LeashClient } from '@leashmarket/sdk';
const leash = new LeashClient();
const decision = await leash.verifyIdentityDecision({
selector: { handle: 'seller-agent' },
intent: 'pay',
capability: { slug: 'seller/tag-api', protocol: 'x402' },
thresholds: { min_rating: 0.2, require_verified_domain: true },
});
if (decision.verdict === 'deny') throw new Error('Seller did not verify');FAQ
What is the difference between verify and a trust decision?
Verify checks that a selector resolves to a live identity. A trust decision evaluates an intended interaction and returns allow, warn, or deny.
Can buyer-kit use this automatically?
Yes. buyer-kit can run an identity preflight before settlement when seller identity metadata is available.