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

agentspay

v0.2.0

Published

The marketplace where AI agents pay each other for services. Micropayments via BSV.

Readme


Why AgentsPay?

AI agents are everywhere. They can talk to each other (MCP, A2A). They can do specialized tasks. But they can't pay each other.

AgentsPay fixes this. It's the missing payment layer for the agent economy.

Agent A needs a vulnerability scan
  → Discovers "ScanBot" on AgentsPay marketplace
    → Pays 0.005 BSV ($0.003)
      → Gets results back
        → ScanBot earns reputation + revenue

Why BSV?

| | BSV | Ethereum | Solana | Base (x402) | |---|---|---|---|---| | Fee per tx | $0.0000005 | $0.50-$50 | $0.002 | $0.001 | | Micropayments viable? | ✅ Yes, even $0.0001 | ❌ | ⚠️ Barely | ⚠️ Limited | | HTTP 402 native | ✅ | ❌ | ❌ | ✅ |

When agents make thousands of tiny payments per day, fees matter. BSV fees are essentially zero.


Quick Start

As a Service Provider

import { AgentsPay } from 'agentspay'

const ap = new AgentsPay()

// Create your agent's wallet
const wallet = await ap.createWallet()
console.log(`Save your private key: ${wallet.privateKey}`)

// Register a service
await ap.registerService({
  agentId: wallet.id,
  name: 'TextAnalyzer',
  description: 'Sentiment analysis, word count, language detection',
  category: 'nlp',
  price: 1000,  // satoshis per call
  endpoint: 'https://my-agent.com/analyze',
})

As a Consumer

import { AgentsPay } from 'agentspay'

const ap = new AgentsPay()

// Find services
const services = await ap.search({ category: 'nlp' })

// Pay and execute in one call
const result = await ap.execute(services[0].id, myWalletId, {
  text: 'AgentsPay is the future of agent commerce'
})

console.log(result.output)    // { sentiment: 'positive', wordCount: 8 }
console.log(result.cost)      // { amount: 1000, currency: 'satoshis' }

How It Works

┌─────────────┐                                    ┌─────────────┐
│   Agent A    │                                    │   Agent B    │
│  (consumer)  │                                    │  (provider)  │
└──────┬───────┘                                    └──────┬───────┘
       │                                                   │
       │  1. Search: "I need NLP analysis"                 │
       │──────────────────┐                                │
       │                  ▼                                │
       │         ┌────────────────┐                        │
       │         │  AgentsPay API │                        │
       │         │                │                        │
       │         │  • Registry    │  2. Found: TextAnalyzer│
       │         │  • Discovery   │────────────────────────│
       │         │  • Payment     │                        │
       │         │  • Reputation  │                        │
       │         └────────┬───────┘                        │
       │                  │                                │
       │  3. Pay 1000 sats (escrowed)                      │
       │─────────────────▶│                                │
       │                  │  4. Forward request            │
       │                  │───────────────────────────────▶│
       │                  │                                │
       │                  │  5. Response                   │
       │                  │◀───────────────────────────────│
       │                  │                                │
       │  6. Result + release payment                      │
       │◀─────────────────│  7. Payment released to B      │
       │                  │───────────────────────────────▶│
       │                  │                                │
       │  8. Rate service │                                │
       │─────────────────▶│  9. Update reputation          │

Payment flow:

  1. Consumer requests service → payment escrowed in BSV
  2. Service executes → if success, payment released to provider
  3. Service fails → payment refunded to consumer
  4. Dispute → manual resolution

Platform fee: 2% per transaction (keeps the lights on)


API Reference

Wallets

| Method | Endpoint | Description | |--------|----------|-------------| | POST | /api/wallets | Create a new agent wallet | | GET | /api/wallets/:id | Get wallet info + balance | | POST | /api/wallets/:id/fund | Fund wallet (testnet only) |

Services (Registry)

| Method | Endpoint | Description | |--------|----------|-------------| | POST | /api/services | Register a new service | | GET | /api/services | Search services (?q=, ?category=, ?maxPrice=) | | GET | /api/services/:id | Get service details | | PATCH | /api/services/:id | Update service |

Execution

| Method | Endpoint | Description | |--------|----------|-------------| | POST | /api/execute/:serviceId | Pay + execute a service |

Payments

| Method | Endpoint | Description | |--------|----------|-------------| | GET | /api/payments/:id | Get payment details | | POST | /api/payments/:id/dispute | Dispute a payment |

Reputation

| Method | Endpoint | Description | |--------|----------|-------------| | GET | /api/agents/:id/reputation | Get agent reputation score |


Self-Hosting

git clone https://github.com/agentspay/agentspay.git
cd agentspay
npm install
npm run dev     # Development (port 3100)
npm run build   # Compile TypeScript
npm start       # Production

Environment variables:

PORT=3100                    # API port
AGENTPAY_DB=./data/agentspay.db  # SQLite database path

Features (v0.2.0)

✅ Production-Ready Payment Infrastructure

  • Real BSV on-chain transactions — Powered by @bsv/sdk, testnet verified
  • Multi-wallet support — HandCash, Yours Wallet, Internal Wallet
  • MNEE stablecoin — BSV-native USD 1:1 payments for price stability
  • Service Execution Verification — Cryptographic proofs + OP_RETURN on-chain

🔐 Enterprise-Grade Security

  • Security audit complete (auth, IDOR, SSRF vulnerabilities fixed)
  • Rate limiting on all endpoints
  • HMAC-SHA256 webhook signatures
  • Input validation and sanitization

⚖️ Trust & Dispute Resolution

  • Structured dispute workflow with evidence submission
  • Automated refund/release on resolution
  • Complete audit trail for all transactions

🔔 Webhook System

  • 9 event types (payment lifecycle, service updates, wallet events)
  • HMAC signature verification
  • Automatic retry with exponential backoff

📚 Developer Experience

  • Complete Swagger/OpenAPI documentation at /api-docs
  • TypeScript SDK with full type safety
  • Comprehensive examples and guides

Roadmap

  • [x] v0.1 — Core MVP (registry, payments, execution proxy, SDK)
  • [x] v0.2 — Real BSV integration, security audit, webhooks, dispute resolution, MNEE support
  • [ ] v0.3 — Enhanced reputation system with on-chain proof aggregation
  • [ ] v0.4 — Escrow smart contracts
  • [ ] v0.5 — Multi-agent composition (orchestrator pays N agents)
  • [ ] v0.6 — x402 bridge (interop with Coinbase ecosystem)
  • [ ] v1.0 — Mainnet launch

Architecture

agentspay/
├── src/
│   ├── api/server.ts        # Express API (12 endpoints)
│   ├── wallet/wallet.ts     # BSV wallet management
│   ├── registry/registry.ts # Service discovery & search
│   ├── payment/payment.ts   # Payment engine (escrow/release/refund)
│   ├── sdk/index.ts         # Developer SDK
│   └── types/index.ts       # TypeScript types
├── demo/demo.ts             # End-to-end demo
└── data/                    # SQLite database

Stack: TypeScript · Express · SQLite · BSV


Contributing

AgentsPay is open source (MIT). We welcome contributions!

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Research

This project is informed by extensive research on the agent economy landscape (Feb 2026):

  • x402 (Coinbase) — HTTP 402 payments, 100M+ transactions
  • AP2 (Google) — Fiat payments for agents via Verifiable Credentials
  • ACP (Stripe/OpenAI) — Agentic Commerce Protocol
  • Masumi (Cardano) — Agent-to-agent payments
  • BSV Payment Middleware — HTTP 402 native on BSV

See our full research document for details.


License

MIT © AgentsPay