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

@skein-js/langsmith

v0.13.1

Published

LangSmith tracing for skein-js — run identity and thread grouping on every graph call.

Readme

@skein-js/langsmith

npm downloads license

LangSmith tracing for skein-js — run identity and thread grouping on every graph call.

Part of skein-js — the open-source alternative to LangGraph Platform for TypeScript: a self-hosted Agent Protocol server for LangGraph.js, and a drop-in replacement for the LangGraph CLI.

What's here

LangSmith's tracer already instruments everything inside your graph — every LLM call, tool, and chain. What it can't know on its own is what a "run" is on your server, so without help every run lands in LangSmith as an anonymous root trace: no thread, no assistant, no user.

This package supplies that identity. Above all it sets session_id, the key LangSmith's Threads view groups on — so a conversation reads as one thread in LangSmith exactly as it does through the Agent Protocol.

It deliberately does not attach a tracer of its own. @langchain/core already installs a global tracer when LANGSMITH_TRACING is on; adding a second would send every span twice — you'd pay double and couldn't trust the numbers. Instead this sink makes sure that one tracer is switched on and properly configured, then enriches what it sends.

Install

pnpm add @skein-js/langsmith langsmith

langsmith and @langchain/core are optional peers — @langchain/core you already have via LangGraph.

Usage

Set LANGSMITH_API_KEY and you're done — the sink reads it, switches tracing on, and enriches every run:

import { createLangSmithTelemetry } from "@skein-js/langsmith";
import { embedInMemoryGraphs } from "@skein-js/server-kit";
import { createExpressServer } from "@skein-js/express";

const telemetry = createLangSmithTelemetry();
const server = await createExpressServer({
  deps: embedInMemoryGraphs({ agent }, { overrides: telemetry ? { telemetry } : {} }),
});

createLangSmithTelemetry() returns undefined when LangSmith isn't configured, so the ternary above is the whole "is it enabled" story.

Using the CLI? Don't write any of this — declare it in langgraph.json and skein dev / skein start wire it up:

{ "telemetry": { "langsmith": true } }

With LANGSMITH_API_KEY set, even that is optional: the adapter is auto-detected. See docs/observability.md.

What lands in LangSmith

| Where | What | | ---------- | ------------------------------------------------------------------------------------ | | metadata | session_id (= thread id), run_id, thread_id, assistant_id, graph_id | | metadata | ls_user_id when auth is configured, skein_trigger (wait/stream/background) | | tags | skein, graph:<id>, trigger:<how>, assistant:<id> | | Run name | the graph id |

API

  • createLangSmithTelemetry(options?): TelemetrySink | undefined — returns undefined when LangSmith is not configured (no API key and no explicit projectName), so the result can be passed straight through.
    • apiKey — defaults to LANGSMITH_API_KEY / LANGCHAIN_API_KEY
    • projectName — defaults to LANGSMITH_PROJECT / LANGCHAIN_PROJECT
    • endpoint — defaults to LANGSMITH_ENDPOINT, for self-hosted LangSmith
    • enableTracing — whether to switch the global tracer on when it isn't already (default true). Existing environment values are never overwritten, so a deliberate LANGSMITH_TRACING=false is respected.
    • env — the environment to read and write; defaults to process.env.

Learn more

License

Apache-2.0