Prerequisites
Before starting, ensure you have:1
Nevermined API Key
Get your API key from the Nevermined App
2
Development Environment
- Node.js 16+ and npm/yarn
- Python 3.8+ (for Python examples)
- A code editor (VS Code recommended)
3
Blockchain Wallet
- MetaMask or compatible wallet
- Some test tokens for the testing environment
SDK Installation
- TypeScript/JavaScript
- Python
Initialize the SDK
- TypeScript
- Python
Development Guides
Simple AI Agent Guide
Learn how to build and monetize a straightforward AI agent, like a chatbot or a simple API, from scratch.
Multi-Agent System Guide
Discover how to orchestrate a system where multiple AI agents collaborate and pay each other for services.
Key Concepts for Development
Agent Registration Flow
Subscriber Access Flow
Common Development Patterns
1. Direct Integration
Best for new services where you have full control:- Integrate SDK directly into your application
- Handle validation in your code
- Maximum flexibility and control
2. Proxy Integration
Best for existing services:- No code changes required
- Nevermined Proxy handles payments
- Quick to implement
3. Hybrid Approach
Combine both patterns:- Use proxy for standard endpoints
- Direct integration for custom logic
- Balance between control and convenience
Best Practices
Security
Security
- Never expose your API key in client-side code
- Use environment variables for sensitive data
- Implement rate limiting
- Validate all inputs
Performance
Performance
- Cache access tokens
- Batch API calls when possible
- Monitor credit usage
- Implement graceful error handling
Code Organization
Code Organization
- Separate payment logic from business logic
- Use middleware for authentication
- Implement proper logging
- Write tests for payment flows
Choose Your Path
- If you are new to Nevermined or want to monetize a single AI service, start with the Simple AI Agent Guide.
- If you are building complex, autonomous systems where agents interact, head to the Multi-Agent System Guide.