The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Vantic listing page.
A spending firewall and permission layer for AI agents. Give your agent a signed budget it can't exceed — even if it gets prompt-injected — and get a tamper-proof receipt for everything it does.
Zero dependencies · TypeScript · Ed25519 + W3C DIDs · works with MCP, LangChain, or any tool-calling agent.
Your AI agent can hold a wallet and call payment APIs. That's useful — and dangerous. One prompt injection from a poisoned web page, one hallucination, one bug, and your agent pays the wrong party. This is a documented, actively-exploited failure mode: agents tricked into wiring funds to attacker-controlled accounts.
You issue your agent a signed mandate — a budget, a per-transaction cap, allowed actions, and an allowlist of who it may pay — and wrap its money-moving calls (purchase, subscribe, transfer, pay-per-use, payout, refund — any action that moves value). From then on, an out-of-scope payment is impossible: the check runs before the money-moving code, so even a fully compromised model can't execute it. Every allowed action emits a signed, tamper-proof receipt — a clean audit trail, and evidence if a charge is ever disputed.
Run npm run guard-demo to watch it block live attacker payments.
For MCP / LangChain / function-calling agents, gate an existing tool without restructuring anything:
Framework guides (OpenAI, LangChain, Vercel AI SDK, MCP, raw): docs/integrations.md.
did:key/did:web DIDs, and the owner→agent relationship is a W3C Verifiable Credential.npx vantic-mcp exposes verification tools to any MCP host.Two primitives (full spec in spec/SPEC.md):
Everything is deterministic and runs outside the agent's model.
Exposes stateless verification tools (no private keys): mandate_authorize, mandate_verify_chain, mandate_verify_credential, mandate_resolve_did.
Agents and owners can be identified by bare keys (key:<x>) or by W3C did:key DIDs — interchangeable, both verify. generateKeyPair() returns both. DIDs resolve to standard DID documents offline (resolveDidKey), the same key can be published as did:web (buildDidWebDocument), and the owner→agent relationship is a portable W3C Verifiable Credential (issueSponsorCredential / verifySponsorCredential). See npm run identity-demo.
v0.1 — early, and honest about it. The code is production-quality (Ed25519 + SHA-256 + canonical JSON; did:key/did:web + Verifiable Credential identity; zero runtime dependencies), but it is not yet audited and the wire format isn't frozen.
ROADMAP.md — exactly what is and isn't hardened, and the path to v1.0.SECURITY.md — how to report a vulnerability (please don't open a public issue).spec/SPEC.md §8 — threat model and non-goals.Feedback and PRs welcome. Apache-2.0.