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

@reactive-agents/observability

v0.10.6

Published

Observability for Reactive Agents — distributed tracing, metrics, and structured logging

Readme

@reactive-agents/observability

Production observability for the Reactive Agents framework. v0.10.3

Distributed tracing (OpenTelemetry / OTLP), metrics collection, structured logging with file rotation, kernel thought tracing, and privacy-aware telemetry export — all wired into the agent execution pipeline so every phase, tool call, and entropy score is observable.

Installation

bun add @reactive-agents/observability

Or via the umbrella:

bun add reactive-agents

Features

  • Distributed tracing — OpenTelemetry spans per execution phase, OTLP HTTP exporter included (setupOTLPExporter)
  • Structured logging — JSON output with trace context, file rotation via LiveLogWriter, observable bus via ObservableLogger
  • Metrics collector — token usage, latency, step count, cost, tool success rates per run + aggregate
  • Thought tracer — captures the kernel's reasoning tree (ThoughtNode) for debugging and replay
  • Console + file + dashboard exporters — pretty-printed local output, JSON file, and a live dashboard data view (buildDashboardData)
  • Telemetry pipeline — privacy-aware (preservePrivacy, defaultRedactors), aggregated (TelemetryAggregator), opt-in collection (TelemetryCollector)
  • Cortex reporter — pipes selected events to a Cortex hub for cross-agent visibility
  • Calibration provenance renderer — formats per-model calibration data for human review

Quick Example

import { ReactiveAgents } from "reactive-agents";

const agent = await ReactiveAgents.create()
  .withName("traced-agent")
  .withProvider("anthropic", { model: "claude-sonnet-4-20250514" })
  .withObservability({
    exporters: ["console", "file", "otlp"],
    otlpEndpoint: "http://localhost:4318/v1/traces",
    logFile: "./logs/agent.jsonl",
  })
  .build();

const result = await agent.run("Analyze this dataset");
// All execution phases produce spans; tool calls, errors, and entropy scores
// are recorded as structured log events with shared trace IDs.

What Gets Traced

Each execution phase emits a span. The kernel's 12-phase loop produces a structured trace tree:

bootstrap → comprehend → attend → reason → decide → act
         → observe → reflect → verify → terminate → output

Tool calls, LLM streams, and entropy events are children of the relevant phase span.

Direct Service Usage

import { Effect } from "effect";
import {
  ObservabilityService,
  ObservabilityServiceLive,
  makeMetricsCollector,
  makeThoughtTracer,
} from "@reactive-agents/observability";

const program = Effect.gen(function* () {
  const obs = yield* ObservabilityService;
  const tracer = yield* obs.tracer();
  const span = yield* tracer.startSpan("custom-step");
  // ... do work ...
  yield* tracer.endSpan(span, { status: "ok" });
});

Privacy + Redaction

The redaction pipeline strips secrets and PII before any exporter sees them:

import { applyRedactors, defaultRedactors } from "@reactive-agents/observability";

const safe = applyRedactors(rawEvent, defaultRedactors);
// Removes API keys, OAuth tokens, JWT, email patterns, etc.

Telemetry export is opt-in and uses HMAC-signed payloads (signPayload) when sending anonymized run reports.

Key Exports

| Export | Purpose | | ------------------------------------------ | --------------------------------------------------------- | | ObservabilityService, ObservabilityServiceLive | Composite observability entry point | | makeTracer | OpenTelemetry-compatible span creator | | makeStructuredLogger, makeLoggerService, makeObservableLogger | Logging stack | | makeMetricsCollector, MetricsCollectorLive | Run + aggregate metrics | | makeThoughtTracer, ThoughtTracerLive | Kernel reasoning-tree capture | | makeConsoleExporter, makeFileExporter, setupOTLPExporter | Exporter factories | | buildDashboardData, formatMetricsDashboard | Dashboard rendering | | CortexReporter, CortexReporterLive | Cross-agent event hub reporter | | TelemetryAggregatorLive, TelemetryCollectorLive | Privacy-aware telemetry pipeline | | applyRedactors, defaultRedactors | Secret + PII stripping | | createObservabilityLayer | Factory for the runtime layer |

Documentation

License

MIT