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

aidk-devtools

v0.1.7

Published

Developer tools for AIDK - visualize execution, context, and state

Downloads

90

Readme

aidk-devtools

Developer tools for visualizing and debugging AIDK agent execution.

Installation

pnpm add aidk-devtools aidk

Quick Start

Embedded Mode (Simple)

DevTools runs inside your app process:

import { createEngine } from 'aidk';
import { attachDevTools } from 'aidk-devtools';

const engine = createEngine({ devTools: true });
attachDevTools(engine, { port: 3004, open: true });

Remote Mode (Persistent)

DevTools runs as a standalone server. UI persists across app restarts.

Terminal 1 - Start the CLI:

npx aidk-devtools --port 3004 --open

Terminal 2 - Your app sends events to the CLI:

const engine = createEngine({
  devTools: {
    remote: true,
    remoteUrl: 'http://localhost:3004',
  },
});

Or with environment variables:

DEVTOOLS=true DEVTOOLS_REMOTE=true DEVTOOLS_PORT=3004 node app.js

Environment Variables

DEVTOOLS=true           # Enable devtools
DEVTOOLS_REMOTE=true    # Use remote mode (send to CLI server)
DEVTOOLS_PORT=3004      # Server port
DEVTOOLS_OPEN=false     # Disable auto-open browser
DEVTOOLS_DEBUG=true     # Enable debug logging
DEVTOOLS_SECRET=token   # Auth token for remote mode

Full Setup Example

Support both embedded and remote modes via environment variables:

import { createEngine } from 'aidk';
import { attachDevTools } from 'aidk-devtools';

const devToolsEnabled = process.env.DEVTOOLS === 'true';
const devToolsRemote = process.env.DEVTOOLS_REMOTE === 'true';
const devToolsPort = +(process.env.DEVTOOLS_PORT || 3004);

const engine = createEngine({
  devTools: devToolsEnabled ? {
    remote: devToolsRemote,
    remoteUrl: devToolsRemote ? `http://localhost:${devToolsPort}` : undefined,
    secret: process.env.DEVTOOLS_SECRET,
  } : undefined,
});

// Only start embedded server if NOT in remote mode
if (devToolsEnabled && !devToolsRemote) {
  attachDevTools(engine, {
    port: devToolsPort,
    open: process.env.DEVTOOLS_OPEN !== 'false',
  });
}

CLI Options

npx aidk-devtools [options]

| Option | Description | Default | | -------------- | --------------------------- | --------- | | --port, -p | Server port | 3001 | | --host | Host to bind to | 127.0.0.1 | | --secret, -s | Auth token for POST /events | none | | --open, -o | Auto-open browser | false | | --debug, -d | Enable debug logging | false |

Features

  • Real-time Streaming - SSE-based live updates as execution progresses
  • Tick-by-tick Inspection - View compiled context, model responses, and events
  • Token Usage Tracking - Monitor input/output/reasoning tokens per tick and aggregate totals
  • Tool Call Visualization - See tool inputs and results in context
  • Raw Output Access - Inspect raw provider responses for debugging
  • Fork/Spawn Visibility - Automatic hierarchy display with parent links and aggregate token counts
  • CLI Support - Run standalone server with npx aidk-devtools
  • Security - Token auth, rate limiting, localhost-only binding by default

UI Overview

The devtools UI shows:

  • Execution List - All agent executions in the sidebar
  • Timeline View - Tick-by-tick breakdown of each execution
  • Stats Grid - Token usage, tool calls, messages, events per tick
  • Compiled Context - System prompt, messages, and available tools
  • Model Response - Formatted output with raw/message view toggle
  • Events - Tool calls, results, and other events

Key Exports

  • attachDevTools(engine, options) - Attach devtools to an engine
  • initDevTools(options) - Initialize devtools server manually
  • devtools - Event emitter for manual instrumentation
  • DevToolsServer - Server class for advanced usage

Documentation

See the full documentation.