agent-inspect
Local evidence debugger and trajectory-test toolkit for TypeScript AI agents: inspect causal runs, catch wrong tool paths in CI, and share safe offline evidence
What is agent-inspect?
Local evidence debugger and trajectory-test toolkit for TypeScript AI agents: inspect causal runs, catch wrong tool paths in CI, and share safe offline evidence.
Overview of agent-inspect
What it is
agent-inspect is a local-first evidence debugger and trajectory-test toolkit for TypeScript AI agents. It captures agent runs as local JSONL traces and provides tools to inspect execution paths, enforce deterministic trajectory checks in CI, and create redacted, hash-verifiable offline evidence artifacts. The toolkit does not require an account, collector, or default upload, and captures metadata-only by default.
Key features
- Captures agent runs as local JSONL traces under
.agent-inspect/orAGENT_INSPECT_TRACE_DIR. - Provides CLI commands to view, report, and explain execution trees with nested steps, tool calls, LLM calls, durations, errors, and causal failures.
- Enables deterministic trajectory checks with presets and custom rules (e.g., required tools, completion expectations) that exit
0on pass and1on failure. - Supports creating redacted, hash-verifiable offline evidence bundles with
bundleandverify-safecommands. - Offers programmatic APIs for trace reading and contract evaluation via
agent-inspect/readersandagent-inspect/checks. - Integrates with frameworks like LangChain, AI SDK, OpenAI Agents JS, and testing tools Vitest/Jest via optional packages.
- Includes optional MCP server for read-only evidence access and a safety analysis surface.
Use cases
- Debugging a single local TypeScript agent run to understand its execution path and causal failures.
- Enforcing deterministic tool call order, required tools, and completion expectations in CI pipelines.
- Sharing a redacted, hash-verifiable offline artifact with a PR, incident report, or support handoff.
- Complementing hosted observability, production trace retention, and eval platforms for local and CI evidence loops.
Getting started
bashnpm install agent-inspectnpx agent-inspect init --yesnode examples/agent-inspect-demo.mjsnpx agent-inspect list --dir .agent-inspect
License and pricing
Licensed under MIT. Open source.
Based on the project's public README and repository metadata.