Installation
The Nevermined Payments Library is a TypeScript SDK that enables AI builders and subscribers to monetize and access AI agents through the Nevermined protocol. The library supports flexible payment plans (credits and time-based), multiple payment methods (crypto and fiat), and seamless integration with AI agent frameworks.Overview
The Payments Library provides:- Registration and discovery of AI agents with payment plans
- Flexible pricing options (fixed per request or dynamic usage-based)
- Credit-based access control with on-chain settlement
- Support for browser and Node.js environments
- Integration with MCP (Model Context Protocol) and A2A (Agent-to-Agent) protocols
Prerequisites
Before installing the Nevermined Payments Library, ensure you have:- Node.js: Version 18.x or higher
- TypeScript: Version 5.x or higher (recommended)
- Nevermined API Key: Get your free API key from nevermined.app
- Package Manager: npm (included with Node.js) or yarn
Installation
Install the library using npm or yarn:Peer Dependencies
The library has optional peer dependencies for specific integrations:Verify Installation
After installation, verify the library is correctly installed by importing it:Next Steps
After successful installation:- Get your Nevermined API key from nevermined.app
- Choose your environment (sandbox for testing, live for production)
- Initialize the Payments instance in your application
Source References:
package.jsonREADME.md