Skip to main content

Managing AI Agents

Complete guide to registering and managing AI agents with the Nevermined CLI.

Overview

AI agents are services that users can access by purchasing payment plans. Agents can be:
  • AI assistants: Chat-based conversational agents
  • API services: REST APIs with metered access
  • Data pipelines: Processing services with usage tracking
  • Tools: Utility services with pay-per-use billing

Listing Agent Plans

Get the list of plans that can be ordered to access an agent:

Getting Agent Details

Retrieve detailed information about a specific agent:
Example:
Output includes:
  • Agent metadata (name, description, creator)
  • API endpoint configuration
  • Associated payment plans

Registering Agents

Register Agent with Existing Plans

Register a new AI agent and associate it with one or more existing payment plans:
agent-metadata.json:

Register Agent and Plan Together

Register a new AI agent and create a payment plan for it in a single command:
Optional flags:
  • --access-limit — Limit the number of times the plan can be ordered
plan-metadata.json:
price-config.json:
credits-config.json:

Updating Agents

Update Agent Metadata

Modify agent name, description, API endpoint, or other metadata:
Both --agent-metadata and --agent-api are required. updated-metadata.json:

Managing Payment Plans

Add Payment Plan to Agent

Associate an existing payment plan with an agent:
Example:

Remove Payment Plan from Agent

Disassociate a payment plan from an agent:
Example:

List Plans Associated with Agent

See which plans give access to an agent:

Integration Examples

Example 1: Full Agent Setup

Complete workflow to register and configure an AI agent:

Example 2: One-Step Agent and Plan Registration

Register an agent and its payment plan in a single command:

Example 3: Multi-Plan Agent

Register an agent with multiple pricing tiers:

JSON Output for Automation

Use --format json to integrate with other tools:

Best Practices

1. Use Descriptive Metadata

Provide comprehensive information about your agent:

2. Implement Proper API Endpoints

Ensure your agent API follows best practices:
  • Use HTTPS for all endpoints
  • Implement rate limiting
  • Return proper HTTP status codes
  • Include error handling

3. Test Before Production

Always test agents in sandbox environment:

Common Issues

”Payment plan not found”

Verify the payment plan exists and you’re using the correct plan ID:

“Insufficient permissions”

Ensure you’re the agent owner or have proper permissions:

Next Steps

  • Purchases - Users ordering your agent plans
  • Querying - Accessing agents with X402 tokens
  • Plans - Creating payment plans for your agents