Publishing Static Resources
In addition to AI agents, you can register static resources (files, datasets, documents) as payment-protected content. This allows you to monetize access to files, datasets, models, or any static content through the Nevermined protocol.Overview of Static Resources
Static resource agents are specialized agent registrations that provide access to files and documents instead of interactive AI services. They work identically to regular agents but are optimized for static content delivery. Use Cases:- Premium datasets (CSV, JSON, Parquet files)
- Trained ML models (PyTorch, TensorFlow checkpoints)
- Documents and reports (PDF, DOCX)
- Media files (images, audio, video)
- Configuration files and templates
- API specifications and documentation
Register Static Resource Agents
Static resources are registered using the same Agents API, but with HTTP GET endpoints pointing to your content URLs:Using Wildcards for Multiple Files
You can use wildcards to grant access to multiple files with a single endpoint pattern:Single Wildcard
https://storage.example.com/datasets/weather/2024-data.csvhttps://storage.example.com/datasets/weather/hourly-readings.jsonhttps://storage.example.com/datasets/climate/temperature-records.csv
Multiple Wildcards
https://storage.example.com/datasets/weather/2024/january.csvhttps://storage.example.com/datasets/climate/2023/summer.json
File Type Wildcards
Examples
Example 1: Dataset Collection
Example 2: Model Repository
Example 3: Document Library
Example 4: Directory-Level Access
MCP Logical URIs for Static Resources
When registering static resource agents in the Nevermined App, you can also use MCP logical URIs with wildcards:Access Control
Static resources use the same X402 access token authentication as AI agents:- Subscribers order a plan and receive credits
- Subscribers generate an X402 access token
- Requests to static resources include the token in the
PAYMENT-SIGNATUREheader - Your server verifies the token and grants access
- Credits are burned based on your plan configuration
Best Practices
- Organized Structure: Use clear URL patterns with logical path segments
- Wildcard Strategy: Balance flexibility (broad wildcards) with security (specific patterns)
- File Types: Specify file extensions in patterns when possible (e.g.,
*.csv,*.pdf) - Preview Access: Consider providing free samples via
openEndpoints - Metadata Tags: Include file types and categories in tags for discoverability
- Plan Configuration: Set appropriate credits per download based on file size/value
Complete Example: Multi-Format Resource Library
Related Documentation
- Agents - Agent registration fundamentals
- Payment Plans - Configure pricing for resource access
- Validation of Requests - Verify access tokens for downloads
Source References:
src/api/agents-api.ts(Agents API for static resources)RUN.md(MCP logical URIs with wildcards)