npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

agentkit-plugin-x402-scraper

v1.4.1

Published

Autonomous HTTP 402 Web Scraper, Edge Llama-3 Digest, Security Audit & Twitter Intelligence Action Provider for Coinbase AgentKit on Base L2

Readme

agentkit-plugin-x402-scraper

npm version License: MIT Network: Base Currency: USDC

Autonomous HTTP 402 Web Scraper, Edge Llama-3 Digest, Security Audit & Twitter Intelligence Action Provider for Coinbase AgentKit on Base L2.

Equip your on-chain autonomous AI agents with the ability to scrape web pages into clean Markdown, synthesize executive digests, conduct security audits, search the live web, and extract real-time Twitter/X sentiment—all settled autonomously via micropayments in Base USDC.


⚡ Features

  • 🆓 2-Call Free Trial Tier: Every action includes 2 complimentary test calls with zero payment setup required.
  • ⚡ Dual-Rail Autonomous Settlement:
    • Rail A (Primary): Gasless EIP-712 TransferWithAuthorization signature via PayAI facilitator (zero ETH gas required from agent wallet).
    • Rail B (Fallback): Direct on-chain ERC-20 USDC transfer receipt (X-Payment-Receipt).
  • 🤖 Native Coinbase AgentKit Action Provider: Fully conforms to the Coinbase AgentKit Action Provider specification (getActions, supportsNetwork).
  • 🔗 Full Agent Framework Support: Drop-in compatible with LangChain, LlamaIndex, and Vercel AI SDK through AgentKit adapters.
  • 🚫 Zero API Keys: No monthly SaaS subscriptions, credit cards, or centralized rate limits.

📦 Installation

npm install agentkit-plugin-x402-scraper @coinbase/agentkit zod

🚀 Quick Start

1. Basic AgentKit Usage

import { AgentKit, EvmWalletProvider } from "@coinbase/agentkit";
import { x402ScraperActionProvider } from "agentkit-plugin-x402-scraper";

// Initialize your Base EVM wallet provider
const walletProvider = new EvmWalletProvider({
  privateKey: process.env.BASE_PRIVATE_KEY
});

// Initialize AgentKit with the x402 Scraper Action Provider
const agentKit = await AgentKit.from({
  walletProvider,
  actionProviders: [
    x402ScraperActionProvider()
  ]
});

// Tools are now available to your agent!
const actions = agentKit.getActions();
console.log(`Loaded ${actions.length} tools for autonomous execution.`);

2. With LangChain (@coinbase/agentkit-langchain)

import { AgentKit, EvmWalletProvider } from "@coinbase/agentkit";
import { getLangChainTools } from "@coinbase/agentkit-langchain";
import { x402ScraperActionProvider } from "agentkit-plugin-x402-scraper";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { ChatOpenAI } from "@langchain/openai";

const walletProvider = new EvmWalletProvider({
  privateKey: process.env.BASE_PRIVATE_KEY
});

const agentKit = await AgentKit.from({
  walletProvider,
  actionProviders: [x402ScraperActionProvider()]
});

const tools = await getLangChainTools(agentKit);
const llm = new ChatOpenAI({ model: "gpt-4o" });

const agent = createReactAgent({
  llm,
  tools
});

const response = await agent.invoke({
  messages: [{ role: "user", content: "Scrape https://base.org and summarize its mission." }]
});

console.log(response.messages[response.messages.length - 1].content);

🛠️ Available Actions (6 Tools)

| Action Name | Description | Base Pricing (USDC) | |---|---|---| | scrape_webpage | Scrapes any public webpage and extracts clean, token-efficient Markdown for LLM prompts. | $0.005 (5,000 units) | | digest_webpage | Extracts executive summaries, key takeaways, and structured entities via Edge Llama-3. | $0.025 (25,000 units) | | audit_webpage | Audits website security, phishing risks, credibility signals, and smart contract signals. | $0.080 (80,000 units) | | search_web | Searches the live web across multiple engines and extracts synthesized clean Markdown. | $0.050 (50,000 units) | | search_twitter | Searches Twitter/X for keywords, cashtags (e.g. $BASE), sentiment, and recent tweets. | $0.050 (50,000 units) | | get_twitter_profile | Fetches a Twitter/X user profile bio, followers count, verification, and recent timeline. | $0.030 (30,000 units) |

All actions include 2 free trial requests before HTTP 402 micro-settlement is enforced.


⚙️ Configuration Options

You can customize the endpoint and treasury address by passing an optional configuration object:

import { x402ScraperActionProvider } from "agentkit-plugin-x402-scraper";

const provider = x402ScraperActionProvider({
  workerUrl: "https://x402-scraper-engine.gejoe-tt.workers.dev", // Default Cloudflare Worker URL
  treasuryAddress: "0x4107f297256E00F32873f45F50A35a902c1c2034" // Default Base L2 USDC treasury
});

💳 Settlement Protocol Details

When the 2 free trial calls expire, the engine returns HTTP 402 Payment Required along with standard PAYMENT-REQUIRED (x402 v2 Bazaar extension) headers:

  • Network: eip155:8453 (Base Mainnet)
  • Token Contract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC)
  • Primary Settlement: EIP-712 TransferWithAuthorization signed by the agent's wallet and submitted in the PAYMENT-SIGNATURE header. Settle gaslessly via the PayAI facilitator on Base.
  • Fallback Settlement: On-chain ERC-20 transfer() transaction hash submitted in the X-Payment-Receipt header.

📄 License

MIT License. Developed by ASOT Marketing and Investment ([email protected]).