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

@aerograph/sdk

v0.3.0

Published

Reference SDK for emitting AeroGraph trace events from AI applications.

Readme

@aerograph/sdk

The core Node.js Flight Recorder for emitting normalized trace events from any JavaScript/TypeScript codebase to the AeroGraph collector.

Overview

AeroGraph is an open-source cognitive observability layer for AI agent workflows. It allows you to record, playback, and visually inspect the deterministic decision-making paths of your agents.

This SDK provides a FlightRecorder instance to seamlessly construct and emit strictly validated TraceEvent objects.

Installation

npm install @aerograph/sdk

(Requires Node.js >= 18.18.0)

Quick Start

import { FlightRecorder } from "@aerograph/sdk";

// 1. Initialize the recorder
const recorder = new FlightRecorder({
  endpoint: "http://localhost:4317", // AeroGraph Collector URL
  actor: {
    id: "my-travel-agent",
    name: "Travel Planner",
  },
  projectId: "travel-app", // Optional (v1.1.0)
  environment: "production" // Optional (v1.1.0)
});

// 2. Emit events
const promptEvent = await recorder.prompt({
  text: "Plan a trip to Tokyo",
  // Optional v1.1.0 canonical telemetry
  model: { name: "gpt-4o", provider: "openai" },
  usage: { inputTokens: 10, totalTokens: 10 },
  durationMs: 50
});

const responseEvent = await recorder.response({
  parentSpanId: promptEvent.spanId,
  text: "Here is your 3-day itinerary...",
  usage: { inputTokens: 10, outputTokens: 50, totalTokens: 60 },
  durationMs: 2500
});

Available Event Kinds

The FlightRecorder supports 10 canonical event kinds:

  • prompt: Input sent to an LLM.
  • response: Output from an LLM.
  • tool_call: Invocation of a tool.
  • tool_result: The tool's resulting output.
  • handoff: Delegating execution from one agent to another.
  • error: Any exception or system failure.
  • retriever: RAG retrieval query and source documents.
  • state_snapshot: A deterministic hash of a LangGraph node's state.
  • checkpoint: A human-in-the-loop pause.
  • note: Freeform structured annotations.

Span Hierarchy

Every event acts as a "span" in the trace tree. To link a child event to a parent event, pass the parent's spanId via the parentSpanId parameter:

const root = await recorder.prompt({ text: "root prompt" });
const child = await recorder.tool_call({ 
  parentSpanId: root.spanId, 
  toolId: "search", 
  input: { q: "query" } 
});

License

Apache-2.0