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

@starrohan/agentpay

v1.6.2

Published

Autonomous agent wallets with built-in spending policies for Ethereum

Readme


AI agents can think, reason, and act. But they can't pay for anything. Until now.

AgentPay gives any AI agent a crypto wallet with built-in spending guardrails — in 3 lines of code.


⚡ Quick Start

npx agentpay
import { AgentWallet, policy } from "@starrohan/agentpay";

const agent = new AgentWallet({
  privateKey: process.env.AGENT_PRIVATE_KEY,
  agentId: "my-agent",
  policy: policy()
    .maxTx(0.001)       // Max per transaction
    .dailyLimit(0.01)   // Max per day
    .build()
});

await agent.init();

// Check balance
console.log(await agent.balance()); // "0.05 ETH"

// Make a payment
await agent.pay({
  to: "0xRECIPIENT",
  amount: 0.00001,
  memo: "API request"
});

// View history
await agent.summary();

🎯 Why AgentPay?

| | AgentPay | Stripe Agent SDK | Traditional | |---|---|---|---| | Fees | ~$0.001 (Base L2) | 2.9% + $0.30 | 3-5% | | Settlement | Sub-second | 2-7 days | 1-5 days | | Global | ✅ No borders | ❌ Country restricted | ❌ Country restricted | | Programmable | ✅ Smart contracts | ❌ | ❌ | | Non-custodial | ✅ Agent owns keys | ❌ | ❌ | | Open Source | ✅ MIT | ❌ | ❌ |


📦 Features

  • 💳 Non-Custodial Wallets — Agent-owned keys. Optional Safe Smart Accounts.
  • 🛡️ Spending Guardrails — Max per tx, daily limits, recipient allowlists.
  • 📋 Transaction History — Every payment logged. Survives restarts.
  • 📊 Multi-Asset — ETH + USDC on Base. More chains coming.
  • 🔌 Framework Agnostic — LangChain, CrewAI, AutoGen, MCP.
  • Base L2 — Near-zero fees. Sub-second finality.
  • 🏭 Production Ready — Circuit breakers, rate limiters, Redis/Postgres, Prometheus.

🤖 Works With Everything

Claude Desktop (MCP)

{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": ["-y", "@starrohan/agentpay", "mcp"],
      "env": {
        "AGENT_PRIVATE_KEY": "0xYOUR_KEY",
        "RPC_URL": "https://sepolia.base.org"
      }
    }
  }
}

Restart Claude. Ask: "What's my wallet balance?"

LangChain

import { AgentPayTool } from "@starrohan/agentpay/langchain";
const tools = [new AgentPayTool({ wallet: agent })];

CrewAI

import { createAgentPayTools } from "@starrohan/agentpay/crewai";
const tools = createAgentPayTools({ wallet: agent });

AutoGen

import { registerAgentPay } from "@starrohan/agentpay/autogen";
registerAgentPay({ wallet: agent });

🏗 Architecture

┌──────────────────────────────────────────┐
│              Your AI Agent                │
│   (LangChain / CrewAI / Claude / MCP)    │
└────────────────┬─────────────────────────┘
                 │
┌────────────────▼─────────────────────────┐
│            AgentPay SDK                   │
│  ┌──────────┐ ┌────────┐ ┌───────────┐  │
│  │  Wallet  │ │ Policy │ │  History  │  │
│  │  Manager │ │ Engine │ │  Ledger   │  │
│  └──────────┘ └────────┘ └───────────┘  │
│  ┌──────────┐ ┌────────┐ ┌───────────┐  │
│  │  Smart   │ │Circuit │ │   Rate    │  │
│  │ Accounts │ │Breaker │ │  Limiter  │  │
│  └──────────┘ └────────┘ └───────────┘  │
└────────────────┬─────────────────────────┘
                 │
┌────────────────▼─────────────────────────┐
│              Base L2                      │
│     Near-zero fees · Sub-second · Global  │
└──────────────────────────────────────────┘

🛠 Configuration

| Variable | Description | Default | |----------|-------------|---------| | AGENT_PRIVATE_KEY | Hex-encoded private key (0x...) | Required | | RPC_URL | Base or Base Sepolia RPC | https://sepolia.base.org | | USE_SMART_ACCOUNT | Enable Safe Smart Accounts | false | | BUNDLER_URL | ERC-4337 Bundler (for smart accounts) | — | | AGENTPAY_ENABLE_PAYMENTS | Enable MCP payment execution | false | | AGENTPAY_ALLOWED_RECIPIENTS | Address allowlist (comma-separated) | — |


🌟 Built With AgentPay

| Project | Description | |---------|-------------| | Self-Sustaining Researcher | Agent pays for its own OpenAI API usage | | LangChain Wallet Agent | Autonomous agent with payment skills |

Built something? Submit a PR to add it here!


🤝 Contributing

PRs welcome! See CONTRIBUTING.md for guidelines. Good first issues are tagged.


🛡️ Security

Report vulnerabilities via SECURITY.md. Audit: pending (Trail of Bits).


📄 License

MIT © starrohan · @Rohan_busarla