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/trace

v0.14.0

Published

Structured execution trace recording and inspection for Reactive Agents

Readme

@reactive-agents/trace

Structured execution trace recording and inspection for Reactive Agents

npm docs

Structured execution-trace recording for AI agents. This package records every reactive-agent event to JSONL, then lets you load, analyze, and compare runs — surfacing guard interventions, failure modes, reasoning trajectories, tool outcomes, cost signals, and honesty checks. It's the data layer behind the rax-diagnose forensic CLI and deterministic replay, and the foundation for LLM agent debugging and observability.

Install

bun add @reactive-agents/trace
# or: npm install @reactive-agents/trace

Usage

Record runs by wiring TraceBridgeLayer over the recorder service, then inspect saved traces:

import { Layer } from "effect";
import {
  TraceRecorderServiceLive,
  TraceBridgeLayer,
  loadTrace,
  traceStats,
  analyzeRun,
  renderRunReport,
} from "@reactive-agents/trace";

// Recording: bridge the EventBus into a JSONL recorder (dir: null = memory-only).
const TracingLayer = TraceBridgeLayer.pipe(
  Layer.provide(TraceRecorderServiceLive({ dir: "./traces" })),
);
// provide TracingLayer to your agent runtime...

// Inspecting a saved trace:
const trace = await loadTrace("./traces/<runId>.jsonl");
console.log(traceStats(trace));        // iterations, tokens, tool calls, ...
console.log(renderRunReport(analyzeRun(trace))); // human-readable run report

API

  • TraceRecorderService / TraceRecorderServiceLive(opts) — the recorder tag and its live layer ({ dir: string | null }). Recorder exposes emit, snapshot, flush, flushAll, close.
  • TraceBridgeLayer — subscribes to the EventBus and converts AgentEvents into recorded TraceEvents.
  • loadTrace(path) / traceStats(trace) — load a JSONL trace into a Trace; compute TraceStats.
  • analyzeRun(trace, opts?) / renderRunReport(analysis) — full run analysis (RunAnalysis: failure modes, honesty checks, cost signals, reasoning trajectory) and its rendered report.
  • analyzeInterventions(...) / renderInterventionReport(...) — guard-intervention analysis and report.
  • aggregateCohort(...) / compareCohorts(...) / renderCohortDelta(...) — aggregate and diff cohorts of runs.
  • toTraceEvent(...) (also exported from @reactive-agents/trace/normalize) — normalize an AgentEvent into a TraceEvent.
  • validateRationale / isRationale / isTraceEvent — type guards for Rationale and TraceEvent.

Part of Reactive Agents

This package is part of Reactive Agents — the TypeScript AI agent framework built on Effect-TS. See the Observability docs and the full documentation.