Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions products/router/agent-autonomy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

> Can you hand an agent an API key and a cap, and have it find services, pay for them, and be **stopped** — with no per-provider accounts, no protocol knowledge, and no keys of its own?

The run below is real. Every number, hash and error on this page came from one execution against live merchants on Base mainnet and Tempo mainnet. Total cost: **$0.08**.

Check warning on line 13 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L13

Did you really mean 'mainnet'?

Check warning on line 13 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L13

Did you really mean 'mainnet'?

<Note>
**The refusal is the interesting part.** Anyone can demo a purchase. What makes an agent safe to leave running is a spend control that says no — and keeps saying no — without you being there. That's step 6, and it's the reason this page exists.
Expand All @@ -22,20 +22,20 @@

| | |
| --- | --- |
| **An API key** | Authenticates it to Nevermined. Never sent to any merchant. Must be for a **live** deployment — see below. |

Check warning on line 25 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L25

Did you really mean 'Nevermined'?
| **A Delegation** | A hard cap in cents, plus an expiry. Here: **9¢**, valid one hour. |

It is **not** given: a wallet, a private key, a merchant account, an API key for any service it buys from, or any knowledge of which payment protocol a service speaks.

<Warning>
**This run requires a live deployment.** Every service below settles on mainnet — Base `8453` and Tempo `4217` — and a sandbox deployment funds testnets only. That split is the real-money firewall and an operator cannot widen it, so pointing `$NVM_API_URL` at `api.sandbox.nevermined.app` makes step 3 fail with **`400 BCK.ROUTER.0001`**: no `accepts` entry survives the network filter.

Check warning on line 31 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L31

Did you really mean 'mainnet'?

Check warning on line 31 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L31

Did you really mean 'testnets'?

Watch for that code specifically. It is *not* the refusal in step 6 — that one is a `402 BCK.ROUTER.0003` and means the guardrail worked. A `400` here means the wrong deployment. See [the x402 rail](/products/router/rails-x402) for the firewall itself.
</Warning>

## 1. Discover

The catalog is public. No key, no account, no signup:

Check warning on line 38 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L38

Did you really mean 'signup'?

```bash
curl -s "$NVM_API_URL/api/v1/catalog/services?search=crypto&limit=20"
Expand Down Expand Up @@ -185,15 +185,15 @@
-H "Authorization: Bearer $NVM_API_KEY"
```

| Protocol | Network | Asset | Amount | Status | Tx |

Check warning on line 188 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L188

Did you really mean 'Tx'?
| --- | --- | --- | --- | --- | --- |
| `x402` | `eip155:8453` | `USDC` | 10000 | Settled | `0x44136dc5…` |
| `mpp` | `tempo` | `0x20c0…8b50` | 60001 | Settled | `0xd25f25cc…` |

Both reconcile exactly against the chains: Base **−0.010000 USDC**, Tempo **−0.060029 USDC.e** (the 0.060001 payment plus 28 units of gas, which Tempo bills in the stablecoin itself).

Check warning on line 193 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L193

Did you really mean 'stablecoin'?

