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

nexuspay-agentkit

v0.1.0

Published

NexusPay action provider for Coinbase AgentKit — managed USDC wallets, spending policies, and x402 micropayments for AI agents

Readme

nexuspay-agentkit

NexusPay action provider for Coinbase AgentKit. Gives any AgentKit-powered AI agent managed USDC wallets, spending policies, P2P transfers, and x402 micropayments on Base — in one import.

Install

npm install nexuspay-agentkit @coinbase/agentkit

Quick Start

import { AgentKit } from "@coinbase/agentkit";
import { getLangChainTools } from "@coinbase/agentkit-langchain";
import { nexusPayActionProvider } from "nexuspay-agentkit";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { ChatOpenAI } from "@langchain/openai";

const agentKit = await AgentKit.from({
  cdpApiKeyName: process.env.CDP_API_KEY_NAME!,
  cdpApiKeyPrivateKey: process.env.CDP_API_KEY_PRIVATE_KEY!,
  actionProviders: [
    nexusPayActionProvider({
      baseUrl: process.env.NEXUSPAY_URL!,      // your NexusPay deployment
      apiKey: process.env.NEXUSPAY_API_KEY!,   // from NexusPay dashboard → API Keys
    }),
  ],
});

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

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

// The agent can now:
// — check wallet balances
// — send USDC on-chain
// — transfer instantly to other agents
// — pay x402 paywalls automatically
// — audit its own transaction history
// — create and check spending policies

Available Actions

| Action | Description | |---|---| | nexuspay_get_balance | Get USDC balance for an agent wallet | | nexuspay_list_wallets | List all agent wallets and balances | | nexuspay_create_wallet | Create a new CDP-backed agent wallet on Base | | nexuspay_send_payment | Send USDC on-chain to any address | | nexuspay_p2p_transfer | Instant zero-gas transfer between agents | | nexuspay_pay_x402 | Pay an x402 paywall to gain API access | | nexuspay_list_transactions | List recent transactions with filters | | nexuspay_check_policies | Check spending limits for an agent | | nexuspay_create_policy | Set spending limits for an agent wallet |

Example Agent Prompts

Once connected, your agent understands natural language payment instructions:

"Check the balance of agent-researcher before sending the payment"
"Transfer $2.50 to agent-writer for the content it generated"
"Pay the inference API at /api/premium/gpt4 using agent-alpha's wallet"
"Set a $10 daily limit on agent-beta's spending"
"Show me the last 10 transactions from agent-alpha"

Environment Variables

NEXUSPAY_URL=https://your-nexuspay.vercel.app
NEXUSPAY_API_KEY=npk_live_...

# Coinbase CDP (for AgentKit)
CDP_API_KEY_NAME=your-cdp-key-name
CDP_API_KEY_PRIVATE_KEY=your-cdp-private-key

Get a NexusPay API Key

  1. Go to your NexusPay dashboard
  2. Open the API Keys tab
  3. Click Create Key and copy the raw key (shown once)
  4. Set it as NEXUSPAY_API_KEY in your environment

Multi-Agent Example

// Agent A pays Agent B for a completed task
await agent.invoke({
  messages: [{
    role: "user",
    content: `
      Agent B just completed the data analysis task.
      Transfer $5 USDC from agent-orchestrator to agent-analyst as payment.
      Then check agent-orchestrator's remaining balance.
    `,
  }],
});

x402 Micropayments

NexusPay implements the x402 protocol for HTTP pay-per-request. When your agent hits a monetized API and gets an HTTP 402 response, it can pay automatically:

// Agent receives 402 from a paid API
// Calls nexuspay_pay_x402 automatically
// Gets access — no human intervention needed

Links