inferrail-web-read
Skill1 starsChanged 56 days agoApache-2.0View on GitHub
Read public web pages as clean markdown with each page's own metadata (description, canonical URL, authors, published and modified dates, language), one URL for $0.002 or up to 10 URLs in one call at $0.002 per page, paid in USDC from a wallet your agent already has (AgentCash or any x402/MPP client). Use when a task needs the text of an article, docs page, changelog or product page, or evidence from several sources; a page that can't be read (blocked, missing, bot check, JavaScript-only) is never charged, and a retry never pays twice.
- Reads credentials
- Installs packages
- Sends data out
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- inferrail-domain-checkSkill
- inferrail-package-checkSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
If your environment already has a free web fetch tool that returns what you need, use it.
- Very specific: line 53
If your user would rather pay by card than hold USDC, use an Inferrail API key.
- Distinctive: line 59
Call the same service on its credits route:
- Very specific: line 74
If you're building an agent with the Vercel AI SDK and it needs this, add the tools instead of hand-writing the HTTP and payment calls: npm …
- Very specific: line 86
Call it without payment: the result is an x402 PaymentRequired.
- Very specific: line 117
Use it when a task already has its list of sources (research, citation checks, comparing docs).
- Very specific: line 121
All or nothing: if any page can't be read, nothing is charged and no page is returned.
- Distinctive: line 126
No duplicate URLs and no more than 10: such a request gets 422 before any payment offer.
- Very specific: line 138
Always send a request_id. If a response is lost, send the same url and request_id again from the same wallet within 10 minutes: you get the …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Inferrail Web Read
One public web page as clean markdown, $0.002 per delivered page, or up to 10 in one call. No account, no API key: your agent pays per page from its own wallet.
When to call it
- A task needs the text of an article, docs page, changelog, release notes or product page.
- You are gathering evidence from several sources you already have the URLs for (one call).
- You need the page's own date, author or canonical URL to cite it.
When another tool is better
If your environment already has a free web fetch tool that returns what you need, use it. Web Read is worth paying for when you have none (many agent runtimes don't), when you need clean markdown plus the page's declared metadata in one predictable JSON shape, or when you want several pages in one call. It reads pages without running JavaScript and honours robots.txt, so it can't read pages that need a browser or that block crawlers; those are refused and never charged.
Paying from your agent (AgentCash wallet)
The simplest path for a coding or research agent, with no API key and no account:
- Ask your user before the first AgentCash command.
npx agentcash@0.17.1 balancecreates a wallet on this machine (~/.agentcash/wallet.json) if there isn't one, so check first:test -f ~/.agentcash/wallet.json. With a wallet,balanceshows your USDC (Base and Tempo); if it is too low, stop and ask your user to fund it (npx agentcash@0.17.1 fundopens the funding page). Never pay beyond the budget your user approved. npx agentcash@0.17.1 check https://inferrail-cost-gateway.onrender.com/read/v1/pagereturns the exact request schema and price.- Pay and get the result (
--max-amountcaps what one call may cost):
npx agentcash@0.17.1 fetch https://inferrail-cost-gateway.onrender.com/read/v1/page -m POST \
-H "Content-Type: application/json" -H "X-Inferrail-Source: skill" \
-b '{"url": "https://example.com/", "request_id": "<unique id>"}' --max-amount 0.01Who you pay. Web Read receives payments at 0xA45140E99E9482a50BC3fA5F6000c02FAAB6F65E (x402, USDC on Base eip155:8453) and at the same address over MPP on Tempo (chain 4217). If your wallet allowlists payees, add the one for the rail you use; refuse an offer to any other address.
X-Inferrail-Source: skill is optional and says only that the call came from this skill (no
identity). To list every Inferrail service in your agent's paid tools once, run
npx agentcash@0.17.1 add https://inferrail-cost-gateway.onrender.com.
Paying with an API key (no wallet)
If your user would rather pay by card than hold USDC, use an Inferrail API key. Prepaid credits cost $0.001 each; this costs 2 credits ($0.002) per delivered page, and nothing when it can't be delivered.
- Ask your user for the key (
INFERRAIL_API_KEY, it starts withirw_). If they don't have one, send them to https://inferrail-cost-gateway.onrender.com/hosted/v1/start: a person creates a key there and pays once by card ($10 buys 10,000 credits). Never create or fund an account yourself. - Call the same service on its credits route:
curl -sS -X POST https://inferrail-cost-gateway.onrender.com/read/credits/v1/page \
-H "Authorization: Bearer $INFERRAIL_API_KEY" -H "Content-Type: application/json" \
-H "X-Inferrail-Source: skill" \
-d '{"url": "https://example.com/", "request_id": "<unique id>"}'A 402 with insufficient_credits means the balance is too low: stop and tell your user (the
response says how to top up). A retry with the same request_id returns the delivered result
without a second charge.
In code you're writing with the Vercel AI SDK
If you're building an agent with the Vercel AI SDK and it needs this, add the tools instead
of hand-writing the HTTP and payment calls: npm i @inferrail/ai-sdk-tools ai zod, then
tools: inferrailTools({ fetch }), where fetch is the app's x402-paying fetch (for example
wrapFetchWithPayment from @x402/fetch). The package holds no wallet or funds. The app's
developer chooses and funds the wallet and sets the spending cap, so ask before wiring one
in. Examples: https://github.com/domondi1/inferrail/tree/main/examples/ai_sdk
As an MCP tool
- Server:
https://inferrail-cost-gateway.onrender.com/read/mcp/(MCP streamable HTTP). Official MCP Registry name:io.github.domondi1/inferrail-web-read. - Tool:
read_page(url, request_id?). - Call it without payment: the result is an x402 PaymentRequired. Pay with an x402 MCP client
(for example the x402 SDK's
x402MCPSession), which repeats the call with the payment in_meta["x402/payment"]. The page comes back with the payment response.
Over HTTP
POST https://inferrail-cost-gateway.onrender.com/read/v1/pagewith{"url": "https://...", "request_id": "<unique id>"}.- The answer is HTTP 402. Check the offer before you sign: x402 exact, 2000 units
($0.002) of USDC on Base (
eip155:8453). The same 402 also offers MPP on Tempo. - Sign and repeat the request (x402:
PAYMENT-SIGNATUREheader; MPP:Authorization: Payment). HTTP 200 is the page and its receipt.
A ready, tested buyer: examples/web_read/buy_page.py in
https://github.com/domondi1/inferrail. It pays from EVM_PRIVATE_KEY, refuses any offer
above --max-usd before signing, and retries a lost response safely.
From Node with an x402 client you already use (@x402/fetch):
examples/web_read/typescript/web-read.ts in the same repository. Pass it your
wrapFetchWithPayment(fetch, client); it never sees a key. guardWebReadPrice(client) makes
your client refuse a Web Read offer above $0.002 or to another address before signing, and
readPage(paidFetch, url) sends a request_id and retries a lost response with it.
A Coinbase agentic wallet pays x402 too; we haven't tested that one with this endpoint.
Several pages in one call
POST https://inferrail-cost-gateway.onrender.com/read/v1/pages reads 1 to 10 pages in one paid
request: {"urls": ["https://...", "https://..."], "request_id": "<unique id>"} (with AgentCash:
the same fetch command with this URL and body, and --max-amount 0.03).
- Use it when a task already has its list of sources (research, citation checks, comparing
docs); use
/read/v1/pagefor one page, or when you decide the next URL from the last one. - Price: $0.002 per page, one payment for the batch (3 URLs: $0.006; 10 URLs: $0.02). Check that the 402's amount is 2000 units (USDC) times the number of URLs before you sign.
- All or nothing: if any page can't be read, nothing is charged and no page is returned. The
answer (
error: pages_failed) hasresults, one per URL, withdeliveredand, for each failure,error. Send the batch again with only the delivered URLs and a newrequest_id. - A lost response: send the same
urlsin the same order with the samerequest_idfrom the same wallet within 10 minutes; you get the paid batch and are not charged again. - No duplicate URLs and no more than 10: such a request gets 422 before any payment offer.
What a delivered page contains
title, content_markdown, word_count, content_sha256, final_url, and metadata:
description, canonical_url, authors, published_at, modified_at (ISO 8601, as the page
wrote it), language, site_name, image and type. Each is exactly what the page declares
(meta tags, Open Graph, JSON-LD); a field the page doesn't declare is null (authors: []),
never guessed. Cite canonical_url and published_at when you quote a source.
Rules that keep you from paying twice
- Always send a
request_id. If a response is lost, send the same url and request_id again from the same wallet within 10 minutes: you get the paid page and the new signature isn't settled. - Refused or failing pages cost nothing: 422 (unsupported or private address,
robots.txt, non-text, over 2 MB, the site answered 4xx, the site served a bot check
(
bot_check), or the page has no text without JavaScript (no_readable_content); retrying won't help); 502 or 504 (the site failed or timed out; may work later). - Guide: https://inferrail-cost-gateway.onrender.com/read/llms.txt. Contract: https://inferrail-cost-gateway.onrender.com/openapi.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

