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

@krewe/langchain

v0.1.0

Published

LangChain.js bindings for the krewe pay-per-call AI inference network. Exposes Embeddings, an LLM, and Tools backed by /v2/predict on Base. Settles each call in USDC via x402 — no API keys.

Readme

@krewe/langchain

LangChain.js bindings for the krewe pay-per-call AI inference network on Base. Adds an Embeddings class, an LLM class, and three Tool instances backed by the krewe network's /v2/predict endpoint. Every call is paid in USDC via x402 (EIP-3009) — no API keys, no signup.

Status: v0.1.0 — first cut. SDK paths exercised against the live network; the LangChain class surface has not yet been validated inside a complete LangGraph or AgentExecutor flow. If you dogfood and hit issues, open an issue.

Install

pnpm add @krewe/langchain @langchain/core

Embeddings

import { KreweEmbeddings } from "@krewe/langchain";

const embeddings = new KreweEmbeddings({
  privateKey: process.env.AGENT_KEY as `0x${string}`,  // Base wallet w/ USDC
});

const vec  = await embeddings.embedQuery("krewe is a decentralized inference network");
const vecs = await embeddings.embedDocuments(["doc1 text", "doc2 text", "doc3 text"]);

Cost: $0.01 USDC per embedding. Model: Xenova/all-MiniLM-L6-v2, 384-dim.

LLM (verified completion)

import { KreweLLM } from "@krewe/langchain";

const llm = new KreweLLM({
  privateKey: process.env.AGENT_KEY as `0x${string}`,
  maxTokens:  128,
  stop:       ["\n###"],
});

const text = await llm.invoke("Summarize: krewe is a decentralized AI network on Base.");
// → "krewe is a network that runs AI tasks across independent nodes..."

Cost: $0.05 USDC per call. The completion is byte-equal-consensus across 3 miner nodes (deliberate non-streaming).

Tools (for AgentExecutor / LangGraph)

import { createKreweTools } from "@krewe/langchain";
import { AgentExecutor, createReactAgent } from "langchain/agents";
import { ChatOpenAI } from "@langchain/openai";

const tools = createKreweTools({ privateKey: process.env.AGENT_KEY as `0x${string}` });

const agent = createReactAgent({
  llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
  tools: [tools.extractEntities, tools.scrapeUrl, tools.complete],
});

const exec = new AgentExecutor({ agent, tools: [tools.extractEntities, tools.scrapeUrl, tools.complete] });
const result = await exec.invoke({
  input: "Pull every email from this page: https://www.krewe.world/build",
});

Three tools available:

| Tool | Cost | Description | |----------------------------|----------|------------------------------------------------| | krewe_extract_entities | $0.005 | Emails / URLs / dates / numbers / phones | | krewe_scrape_url | $0.020 | Fetch + clean a URL | | krewe_complete | $0.050 | Verified SLM completion (LaMini-GPT-124M) |

Why this might be useful

  • No API key dance. The agent's wallet is the auth. Drops into existing on-chain agents with zero plumbing.
  • Per-call on-chain settlement. Every call leaves a Basescan tx hash you can audit.
  • Verifiable inference (for KreweLLM). Three independent miners must produce byte-identical output before the call settles — useful when a single LLM provider shouldn't be a single point of trust.

Links

  • Source (MIT): https://github.com/krewe-AI/krewe/tree/main/clients/langchain
  • Build docs (Eliza / LangChain / CrewAI): https://www.krewe.world/build
  • npm SDK: @krewe/x402-client

License

MIT.