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

@agentskit/observability-langfuse

v0.2.3

Published

Langfuse tracing adapter for AgentsKit. Spans for plan, tool, model, and HITL gates with token/cost/latency capture.

Readme

@agentskit/observability-langfuse

stability

Langfuse tracing adapter for AgentsKit. Emits one trace per agent run with nested spans for plan, tool calls, model generations, memory IO, and HITL gates. Token, cost, and latency metadata flow into the standard Langfuse usage and metadata fields.

Install

npm install @agentskit/observability-langfuse langfuse

langfuse is loaded lazily — install it alongside this adapter.

Usage

import { runAgent } from '@agentskit/runtime'
import { langfuse } from '@agentskit/observability-langfuse'

const observer = langfuse({
  publicKey: process.env.LANGFUSE_PUBLIC_KEY!,
  secretKey: process.env.LANGFUSE_SECRET_KEY!,
  baseUrl: process.env.LANGFUSE_HOST,
  sessionId: 'demo-session',
  tags: ['agentskit', 'showcase'],
})

await runAgent({
  /* ...agent config... */
  observers: [observer],
})

If publicKey / secretKey / baseUrl are omitted, the adapter falls back to LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and LANGFUSE_HOST.

Span model

| AgentsKit event | Langfuse object | Notes | |---|---|---| | agent:step | span | Top-level loop step (plan / act / observe). | | llm:start / llm:end | generation | Captures model, input message count, output content (truncated), and token usage. | | tool:start / tool:end | span | Captures tool name, args, result snapshot, and duration. | | memory:load / memory:save | span | Captures message count. | | error | annotates current span | Sets level: 'ERROR' and statusMessage. |

Multi-agent topologies (planner → worker → reviewer) link automatically: each delegated agent run is a child trace under the parent step, mirroring @agentskit/observability's span tracker.

Conventions

  • Read-only: this observer never mutates messages, tool calls, or results.
  • Errors from the Langfuse SDK are swallowed so they cannot break the run loop.
  • Flushing is handled by the SDK on flushAsync() / process exit.

License

MIT