Package Exports
- @agenttoll/sdk
- @agenttoll/sdk/edge
- @agenttoll/sdk/next
- @agenttoll/sdk/tool
Readme
AgentToll SDK
One-line micropayment integration for AI agents.
Installation
From npm (recommended)
npm install @agenttoll/sdkFrom GitHub (if npm is unavailable)
npm install github:agenttoll/sdkDirect download
Copy tollbooth.js into your project.
Usage
Express
import tollbooth from '@agenttoll/sdk';
// or if installed locally:
// import tollbooth from './tollbooth.js';
app.use(tollbooth('pk_live_xxx'));Cloudflare Workers
import { tollgate } from '@agenttoll/sdk/edge';
export default tollgate('pk_live_xxx', { amount: 0.005 });Agent Tool (for AI agents)
import { payTollTool } from '@agenttoll/sdk/tool';
// Add to your agent's tools
tools: [payTollTool]API Reference
See https://agenttoll.io/docs for full documentation.