AgentInspect turns a TypeScript agent run into a local execution tree you can read, check, and share. A run is captured as JSONL on disk and covers nested steps, tool calls, model calls with model and token metadata, structured logs, durations, errors, and the first causal failure, so a multi-step run is inspectable as a tree rather than as scattered flat logs.
One trace serves three jobs. Debugging reads the tree from the terminal with view, report, and explain commands. Prevention runs deterministic, provider-free checks: the same trace and rules always produce the same verdict, with no model acting as judge, driven by presets, a TraceContract defined in code, suites, cohorts, or Vitest and Jest reporters. A passing check exits 0 and a rule failure exits 1, with separate documented exit codes for invalid configuration and unreadable input. Sharing writes an Evidence v2 bundle: a redacted artifact and a manifest whose file hashes are re-verified offline.
Instrumentation comes from manual step wrappers, official adapters for LangChain and LangGraph, the AI SDK, and OpenAI Agents JS, structured logs you already emit, or OpenInference and OTLP JSON files. Capture is metadata-only by default, raw prompts and outputs are opt-in, and write-time redaction is on, with traces kept under a local directory. The core loop needs no account, collector, or upload; an optional preview MCP server exposes the same evidence to a coding agent through read-only tools.
The project describes verify-safe and redaction as best-effort local checks rather than privacy, security, or compliance certification, and states that it does not record chain of thought. It positions itself around the local-to-pull-request loop alongside hosted observability, production trace retention, and evaluation platforms.
Features
- Execution trees: nested steps, tool and model calls, durations, errors, and the first causal failure from local JSONL
- Deterministic checks: presets, required tools, and failure conditions evaluated identically on every run
- TraceContract: contracts declared in code and evaluated programmatically, with TraceFacts for bounded analysis
- CI integration: documented exit codes, Vitest and Jest reporters, suites, cohorts, and evidence written on failure
- Evidence v2 bundles: redacted artifacts with a manifest whose hashes are rechecked offline
- Framework adapters: packages for LangChain and LangGraph, the AI SDK, and OpenAI Agents JS
- Existing logs and standards: structured logs, OpenInference, and OTLP JSON converted into the same tree
- Local by default: metadata-only capture, write-time redaction, and no account, collector, or default upload
- Read-only MCP server: an optional preview surface that exposes configured evidence to an MCP client
- Package family: a fixed release group covering core capture, redaction, adapters, testing, viewers, and an adapter SDK
Integrates with
AI SDK
TypeScript toolkit for LLM calls, tool use and multi-step agent loops.
LangChain
Framework for building LLM applications and agents from interoperable components and a large integrations library
LangGraph
Low-level orchestration framework for long-running stateful agents, with durable execution, interrupts, and persistent memory
OpenAI Agents SDK
Python framework for multi-agent workflows with handoffs, guardrails, sessions, sandbox and voice agents, and built-in tracing