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

@agentindex/core

v0.1.1

Published

The Layer - One SDK for every x402 endpoint. Discovery, routing, payments, failover.

Readme

@agentindex/core

The Layer — One SDK for every x402 endpoint.

We're Cloudflare for the agent economy.

Install

npm install @agentindex/core

Usage

import { AgentIndexClient } from "@agentindex/core";

const client = new AgentIndexClient({
  privateKey: process.env.WALLET_KEY,
  budgetLimit: 10.00,  // Max $10 spending
});

// That's it. Call ANY x402 endpoint.
const weather = await client.call({
  capability: "weather",
  params: { location: "miami" }
});

const price = await client.call({
  capability: "crypto-price",
  params: { token: "ETH" }
});

const analysis = await client.call({
  capability: "ai-sentiment",
  params: { text: "Bitcoin is mooning!" }
});

What We Handle

| Feature | You Write | We Handle | |---------|-----------|-----------| | Discovery | capability: "weather" | Find best endpoint | | Routing | One line | Route through Layer | | Payment | Nothing | x402 + USDC | | Failover | Nothing | Auto-retry | | Caching | Nothing | Smart cache | | Budget | budgetLimit: 10 | Track spending |

API

new AgentIndexClient(config)

| Option | Type | Default | Description | |--------|------|---------|-------------| | privateKey | string | required | Wallet private key | | budgetLimit | number | 10.00 | Max USD to spend | | chain | string | "base" | Payment chain | | minTier | "A"/"B"/"C" | "C" | Minimum endpoint quality | | maxPricePerCall | number | 1.00 | Max price per call | | caching | boolean | true | Enable response caching | | maxRetries | number | 3 | Failover attempts | | debug | boolean | false | Enable logging |

client.call(options)

const result = await client.call({
  capability: "weather",        // What you need
  params: { location: "miami" }, // Your params
  maxPrice: 0.01,               // Optional: override max price
  noCache: false,               // Optional: skip cache
  timeout: 30000,               // Optional: timeout ms
});

// Result
{
  data: { temperature: 75, ... },
  endpoint: { url: "...", tier: "A", ... },
  pricePaid: 0.005,
  cached: false,
  latencyMs: 234,
  txHash: "0x...",
  budgetRemaining: 9.995
}

client.discover(options)

Find endpoints without calling them:

const endpoints = await client.discover({
  capability: "crypto-price",
  maxPrice: 0.01,
  minTier: "A",
  verifiedOnly: true,
});

client.getBudget()

const budget = client.getBudget();
// { limit: 10, spent: 0.25, remaining: 9.75, callCount: 5, percentUsed: 2.5 }

Why The Layer?

Before: Your bot discovers endpoint → calls endpoint directly → pays endpoint

After: Your bot uses our SDK → we discover, route, pay, cache, failover → you get data

For Bots

  • One line of code, any x402 endpoint
  • Automatic discovery, payment, failover
  • Budget controls, caching, smart routing
  • We handle the complexity

For Endpoints

  • All traffic routes through us
  • Get verified for more traffic
  • Analytics on who's calling you
  • Premium placement available

Links

  • Agent Index: https://theagentindex.app
  • x402 Protocol: https://x402.org
  • GitHub: https://github.com/CIII-glitch/agentindex-core

License

MIT