<Note>
On the MPP rail, `network` comes back as a bare name — `"tempo"` — with no chain id, so it does **not** distinguish Tempo mainnet (`4217`) from the Moderato testnet (`42431`). That makes the `asset` address the only field that tells you which chain a payment actually settled on. The two token addresses, and why they are easy to misread, are in [the MPP rail](/products/router/rails-mpp#the-asset-allowlist).

Check warning on line 196 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L196

Did you really mean 'mainnet'?

Check warning on line 196 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L196

Did you really mean 'testnet'?
</Note>

Add `&format=csv` for a downloadable file. This is the same record whether you spent over one protocol or five.
Expand Down Expand Up @@ -223,14 +223,14 @@
- **One integration, many protocols.** The agent wrote no protocol-specific code. Adding a rail is the Router's problem, not the agent's.
- **The agent holds nothing.** No wallet, no private key, no merchant credentials. Funds sit in a custodial wallet it cannot reach except through a capped Delegation.
- **Spending is bounded by construction.** The cap is checked server-side on every payment, and refusing costs nothing.
- **Everything is auditable.** One ledger across every rail, with on-chain hashes that reconcile.

Check warning on line 226 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L226

Did you really mean 'auditable'?

## Reproducing it

**The six `curl` calls above are the whole run.** There is nothing else to install — a live API key, a Delegation, a funded wallet, and the requests on this page reproduce it end to end in any shell or language.

<Warning>
**This spends real money.** There is no testnet variant, and that is structural rather than an oversight: the catalog lists mainnet merchants, so a testnet run would have nothing real to discover. Sanity-check the price on each catalog entry before you buy — a legitimate service can charge over a dollar a call — and keep the Delegation cap tight enough that a mistake is refused rather than paid.

Check warning on line 233 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L233

Did you really mean 'testnet'?

Check warning on line 233 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L233

Did you really mean 'mainnet'?

Check warning on line 233 in products/router/agent-autonomy.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/agent-autonomy.mdx#L233

Did you really mean 'testnet'?
</Warning>

Before a first run, check the things that most often turn into a "Router bug" that was nothing of the sort:
Expand All @@ -240,6 +240,15 @@
- **Confirm the merchant still answers `402`** on the rail you expect. A service that stops charging is relayed with `paid: false`, and a run can otherwise "succeed" having bought nothing.
- **Check the catalog is loaded**, not serving placeholder rows — compare `total` and look at the `targetUrl`s.

If you'd rather have *your* agent do the run than drive it yourself, give it the public **`nevermined-router` skill** — the same six steps plus the guardrails, written for an assistant to act on:

```bash
/plugin marketplace add nevermined-io/docs # Claude Code
/plugin install nevermined-router@nevermined
```

Other tools are covered in [AI Coding Skill](/development-guide/build-using-nvm-skill). The skill teaches the loop; it does not lift the cap, and an agent following it will stop on a refusal exactly as described above.

<Note>
**Nevermined staff:** a scripted version of exactly this run — the six steps plus a preflight covering every point above — lives in the internal `nvm-monorepo` repository at `.claude/skills/nvm-router-demo/`. It adds `--dry-run` (spends nothing) and `--selfcheck` (offline). It is not public, and nothing on this page depends on it.
</Note>
Expand Down
23 changes: 23 additions & 0 deletions products/router/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "Nevermined Router Overview"

Check warning on line 2 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L2

Did you really mean 'Nevermined'?
description: "The Router lets your agents pay any x402 or MPP service from one budget — without those services integrating Nevermined."

Check warning on line 3 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L3

Did you really mean 'Nevermined'?
icon: "route"
---

The **Nevermined Router** is the buyer side of Nevermined. It lets your agents **pay for external services that were never onboarded to Nevermined** — any endpoint that speaks the x402 protocol or the Merchant Payment Protocol (MPP).

Check warning on line 7 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L7

Did you really mean 'Nevermined'?

Check warning on line 7 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L7

Did you really mean 'Nevermined'?

Check warning on line 7 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L7

Did you really mean 'onboarded'?

Check warning on line 7 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L7

Did you really mean 'Nevermined'?

Your agent authenticates with its Nevermined API key and spends against a **Delegation** — a budget with a hard cap and an expiry. The Router does everything else: it reads the merchant's payment challenge, signs the payment from your custodial wallet, enforces the cap, and records the spend on one unified ledger.

Check warning on line 9 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L9

Did you really mean 'Nevermined'?

Your agent never holds a private key, never learns a payment protocol, and never needs an account with the service it just paid.

## What this is not

Nevermined has two halves, and it's worth being precise about which one you're reading:

Check warning on line 15 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L15

Did you really mean 'Nevermined'?

| | **Router** (this section) | **[x402 Facilitator](/products/x402-facilitator/overview)** |
| --- | --- | --- |
Expand All @@ -29,7 +29,7 @@
A single Delegation covers x402 and MPP alike. Your agent doesn't branch on protocol, and you don't reconcile two sets of books.
</Card>
<Card title="No per-provider accounts" icon="key">
Pay-per-call services need no signup, no API key, and no subscription. The payment *is* the authentication.

Check warning on line 32 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L32

Did you really mean 'signup'?
</Card>
<Card title="A hard spending cap" icon="shield-check">
The Delegation is enforced server-side, per payment. An agent cannot exceed it — not by looping, not by retrying, not by being wrong.
Expand All @@ -48,7 +48,7 @@

You do **not** need to know which one a service speaks. In the recommended call mode the Router probes the service, detects the protocol from its 402, and pays it. The detected protocol always wins over anything you declare.

Services that authenticate with a conventional API key and bill you monthly are a different shape entirely — there is no per-request price on the wire and nothing for the Router to pay. Those aren't routable today.

Check warning on line 51 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L51

Did you really mean 'routable'?

## Environments

Expand All @@ -75,6 +75,29 @@
</Step>
</Steps>

## Let your coding assistant drive it

Everything on this page is also packaged as an **AI coding skill** — the machine-readable twin of this section, carrying the same facts and the same error codes. Install it once and your assistant knows how to discover a service, create a Delegation, make the paid call, and — just as importantly — when to stop rather than route around a refusal.

<CodeGroup>

```bash Claude Code
/plugin marketplace add nevermined-io/docs
/plugin install nevermined-router@nevermined
Comment thread
r-marques marked this conversation as resolved.
```

```bash ClawHub
npx clawhub install nevermined-router
```

</CodeGroup>

Cursor, Windsurf, Cline, Amazon Q, Codex and Copilot are covered too — see [AI Coding Skill](/development-guide/build-using-nvm-skill) for the per-tool instructions, or read [the skill itself](https://github.com/nevermined-io/docs/tree/main/skills/nevermined-router).

<Note>
Install `nevermined-router` when your agent is **spending** at external services. Its sibling, `nevermined-payments`, is for the opposite direction — **receiving** payments and buying Nevermined plans. Installing both is fine; they don't overlap.

Check warning on line 98 in products/router/overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/overview.mdx#L98

Did you really mean 'Nevermined'?
</Note>

## Next

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions products/router/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
title: "Router quickstart"
description: "From a Nevermined API key to a paid call against an external service, in five steps."

Check warning on line 3 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L3

Did you really mean 'Nevermined'?
icon: "rocket"
---

By the end of this page your agent will have paid a service that has never heard of Nevermined, from a budget you control, with the spend on your ledger.

Check warning on line 7 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L7

Did you really mean 'Nevermined'?

Everything here is plain HTTP. The Nevermined SDKs don't expose the Router yet, so the examples use `curl` and `fetch` — which is also the point: any agent, in any language, can drive it.

Check warning on line 9 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L9

Did you really mean 'Nevermined'?

Check warning on line 9 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L9

Did you really mean 'SDKs'?

<Tip>
**Prefer to have your coding assistant do this?** These five steps ship as an AI coding skill. In Claude Code, `/plugin marketplace add nevermined-io/docs` then `/plugin install nevermined-router@nevermined`; elsewhere, see [AI Coding Skill](/development-guide/build-using-nvm-skill). It also carries the guardrails an autonomous buyer must respect, which matter more than the calls themselves.
</Tip>

Set your environment once:

<Tabs>
Expand All @@ -27,13 +31,13 @@

## 1. Get an API key

Create one from the Nevermined app. Every Router call carries it as `Authorization: Bearer $NVM_API_KEY`.

Check warning on line 34 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L34

Did you really mean 'Nevermined'?

<Warning>
**Older keys don't work with the Router.** If you have a key from an earlier generation, the Router rejects it with **`403 BCK.ROUTER.0008`** — it's bound to a previous account model that can't sign these payments. The fix is simply to create a new key; newly issued keys work. Existing keys keep working for credit-based flows, so there's no rush to rotate anything else.
</Warning>

Never send this key to the service you're paying. It authenticates you to Nevermined, nothing else.

Check warning on line 40 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L40

Did you really mean 'Nevermined'?

## 2. Create a Delegation

Expand Down Expand Up @@ -62,7 +66,7 @@
That's a $5.00 cap for 7 days. The cap is enforced server-side on every single payment — your agent cannot spend past it by looping, retrying, or misreading its own budget.

<Note>
`provider: "erc4337"` is the crypto-funded Delegation, which is what both stablecoin rails use. A card-funded Delegation is a different provider and is not accepted on those rails.

Check warning on line 69 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L69

Did you really mean 'stablecoin'?
</Note>

## 3. Fund your wallet
Expand Down Expand Up @@ -91,15 +95,15 @@

| Rail | Network | Asset |
| --- | --- | --- |
| x402 | Base mainnet (`8453`) | USDC — `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |

Check warning on line 98 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L98

Did you really mean 'mainnet'?
| x402 | Base Sepolia (`84532`) | testnet USDC, from a public faucet |

Check warning on line 99 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L99

Did you really mean 'Sepolia'?

Check warning on line 99 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L99

Did you really mean 'testnet'?
| MPP | Tempo mainnet (`4217`) | USDC.e — `0x20c000000000000000000000b9537d11c60e8b50` |

Check warning on line 100 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L100

Did you really mean 'mainnet'?
| MPP | Tempo Moderato (`42431`) | PathUSD — `0x20c0000000000000000000000000000000000000`, self-funded via [one RPC call](/products/router/rails-mpp#funding-your-wallet) |

The address is the same on every EVM chain — it's one key-derived wallet, so there is nothing extra to create on Tempo. But **the balances are per-chain**: funding Base does nothing for an MPP payment. See [the x402 rail](/products/router/rails-x402) and [the MPP rail](/products/router/rails-mpp) for the full picture.

<Note>
**Funding is manual today.** There is no on-ramp — you cannot top this wallet up from a card or from a Nevermined credit balance, and the agent cannot refill itself. When the wallet runs dry, payments stop until a human sends more: on MPP with a clean `402 BCK.ROUTER.0009`, on x402 [less kindly](/products/router/rails-x402#funding-your-wallet), because that rail doesn't check the balance before signing. Budget for that when you decide how much to fund — and fund for the merchant's price **plus** any [routing fee](/products/router/how-it-works#the-routing-fee). An agent is autonomous *after* it is funded, and only until the balance runs out.

Check warning on line 106 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L106

Did you really mean 'Nevermined'?
</Note>

<Warning>
Expand Down Expand Up @@ -146,7 +150,7 @@
</Tab>
<Tab title="Python">
```python
import os, uuid, requests

Check warning on line 153 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L153

Did you really mean 'uuid'?

res = requests.post(
f"{os.environ['NVM_API_URL']}/api/v1/router/route",
Expand Down Expand Up @@ -184,7 +188,7 @@
If the resource turned out to be free, you get `paid: false` and no `payment` block — the Router relays it and charges nothing.

<Note>
**Use one stable `requestId` per logical purchase, not per HTTP attempt.** It's the idempotency key: retrying a dropped call with the same id returns the original payment instead of buying twice. Retrying with a fresh id buys twice, on purpose.

Check warning on line 191 in products/router/quickstart.mdx

View check run for this annotation

Mintlify / Mintlify Validation (neverminedag) - vale-spellcheck

products/router/quickstart.mdx#L191

Did you really mean 'idempotency'?
</Note>

## 5. Check what you spent
Expand Down