AgentInspect MCP Server
Offers a Jest reporter and CI artifacts for running AgentInspect checks and evidence in Jest-based test workflows.
Captures and inspects LangChain agent runs as local execution trees for debugging, deterministic checks, and evidence generation.
Provides an adapter for LangGraph to capture agent execution traces and run local trajectory checks and evidence workflows.
Integrates with OpenAI Agents JS to locally capture and inspect agent runs, including tool calls and execution paths.
Offers a Vitest reporter and CI artifacts for running AgentInspect checks and evidence in Vitest-based test workflows.
Support level: Stable — see SUPPORT-LEVELS.md. Network behavior: NETWORK-BEHAVIOR.md.
npm install agent-inspectAgent code rarely fails as one function call. It plans, retrieves, calls tools, invokes a model, retries, and produces side effects. Flat logs show fragments. AgentInspect keeps the run as local JSONL and gives you one evidence loop from the same trace.
One trace. Three jobs.
Debug — read the execution path
See nested steps, tool calls, LLM calls, model and token metadata, durations, errors, and the first causal failure without sending the trace to an AgentInspect service.
npx agent-inspect view <run-id> --dir .agent-inspect --summary
npx agent-inspect report <run-id> --dir .agent-inspect
npx agent-inspect explain <run-id> --dir .agent-inspectUse manual instrumentation, official adapters, supported standards files, or structured logs you already emit.
Prevent — fail CI on the wrong trajectory
Checks are deterministic and provider-free: the same trace and rules produce the same result. Start with a preset, then extend it with the expectations that matter to the workflow.
npx agent-inspect check <run-id> --dir .agent-inspect \
--preset trajectory \
--required-tool retrieve_policyUse --fail-on-observation failed only when the run records explicit OUTCOME events (for example the broken-agent-debugging starter). Trajectory checks do not invent outcomes from tool/LLM/run success.
A passing check exits 0; a rule failure exits 1. Invalid configuration and unreadable/unsupported inputs use separate documented exit codes. Use TraceContract, suites, cohorts, Vitest/Jest reporters, or --evidence-on fail when the workflow needs more than one CLI check.
Share — create reviewable offline evidence
npx agent-inspect verify-safe <run-id> --dir .agent-inspect
npx agent-inspect bundle <run-id> --dir .agent-inspect --profile share --out ./evidence
npx agent-inspect bundle verify ./evidenceverify-safe is a best-effort local assessment and can report SAFE, SAFE WITH WARNINGS, UNSAFE, or UNKNOWN. bundle writes a redacted artifact and manifest; bundle verify rechecks the listed file hashes offline. “Share-checked” is not compliance certification—review the artifact before attaching it to a PR, incident, or support handoff.
Related MCP server: Observability Agent MCP
First local trace
The generated demo is synthetic, keyless, and local. npm install agent-inspect does not copy repository examples; init writes them into the project.
npm install agent-inspect
npx agent-inspect init --yes
node examples/agent-inspect-demo.mjs
npx agent-inspect list --dir .agent-inspectCopy the printed run ID, then inspect it:
npx agent-inspect view <run-id> --dir .agent-inspect --summary
npx agent-inspect check <run-id> --dir .agent-inspect --preset trajectory
npx agent-inspect verify-safe <run-id> --dir .agent-inspectFor a fixed good/regression/PII walkthrough with stable run ids (demo-good, demo-regression, demo-pii), use the canonical keyless showcase. The richer blessed starters cover framework-specific paths.
Use it with your stack
Stack | Install / command | Start |
Custom functions or classes |
| |
LangChain / LangGraph |
| |
AI SDK |
| |
OpenAI Agents JS |
| |
Existing structured logs |
| |
OpenInference / OTLP JSON |
| |
Vitest / Jest CI |
|
See support levels for Stable, Supported, Beta, Preview, and Experimental surfaces.
Programmatic trajectory checks
import { openTraceFile } from "agent-inspect/readers";
import {
defineTraceContract,
evaluateTraceContractRead,
} from "agent-inspect/checks";
const read = await openTraceFile("./trace.jsonl");
const contract = defineTraceContract({
run: { requireCompleted: true },
tools: { required: ["retrieve_policy"] },
});
const result = evaluateTraceContractRead(read, contract);
if (result.status !== "pass") process.exitCode = 1;The full API also exposes TraceFacts for bounded, logical analysis of supported traces. See programmatic trace analysis.
Where AgentInspect fits
AgentInspect owns the laptop-to-PR evidence loop. It complements hosted observability, production trace retention, and broad eval platforms rather than replacing them.
Need | Best fit |
Inspect one local TypeScript agent run immediately | AgentInspect |
Enforce deterministic tool/order/completion expectations in CI | AgentInspect |
Attach a redacted, hash-verifiable offline artifact | AgentInspect |
Monitor a production fleet with hosted dashboards and retention | Hosted observability / APM |
Manage prompts, datasets, and online LLM-judge experiments | Eval / prompt platforms |
See the factual comparison guide.
Safety and network behavior
Traces are local JSONL under
.agent-inspect/orAGENT_INSPECT_TRACE_DIR.Capture is metadata-only by default; raw prompts and outputs require opt-in.
Write-time redaction is enabled by default. The
redactcommand creates a separate redacted copy and does not mutate its source.Core capture and inspection do not require an AgentInspect account, collector, or default upload.
Redaction and
verify-safeare best-effort controls, not privacy, security, or compliance certification.Optional MCP, standards export, and customer-owned Studio surfaces are explicit and have their own network boundaries.
AgentInspect is not a chain-of-thought recorder.
Read network behavior, no-egress policy, and safe trace sharing.
Optional coding-agent loop
@agent-inspect/mcp-server exposes configured local evidence to an MCP client through bounded, read-only tools. It is optional and currently Preview; the core debug/check/evidence loop does not require it.
npx agent-inspect mcp configure --client cursorReview the generated dry-run configuration and the coding-agent loop guide before enabling it.
Group | Packages |
Core product |
|
Framework integrations |
|
Testing and evaluation |
|
Safety analysis |
|
Developer surfaces |
|
Local/team optional surfaces |
|
Extension SDK |
|
The root package is enough for custom capture, the CLI, checks, and Evidence workflows. Install optional packages only for the integration or surface you use. agent-inspect-vscode is currently in the repository and is not presented as a published Marketplace extension.
What it is not
A maintainer-hosted SaaS or production APM replacement
Hosted trace retention, a team dashboard service, or a prompt registry
An LLM-as-judge or dataset platform by default
A replay engine, automatic remediation system, or compliance certification
Status and documentation
Current published baseline: 6.31.3 · persisted schema 1.0 · Node.js >=20 · MIT.
Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and changelog for the current published version.
Contributing
See CONTRIBUTING.md, good first issues, and GitHub Discussions.
Redact and review traces before posting them in issues or pull requests.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP server: let AI agents read your ORANO saved-video library, tasks, and memory.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Read-only Remote MCP for externally grounded AI agent trust receipts.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceRead-only MCP server for turva.dev's published service catalog, pricing and contact details. Five tools return JSON, including dated agent-readiness and security evidence with verification links. Connect over Streamable HTTP without an API key. The server answers questions about turva.dev and does not scan other websites or run audits.MIT
- AlicenseBqualityAmaintenanceA portable, read-only Model Context Protocol server for turning observability data into bounded evidence that AI agents can inspect safely.7Apache 2.0
- AlicenseNot gradedqualityAmaintenanceA secure, local-first MCP server for read-only inspection and troubleshooting of development environments, exposing narrow, typed, auditable capabilities for repository inspection, log summarization, Docker review, and security scanning without granting unrestricted machine access.MIT
- AlicenseAqualityAmaintenanceMCP server exposing AI agent observability tools: list, inspect, and deterministically replay recorded agent execution traces for debugging failures.175 PyPIApache 2.0