Open source · agent-native commerce infrastructure

The open-source SDK that lets publishers monetize AI agents.

Infrastructure for selling any paywalled content or media — articles, video, datasets, APIs, courses, images — to autonomous agents. The demo is a research newsletter; that's just one surface.

npm i @nanorail/sdk

A new class of consumer has arrived

AI agents read differently than people. They don't follow a publication over a month — they fetch a specific paragraph, a specific chart, a specific citation, and move on. Today, publishers have no native way to monetize that demand.

Humans
Subscribe
Consume many articles over time

A subscription serves this demand well. NanoRail leaves it exactly as it is.

Agents
Need specific paragraphs
Need specific charts
Need specific citations

Often only a small portion of available content — and there's no native infrastructure to charge for it.

NanoRail creates that infrastructure: discovery, metered access, receipts, and payments for agent consumption — alongside the subscriptions you already sell.

NanoRail does not replace subscriptions. It monetizes demand that subscriptions cannot efficiently serve.

How NanoRail works

Two sides, both automatic. The publisher marks content once; consumers (human or agent) discover, pay, and receive — per unit.

Publisher
Add attributes Manifest generated Discovery enabled Payments enabled
Consumer (human or agent)
Discover Evaluate Purchase Receive content

Every NanoRail publisher gets a Publisher Discovery Agent — a query interface over its paid catalog. A buyer agent asks "do you have information for my task?" and gets ranked, publicly-safe suggestions (title, teaser, tags, price, confidence) — never the content — so it decides what's worth buying before paying. Watch it in Agent Mode on the demo: pick a task, and the agent discovers, decides, buys only what's relevant, and returns an answer with sources, receipts, and total cost.

The Agent Wallet

Publishers decide what can be purchased. Users decide what their agents are allowed to buy. The Agent Wallet is the control layer in between — NanoRail enforces both policies before any money moves.

Publisher policies NanoRail User agent policies
Spending budgets

A hard daily cap — the agent can never exceed it.

Publisher trust controls

Restrict purchases to verified publishers only.

Content-type restrictions

Allow articles, charts, citations; block video, audio, downloads.

Auto-pay rules

Auto-approve small buys; require manual approval above a threshold.

Receipts

Every purchase issues a receipt — a verifiable spend history.

In the demo, the floating Agent Wallet shows the live budget, permissions, and purchase rules — and every purchase or block appears in plain language. It's not a payment dashboard; it's how a user governs an autonomous agent's spending.

Real money, on Tempo testnet

This is not a fake payment flow. Every unlock is authorized by a signed voucher and settled for real: each batch posts an on-chain TIP-20 transfer you can open on the explorer.

REAL NETWORK PathUSD · Tempo Moderato · chain 42431
  • Signed session voucher authorizes the spend (off-chain)
  • Batched on-chain TIP-20 transfer settles the money
  • Cryptographic receipt returned with the content
Latest on-chain settlement appears in the dashboard as you use the demo.

This is the entire integration

One script tag and one attribute. No manifest to maintain, no payment code to write.

<script src="https://cdn.yoursite.com/nanorail.js"></script>

<p data-nanorail-price="0.005" data-nanorail-type="text">
  Premium paragraph
</p>

Open the live minimal example ↗ — a complete working integration in one HTML file. Prefer npm? npm i @nanorail/sdk then initNanoRail({ gatewayUrl, articleId }).

One primitive, any paywalled medium

The demo monetizes a research article — but the same attributes meter any paywalled content or media: publishing, video & audio, datasets, APIs, software, education. Agents need one shared way to discover, evaluate, purchase, and access digital resources; NanoRail is that layer. These are patterns you can build on it — illustrative of the surface area, not features shipped in this demo.

NanoRail is open infrastructure

The newsletter in the demo is just an example application. The product is the rail underneath it — and it's open source, built to be forked and extended to any medium.

NanoRail is not
  • an article or newsletter
  • a content app
  • a paywalled-article tool
  • a product we're selling
NanoRail is
  • open source (MIT)
  • an SDK + discovery layer
  • a manifest generator
  • a policy & payment engine
  • a receipt layer + Tempo integration
  • a public primitive — fork & extend it

NanoRail is open source and built to stay that way. The goal isn't to monetize NanoRail — it's to give every publisher and every medium a free, shared primitive for the agent economy. Use it, fork it, extend it to your content type, and contribute back.

A new consumer class is emerging. NanoRail is the open infrastructure publishers use to monetize it — across articles, media, data, APIs, and software alike.