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

@pathcourse/langchain

v0.1.2

Published

LangChain.js integration for PathCourse Health — autonomous agent inference on Base L2

Readme

@pathcourse/langchain

LangChain.js integration for PathCourse Health. Autonomous agent inference with USDC billing on Base L2 — no accounts, no credit cards, no KYC.

Install

npm install @pathcourse/langchain

Quick Start

import { ChatPathCourse } from "@pathcourse/langchain";
import { ChatPromptTemplate } from "@langchain/core/prompts";

const llm = new ChatPathCourse({ model: "pch-fast" });   // set PCH_API_KEY env var

const prompt = ChatPromptTemplate.fromTemplate("Explain {topic} in one paragraph.");
const chain = prompt.pipe(llm);
const result = await chain.invoke({ topic: "autonomous agent billing" });
console.log(result.content);

Drop-in replacement for ChatOpenAI

// Before
import { ChatOpenAI } from "@langchain/openai";
const llm = new ChatOpenAI({ model: "gpt-4o-mini" });

// After
import { ChatPathCourse } from "@pathcourse/langchain";
const llm = new ChatPathCourse({ model: "pch-fast" });

Every LangChain chain, agent, tool, and memory module keeps working unchanged.

Embeddings

import { PathCourseEmbeddings } from "@pathcourse/langchain";
import { MemoryVectorStore } from "langchain/vectorstores/memory";

const embeddings = new PathCourseEmbeddings();
const store = await MemoryVectorStore.fromTexts(
  ["hello world", "goodbye world"],
  [{}, {}],
  embeddings,
);
const results = await store.similaritySearch("greeting");

Models

| Model | Rate | Min tier | Notes | |---|---|---|---| | pch-fast | $0.44 / M tokens | uncertified | Fast reasoning, classification, routing | | pch-coder | $3.50 / M tokens | uncertified | Code generation, debugging | | pch-embed | $0.015 / M tokens | uncertified | Text embeddings for semantic search / RAG | | pch-translate | $0.08 / M chars | uncertified | Multilingual translation | | pch-pro | $1.96 / M tokens | bronze | Deep reasoning, multi-step planning | | pch-audio | $1.85 / M chars | bronze | Text-to-speech, standard quality | | pch-documents | $0.26 in / $1.48 out per M tokens | bronze | Document parsing / OCR | | pch-transcribe | $0.0008 / minute | bronze | Speech-to-text | | pch-extract | $0.012 / M tokens | bronze | Structured data extraction | | pch-rerank | $0.025 / M tokens | bronze | Reranking for RAG pipelines | | pch-image | $0.028 / image | silver | Text-to-image | | pch-audio-premium | $37.00 / M chars | silver | Text-to-speech, premium quality | | pch-talk | $0.001 / minute | silver | Voice conversation | | claude-haiku | Common rate | silver | Anthropic Claude Haiku | | claude-sonnet | Common rate | gold | Anthropic Claude Sonnet |

The full list above shows what's reachable through the gateway. ChatPathCourse and PathCourseEmbeddings only operate on chat-completion and embedding shapes — for image, audio, transcription, etc., use the PCH JS SDK directly.

Choosing a chat model:

  • Fast response, simple task → pch-fast
  • Complex reasoning, multi-step → pch-pro
  • Writing or reviewing code → pch-coder
  • Long context or premium reasoning → claude-sonnet (Gold tier)

Authentication

Set PCH_API_KEY in your environment, or pass pchApiKey to the constructor.

export PCH_API_KEY=pch_prod_b_...

Developer access — $5 USDC. Send $5+ USDC on Base (chain ID 8453) to the PCH treasury wallet, then call claimKey({ txHash, wallet }) to retrieve your key. No accounts, no credit card, no KYC. $5 buys thousands of pch-fast calls — enough to verify any integration. Top up to $25 lifetime and your account auto-upgrades to Uncertified with pch-coder access. Treasury address: see payment.treasury_wallet in /.well-known/agent.json.

Links

License

MIT