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

pandaprobe

v0.4.1

Published

TypeScript SDK for PandaProbe — open source agent engineering platform

Downloads

15

Readme

PandaProbe TypeScript SDK

TypeScript/JavaScript SDK for PandaProbe — an open-source agent engineering platform. Mirrors the Python SDK's architecture, trace/span schema, and CHAIN → AGENT → LLM → TOOL normalization, so traces are cross-compatible across languages.

Requires Node.js ≥ 18 (native fetch + AsyncLocalStorage).

Install

npm install pandaprobe
# or: pnpm add pandaprobe

Provider/framework SDKs are optional peer dependencies — install only what you use (e.g. npm install openai, npm install @langchain/langgraph).

Quick start

The SDK auto-initializes from environment variables:

export PANDAPROBE_API_KEY="sk_pp_..."
export PANDAPROBE_PROJECT_NAME="my-project"
export PANDAPROBE_ENDPOINT="http://localhost:8000"   # defaults to https://api.pandaprobe.com

…or call init() explicitly:

import { init } from "pandaprobe";
init({ apiKey: "sk_pp_...", projectName: "my-project" });

Three instrumentation layers

1. Manual instrumentation

Callback wrappers (the analog of Python's with context managers):

import { withTrace, withSpan, SpanKind, flush } from "pandaprobe";

await withTrace("agent", { input: { messages: [{ role: "user", content: "hi" }] } }, async (t) => {
  const answer = await withSpan("llm", { kind: SpanKind.LLM, model: "gpt-4o" }, async (s) => {
    s.setInput({ messages: [{ role: "user", content: "hi" }] });
    const out = { messages: [{ role: "assistant", content: "hello" }] };
    s.setOutput(out);
    return out;
  });
  t.setOutput(answer);
});
await flush();

Or TS class-method decorators (tsconfig needs experimentalDecorators):

import { trace, span, SpanKind } from "pandaprobe";

class Agent {
  @span({ kind: SpanKind.LLM })
  async generate(input: { messages: unknown[] }) { /* ... */ }

  @trace({ name: "agent" })
  async run(input: { messages: unknown[] }) { return this.generate(input); }
}

2. Provider wrappers

Monkey-patch an LLM client to emit LLM spans automatically:

import OpenAI from "openai";
import { wrapOpenAI } from "pandaprobe/wrappers/openai";

const client = wrapOpenAI(new OpenAI());
await client.chat.completions.create({ model: "gpt-4o-mini", messages: [...] });

Available: pandaprobe/wrappers/{openai,anthropic,gemini,bedrock,mistral}.

3. Framework integrations

LangChain family (callback-based):

import { LangGraphCallbackHandler } from "pandaprobe/integrations/langgraph";
await graph.invoke(input, { callbacks: [new LangGraphCallbackHandler()] });

Available: pandaprobe/integrations/{langchain,langgraph,deepagents,claude-agent-sdk,openai-agents,vercel-ai}.

Session / user grouping

import { session, user, setSession } from "pandaprobe";

await session("conv-123", async () => {
  await runAgent(query); // traces inherit session_id
});

Development

make ts-install        # pnpm install — dev tooling only (Biome, tsup, tsx, TypeScript, Vitest)
make ts-typecheck      # tsc --noEmit
make ts-lint           # biome check
make ts-format-check   # biome format (check only)
make ts-test           # vitest run
make ts-test-cov       # vitest run --coverage
make ts-build          # tsup → dist (ESM + CJS + .d.ts)

The base install is deliberately minimal: the build/typecheck/test/lint toolchain is all that's needed to develop the core, and every dev dependency supports Node ≥ 18, so the CI matrix (Node 18/20/22) installs cleanly. Provider/framework SDKs are optional peerDependencies and are installed on demand (below) — several (e.g. @aws-sdk/client-bedrock-runtime, @langchain/*) require Node ≥ 20, so they're kept out of the base install.

Installing provider SDKs and agent frameworks (on demand)

Like the Python SDK's uv sync --extra <name>, the SDKs are installed on demand rather than as part of the base install (also gated by auto-install-peers=false in .npmrc):

make ts-install-base                # LLM provider SDKs + LangChain glue (to run the examples)
make ts-install-langgraph           # @langchain/langgraph + glue
make ts-install-langchain           # langchain + glue
make ts-install-deepagents          # deepagents
make ts-install-claude-agent-sdk    # @anthropic-ai/claude-agent-sdk
make ts-install-openai-agents       # @openai/agents
make ts-install-vercel-ai           # ai + @ai-sdk/openai

Each target adds its packages to devDependencies. Install only what you're working with — unlike Python's shared environment, JS frameworks coexist in nested node_modules without conflicting. To reset to a clean base: git checkout -- package.json pnpm-lock.yaml && make ts-install.

Tests mock HTTP via a fetch stub (the analog of Python's respx) and never hit a real backend.

See also

  • examples/ — runnable end-to-end examples per provider, framework, and manual method.
  • The Python SDK in ../python — the reference implementation this mirrors.