慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
吾之AI代理今可借x402以每刮取0.001元之价行事——无需API密钥
HSH Intellig · 2026-05-24 · via DEV Community

今人工智能之使,欲呼API,辄逢阻。欲签名,得钥。理更迭,遇限额。付订阅,不副实用。

是模建为俦人点览仪表者。不契使令。

吾辈方将之。代理刮取 — 付费致电式网络抓取API,供AI代理人使用,以x402支付协议为基。每致电计费,Base主网每请求计美刀零点零零一。无需注册,亦无API密钥。代理人按请求付费,得数据。

此篇论x402之运作,吾辈所建,及如何即时将AgentScrape接入汝之代理人。


AI代理人用API密钥之弊

API密钥之设,适于静世:一开发者,一产品,一账单。而代理则破此三则。

一LangChain代理,于一事中或调用三十异API。每API欲其独钥,其独认证,其独订阅阶。开发者须预知代理所需API,各处注册,并设轮换之理。

其果也,胶粘之码如山,无益于使臣之务。尤甚者,使臣永不能呼开发者未预为之之API。

使臣所欲者,乃一规约,可察服务,观其价,偿其所需之呼,遂去。无帐户,无钥,无盟约。

是规约存焉。名曰x402


《x402六十秒之内之运作》

x402乃基于HTTP之402状态码(此乃自1997年即保留之"要求付款"之码,然鲜少使用)所建之支付协议。

其流程若此:

  1. 代理呼API。 无认证。
  2. API以HTTP 402应之。体含价格(0.001元),网络(Base主网),受款钱包地址,及资产(USDC)。
  3. 代理人签署USDC转账授权以 EIP-3009(无燃料、链下签名)之法。
  4. 代理重试致电持签支付之负载于X-PAYMENT首部。
  5. API藉助中介服务以验支付者,既定于链上矣。
  6. API乃返其数据。

居间者总揽链上诸务。API之服务器,无须RPC节点,亦无须热钱包或交易签名。代理者,唯需自托管之钱包,别无他需。

Coinbase操持生产x402之居间者。api.cdp.coinbase.com/platform/v2/x402彼等于主网之Base,不收中介之费,惟取网之虚耗,此费彼自资之。


吾所建者:AgentScrape v0.6.0

AgentScrape以HTTP REST API及MCP(模型语境协议)之服务器,显六有偿之器:

  • scrape_webpage — 洁HTML/Markdown/文/JSON之提取
  • extract_structured_data — 以Groq+Llama,依式定之JSON之提取
  • screenshot_webpage — 全页PNG截屏,具视口操控
  • extract_metadata — Open Graph,Twitter卡片,JSON-LD解析
  • create_browser_session — 持久浏览器上下文,应多步流程
  • run_workflow — 合成多步操作,一呼即办

每工具每呼收费千分之一。每钱包首十呼供免费评估.

堆栈

通体运行于 Cloudflare Workers 之上:

  • 运行时: Cloudflare Workers (V8 isolate, global edge deployment)
  • 浏览器: Cloudflare Browser Rendering (managed headless Chrome)
  • HTTP 框架: Hono v4 配 @x402/hono v2 支付中间件
  • MCP 传输: agents/mcp +agents/x402 自 Cloudflare 代理開發套件
  • 之助: Coinbase CDP 於api.cdp.coinbase.com/platform/v2/x402
  • 之認證: Ed25519 JWT 簽名,以jose(透過 Web Crypto API 兼容工作者)
  • 人工智能提取: Groq 推論,以 Llama 4 Scout (17B)

此工者,约千行 TypeScript 之文。全量部署包:548 KB,经 gzip 压缩。冷启动:72毫秒。


立试之

以为 Claude 桌面、Cursor 或任何 MCP 客户端之 MCP 服务器

一令安装于 Smithery:

npx -y @smithery/cli install hshintelligence/agentscrape --client claude

进入全屏模式 退出全屏模式

此录六项付费工具,可由代理直唤。代理自动处理支付,经 Cloudflare 之agents/x402客户端封装——汝永不见钥之提示。

为直 HTTP API

# 1. Request — get a 402 with payment requirements
curl -X POST https://agent-scrape.healingsunhaven.workers.dev/scrape \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","format":"markdown"}'

# Response:
# HTTP/2 402
# payment-required: <base64-encoded x402 v2 PaymentRequired>

入全景模式 出全景模式

payment-required 之头解,得全x402 v2之支付要件:式,络,额,USDC资财地址,付予之囊,及超时。

诸客用@x402/fetch 或x402合式之裹,则签支付,自复。再呼,返刮取之数。

付之无级

若欲试刮取而无钱包之设,HTTP API 每钱包三十日得十次免费调用。设一x402-payer之标头,以任一标识:

curl -X POST https://agent-scrape.healingsunhaven.workers.dev/scrape \
  -H "Content-Type: application/json" \
  -H "x402-payer: my-test-id" \
  -d '{"url":"https://news.ycombinator.com"}'

入全屏模式 出全屏模式


所学于此运之

建之数则,或可省他队之时:

CDP之促进URL为api.cdp.coinbase.com/platform/v2/x402x402.org/facilitator也.x402.org之促进者,惟试网可用(Base Sepolia,Solana Devnet耳)。欲于Base主网得真金,须用CDP端点,并配CDP API密钥.

认证者,用Ed25519 JWT,非API密钥之头衔.每求验证或结算,必需新签之JWT,其权责有iss: "cdp"sub: <keyId>aud: ["cdp_service"]uri: "<METHOD> api.cdp.coinbase.com<path>",且有效期为120秒。

CDP所赐,乃88字符之Base64密钥,非PKCS#8 PEM格式。jose之库,需PKCS#8。转换之法甚简:取解码密钥之首32字节,前置Ed25519之PKCS#8 ASN.1前缀(302e020100300506032b657004220420),裹以PEM首尾。

agents/x402@x402/core之包,同源共流。FacilitatorConfig 介面. 君但作一createAuthHeaders 回應之符,而傳之於 HTTP 之中介.HTTPFacilitatorClient,及 MCP 之層.withX402

科因貿易市 (其正式 x402 發現目錄) 自動索引之。 無論 PR,無論表單,無論宣言之檔。但增bazaarResourceServerExtensiondeclareDiscoveryExtension() 路每计,成一事于 CDP,则其服显于 api.cdp.coinbase.com/platform/v2/x402/discovery/resources 之内十刻。


代理之器所往何之

今,诸器皆平价,每四十八时市验计一钱。既得结算之数,则价移为层级之制,以应实算之费每事。

吾辈亦治二邻品:AgentParse(PDF/OCR析取)与AgentSearch(网际+arXiv+GitHub联搜)。三者共享x402支付之面,故采一者,他二者得之无费.

尔若构代理而欲避API键粘合之码,可试AgentScrape。标此库,经Smithery安装,或直呼HTTP端点。反馈与报错皆可。

链接: