StepGlass
See exactly what your AI agent did.
A zero-dependency tracer + local dashboard for LangChain (and other) agents. When an agent misbehaves — calls the wrong tool, hangs, or silently fails — StepGlass shows you the full run as a timeline: every tool call, every LLM call, what went in, what came out, and exactly where it broke.


Why
Agent frameworks are good at making agents run. They're not good at showing you what happened when a run goes wrong. Most teams end up grepping through console logs trying to reconstruct a call sequence after the fact.
StepGlass does one thing: it records every step of an agent run to a local file, and gives you a visual timeline to inspect it. No cloud account, no API key, no data leaving your machine.
Install
npm install stepglass
Quick start
Generate a sample trace and see the dashboard (no API keys needed):
npx stepglass dashboard
Using it with a real agent
import { createTraceHandler } from "stepglass";
const { handler, logger } = createTraceHandler({ label: "support-bot run" });
const result = await agentExecutor.invoke(
{ input: userMessage },
{ callbacks: [handler] }
);
logger.finish("completed");
Then run:
npx stepglass dashboard
This opens a local dashboard at http://localhost:4550 showing every run recorded in .stepglass/. Click any step in the timeline to see its full input, output, or error.
Not using LangChain?
The core TraceLogger is framework-agnostic — call start() / end() / error() around any function:
import { TraceLogger } from "stepglass";
const logger = new TraceLogger({ label: "my custom agent" });
const step = logger.start("tool_start", "fetch_weather", { city: "London" });
try {
const result = await fetchWeather("London");
logger.end("tool_end", step, "fetch_weather", result);
} catch (err) {
logger.error("tool_error", step, "fetch_weather", err);
}
logger.finish("completed");
What it records
- Every tool call: name, input, output, duration, and errors
- Every LLM call: prompt, response, duration
- Agent actions and final output
- Nothing leaves your machine — traces are plain JSON files in
.stepglass/
Roadmap
Contributions and framework adapter requests welcome — open an issue.
License
MIT