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

@indexfy/agentkit

v0.1.1

Published

Coinbase AgentKit action provider for Indexfy crypto indexes on Base

Readme

@indexfy/agentkit

A Coinbase AgentKit action provider for Indexfy crypto indexes on Base. Agents can research index tokens, then buy them with USDC and sell them back for USDC.

Each Indexfy index is an ERC-20 fully backed by a basket of tokens. For example, I5 is BTC 30%, ETH 30%, XRP 18%, SOL 14% and BNB 8%. A buy is one transaction that buys every basket token and mints index shares at basket value. A sell redeems the shares and sells the basket for USDC. Both revert below a quoted minimum.

Install

npm install @indexfy/agentkit @coinbase/agentkit

Use

import { AgentKit } from "@coinbase/agentkit";
import { indexfyActionProvider } from "@indexfy/agentkit";

const agentkit = await AgentKit.from({
  walletProvider, // any EvmWalletProvider on base-mainnet
  actionProviders: [indexfyActionProvider() /* , ...others */],
});

Then ask the agent something like "What's in the I5 index?", "Buy $25 of I5" or "Sell all my I5".

Actions

| Action | What it does | |---|---| | list_indexes | Indexes with price, TVL, 24h/7d performance and fees | | get_index | One index's mandate and holdings, by address or ticker (e.g. I5) | | get_portfolio | A wallet's index positions, value, P&L and points (defaults to the agent's wallet) | | buy_index | Buy an index with up to usdcAmount USDC; unspent USDC is refunded | | sell_index | Sell shares (or "all") for USDC |

Network: Base mainnet only. The wallet needs USDC on Base and a little ETH for gas.

How transactions are made

  1. The provider asks the public Indexfy API (https://api.indexfy.xyz/mcp, no API key) to build the trade for the agent's wallet. The API returns unsigned calls (an approval if needed, then the trade) and a simulation of them at the latest block.
  2. Before signing, the provider checks that:
    • the calls are for Base and for this wallet;
    • every call targets an allowed contract: Base USDC, the IndexfyZapper (0x44154FC4297823e39553649fea8cC6ce2517d7D4) or the index token itself;
    • the simulation didn't revert.
  3. The agent's own wallet signs and sends each call, waiting for each to confirm before the next.

The API never holds keys or sends transactions. Swap routes inside a buy or sell go stale within a few minutes, so the provider builds right before sending. If a trade reverts, call it again to rebuild.

Options

indexfyActionProvider({
  apiUrl: "https://api.indexfy.xyz/mcp", // default
  allowedTargets: [/* overrides the USDC + zapper allow-list */],
});

Develop

npm install
npm test        # jest, mocked API and wallet
npm run build   # → dist/

test/agentkitShim.js exists only for Jest. AgentKit's package root loads every built-in provider, and some of their dependencies are ESM-only, which Jest can't load. The shim loads just the base class, the decorator and the wallet providers from the same install.

License

MIT