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

langchain-autonomo

v0.1.0

Published

LangChain.js tools for Autonomo: an agent finds the right paid API, sees its price and pays for a call in USDG or $AUTONOMO on Robinhood Chain, within spending caps.

Readme

LangChain.js tools for Autonomo

Give a LangChain.js or LangGraph.js agent Autonomo's paid APIs. The agent finds the right API for its task, checks the price and pays for the call itself, in USDG or $AUTONOMO with x402 on Robinhood Chain. Spending caps are checked before anything is signed.

npm install langchain-autonomo @langchain/core
import { createAgent } from "langchain";
import { AutonomoToolkit } from "langchain-autonomo";

const toolkit = new AutonomoToolkit({ privateKey: process.env.AUTONOMO_WALLET_KEY });
const agent = createAgent({ model: "anthropic:claude-sonnet-5-5", tools: toolkit.getTools() });

await agent.invoke({ messages: [{ role: "user", content: "Is this token safe? 0x86b57bcb9d249cf096cf8e21426c9dc9cafdec49" }] });

The agent searches with autonomo_find_apis, picks Token Risk, pays 0.01 USDG with autonomo_call_api and answers from the report. No code was written for Token Risk; an API listed on Autonomo tomorrow works the same way.

Use a new wallet just for the agent, holding only what it may spend. Most APIs cost 0.01 USDG.

The tools

| Tool | | Pays | | --- | --- | --- | | autonomo_find_apis | The best APIs for a task, or all of them: what each does, its path, price and track record | No | | autonomo_get_price | What one call would cost, and the exact URL | No | | autonomo_call_api | Calls the API, pays for it and returns the answer with a receipt and transaction link | Yes |

Without a wallet key, getTools() gives only the two free tools.

Limits

new AutonomoToolkit({
  privateKey: "0x…",
  limits: {
    perCall: { usdg: "0.05", autonomo: "5000" },   // the most one call may cost (the defaults)
    daily: { usdg: "1", autonomo: "10000" },       // per UTC day, kept in ~/.autonomo/spend.json
  },
  maxCalls: 10,             // paid calls through this toolkit, then it stops (null: no limit)
  maxOutputChars: 20_000,   // longer answers are cut before they reach the model
});

A call over a limit is refused before anything is signed, and the agent is told why, so it can choose a cheaper API or answer with what it has. If an API fails, the payment doesn't settle, so the agent isn't charged.

Gloam, Borro and other options

The toolkit runs on the Autonomo SDK and takes all of its options. To pay privately through Gloam or borrow from a Borro credit line, pass them the same way, or pass a client you made yourself:

const toolkit = new AutonomoToolkit({ privateKey: "0x…", borro: { account: "0xYourCreditLine" }, maxCalls: 5 });

With Gloam set up, the agent can ask for private: true. A private call only ever pays through Gloam, never as a public payment.

Full guide: autonomo.fun/docs/langchain.

Tests

They run offline against a fake Autonomo and pay nothing:

npm install && npm run build && npm test