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

@wisetwo/trace-lens

v0.1.1

Published

Interactive graph viewer for multi-agent LLM trace logs

Readme

Trace Lens

Interactive graph viewer for multi-agent LLM trace logs in JSONL format.

Trace Lens turns structured trace events into a graph that helps you inspect multi-agent execution flows:

  • one lane per agent or session
  • one node per completed LLM event or error event
  • sequential edges within the same agent
  • task spawn and result edges when graph metadata is available
  • clickable nodes for inspecting the original JSONL entry

Node.js

Installation

# Install globally
npm install -g @wisetwo/trace-lens

# Or run without installing
npx @wisetwo/trace-lens ./logs/trace.jsonl

Quick Start

# Open a trace JSONL file
trace-lens ./logs/trace.jsonl

# Open a directory and use the newest .jsonl file
trace-lens ./logs/

# Custom port
trace-lens ./logs/trace.jsonl --port 3117

# Do not open the browser automatically
trace-lens ./logs/trace.jsonl --no-open

CLI Options

| Option | Description | Default | | ------ | ----------- | ------- | | <path> | Path to a trace .jsonl file or a directory containing .jsonl files | — | | -p, --port <port> | Port to listen on | 3117 | | --no-open | Do not open the browser automatically | false |

When a directory is provided, the viewer selects the newest .jsonl file by modification time.

Trace JSONL Format

The viewer reads JSON Lines: one JSON object per line. Each entry should include a numeric seq field. Other fields are optional and are rendered when present.

Minimal Example

{"ts":"2026-04-29T10:30:00.000Z","seq":1,"stage":"stream:context","sessionKey":"agent:main","provider":"openai","modelId":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}

Common Fields

| Field | Type | Description | | ----- | ---- | ----------- | | ts | string | ISO 8601 timestamp | | seq | number | Monotonically increasing sequence number | | stage | string | Event phase, such as stream:context or error | | runId | string | Run identifier | | parentRunId | string \| null | Parent run identifier | | sessionId | string | Session identifier | | sessionKey | string | Human-readable session key | | provider | string | LLM provider name | | modelId | string | Model identifier | | system | unknown | System prompt or metadata | | prompt | string | Prompt text | | messages | array | Message history | | tools | array | Tool definitions | | messageCount | number | Pre-computed message count | | toolCount | number | Pre-computed tool count | | error | string | Error message |

Optional Graph Metadata

For exact multi-agent graph rendering, trace entries can include these optional fields:

| Field | Description | | ----- | ----------- | | agentId | Stable agent identifier | | agentLabel | Display label for the agent lane | | agentRole | Agent role, such as lead, sub, or unknown | | agentSeq | Sequence number within the agent | | turnId | Turn identifier | | turnStage | Turn phase, such as end or error | | parentAgentId | Parent agent identifier | | parentToolCallId | Tool call that spawned the child agent | | taskId | Task identifier | | taskDescription | Human-readable task description | | subagentType | Child agent type label |

If explicit graph metadata is missing, the viewer falls back to best-effort inference from session order and task tool-call IDs.

Development

# Install dependencies
npm install

# Start the Vite UI dev server
npm run dev

# In another terminal, start the API server against a sample trace file
npm run build:server
node ./dist/server/cli.js ./logs/trace.jsonl --port 3117 --no-open

# Build for production
npm run build

# Type check
npm run typecheck

# Publish a patch release (also supports minor, major, or an explicit version)
npm run release -- patch

The Vite dev server runs at http://localhost:5173 and proxies API requests to http://localhost:3117.

License

MIT