@xpaysh/agent-kit-core
v0.1.1
Published
Core payment protocol utilities and types for AI agents
Maintainers
Readme
@xpaysh/agent-kit-core
Core payment protocol utilities for building AI agents that can make autonomous micropayments.
Overview
The Agent Kit Core package provides the foundational classes and utilities for building AI agents that interact with payment-protected APIs using the x402 protocol. It includes smart proxy management, paywall functionality, and comprehensive spending controls.
Features
- SmartProxy: Manage AI agents with autonomous payment capabilities
- Paywall: Monetize your APIs with built-in payment verification
- Spending Controls: Set daily, per-call, and total spending limits
- Transaction Tracking: Monitor and analyze agent spending patterns
- Error Handling: Comprehensive error types for payment operations
Installation
npm install @xpaysh/agent-kit-coreQuick Start
import { SmartProxy } from '@xpaysh/agent-kit-core';
const smartProxy = new SmartProxy({
privateKey: process.env.PRIVATE_KEY,
network: 'base-sepolia',
spendingLimits: {
dailyLimit: 10,
perCallLimit: 1
}
});
// Make a payment-protected API call
const response = await smartProxy.protectedFetch('https://api.example.com/data');
console.log('Data:', response.data);
console.log('Cost:', response.cost);Documentation
For comprehensive documentation, guides, and examples, visit:
- Documentation: https://docs.xpay.sh
- Website: https://www.xpay.sh
Links
License
MIT © xPay
