<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Raju Dandigam]]></title><description><![CDATA[Raju Dandigam]]></description><link>https://rajudandigam.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 00:29:56 GMT</lastBuildDate><atom:link href="https://rajudandigam.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Debug AI Agents With Execution Trees Instead of Flat Logs]]></title><description><![CDATA[A flat log can tell you that five things happened. It often cannot tell you which operation caused the next one, which failure triggered a fallback, or whether three tool calls were children of one pl]]></description><link>https://rajudandigam.hashnode.dev/how-to-debug-ai-agents-with-execution-trees-instead-of-flat-logs</link><guid isPermaLink="true">https://rajudandigam.hashnode.dev/how-to-debug-ai-agents-with-execution-trees-instead-of-flat-logs</guid><category><![CDATA[AI]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[debugging]]></category><category><![CDATA[open source]]></category><dc:creator><![CDATA[Raju Dandigam]]></dc:creator><pubDate>Thu, 03 Sep 2026 21:45:05 GMT</pubDate><content:encoded><![CDATA[<img src="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpnivwjakor95cx96ajqj.png" alt="Cover: How to Debug AI Agents With Execution Trees Instead of Flat Logs" style="display:block;margin:0 auto" />

<p>A flat log can tell you that five things happened. It often cannot tell you which operation caused the next one, which failure triggered a fallback, or whether three tool calls were children of one planning step or unrelated work.</p>
<p>That distinction matters for AI agents because the path is part of the behavior.</p>
<p>I maintain <a href="https://github.com/rajudandigam/agent-inspect">AgentInspect</a>, an open-source TypeScript toolkit for inspecting agent executions locally. This article explains why I chose execution trees as the primary debugging model, using synthetic fixtures verified against <a href="https://github.com/rajudandigam/agent-inspect/tree/agent-inspect%406.17.4"><code>agent-inspect@6.17.4</code></a>.</p>
<h2>The problem with reading an agent run as a timeline</h2>
<p>Consider a support agent that performs these operations:</p>
<pre><code class="language-text">09:00:00.000 plan started
09:00:00.020 inventory request started
09:00:00.060 inventory request failed: 503
09:00:00.061 inventory request started
09:00:00.120 inventory request succeeded
09:00:00.150 answer completed
</code></pre>
<p>This is enough to reconstruct a simple story, but the reconstruction is happening in your head. Add nested agents, parallel tools, reused operation names, and interleaved application logs, and timestamps stop being a reliable picture of causality.</p>
<p>An execution tree makes the relationship explicit:</p>
<pre><code class="language-text">support-agent
├── plan
├── fetch-inventory (failed: 503)
├── fetch-inventory (success)
└── draft-answer
</code></pre>
<p>The tree does not replace raw event data. It is a projection of that data for the question developers usually ask first: <em>What path did this run take?</em></p>
<h2>Capture meaningful boundaries in TypeScript</h2>
<p>AgentInspect provides wrappers for a run and for named steps. Here is a deliberately small example:</p>
<pre><code class="language-ts">import { inspectRun, step } from "agent-inspect";

await inspectRun(
  "travel-planner",
  async () =&gt; {
    const plan = await step("plan", async () =&gt; ({
      destinations: ["SFO", "SEA"],
    }));

    const [flights, hotels] = await Promise.all([
      step.tool("search-flights", async () =&gt; [
        { id: "F-101", price: 220 },
      ]),
      step.tool("search-hotels", async () =&gt; [
        { id: "H-202", nightly: 180 },
      ]),
    ]);

    return step.llm("rank-options", async () =&gt; ({
      plan,
      flights,
      hotels,
    }));
  },
  { traceDir: "./.agent-inspect" },
);
</code></pre>
<p>This is manual instrumentation. It does not claim that a wrapper can automatically discover every framework-internal operation. The purpose is to record the boundaries you care about: the run, its planning step, the two sibling tool calls, and the final model-facing step.</p>
<p>Then inspect the run locally:</p>
<pre><code class="language-bash">npx agent-inspect view travel-planner \
  --dir .agent-inspect \
  --summary
</code></pre>
<h2>Four shapes that reveal different classes of bugs</h2>
<h3>1. Nested work exposes ownership</h3>
<p>A three-level synthetic fixture renders like this:</p>
<pre><code class="language-text">Execution Tree:
✔ outer (120ms)
  ✔ middle (80ms)
    ✔ inner (50ms)
</code></pre>
<p>Those two spaces are not decoration. They tell us that <code>inner</code> belongs to <code>middle</code>, which belongs to <code>outer</code>. If <code>inner</code> fails, we know which higher-level operation owned it. With flat logs, matching IDs or surrounding timestamps would be required to infer the same structure.</p>
<p>Nesting is especially useful when one agent delegates to another, a tool performs several sub-operations, or a retrieval step owns both a query rewrite and a vector search.</p>
<h3>2. Fallbacks expose recovery behavior</h3>
<p>Now consider an error-recovery fixture:</p>
<pre><code class="language-text">Execution Tree:
✖ tool:primary-search (100ms)
    Error: primary search unavailable
✔ tool:fallback-search (200ms)
✔ handle-recovered-result (50ms)
</code></pre>
<p>The final run may still be successful. If we looked only at the answer, the failed primary search could disappear from the debugging story. The tree preserves both facts:</p>
<ul>
<li><p>the primary path failed;</p>
</li>
<li><p>the recovery path completed.</p>
</li>
</ul>
<p>That distinction can change the engineering decision. A successful answer produced by a fallback may be acceptable, but a sudden rise in fallback use could still indicate a degraded dependency or an expensive routing change.</p>
<h3>3. Repeated siblings expose retries</h3>
<p>Retries deserve their own visible shape:</p>
<pre><code class="language-text">Execution Tree:
✖ tool:fetch-inventory (40ms)
    Error: synthetic 503 from upstream
✖ tool:fetch-inventory (45ms)
    Error: synthetic 503 from upstream
✔ tool:fetch-inventory (60ms)
✔ handle-recovered-result (30ms)
</code></pre>
<p>A final success status would hide the cost of reaching success. The repeated tool name makes the retry sequence visible. It also gives a deterministic check something concrete to evaluate: for example, whether <code>fetch-inventory</code> exceeded an allowed call count.</p>
<p>The tree alone does not tell us whether the retry policy was correct. It gives us evidence that the policy was exercised.</p>
<h3>4. Parallel siblings expose concurrency</h3>
<p>A parallel fixture renders as sibling operations:</p>
<pre><code class="language-text">Execution Tree:
✔ tool:search-hotels (300ms)
✔ tool:search-flights (200ms)
✔ tool:search-cars (100ms)
</code></pre>
<p>The durations are not meant to be added. These steps are siblings, and may overlap. That protects us from a common timeline mistake: assuming each timestamped operation waited for the previous one.</p>
<p>The tree does not prove that concurrency was optimally implemented, but it accurately preserves the structural relationship needed to investigate it.</p>
<h2>Trees are a view, not the entire evidence model</h2>
<p>It is tempting to turn a readable tree into the only stored artifact. I avoided that because a human-readable view necessarily compresses information.</p>
<p>The underlying trace may include identifiers, timestamps, status, inputs or outputs (subject to capture policy), observations, and metadata. Different questions need different projections:</p>
<pre><code class="language-text">structured trace
├── tree      -&gt; what path happened?
├── check     -&gt; did an invariant hold?
├── diff      -&gt; what changed between runs?
├── report    -&gt; what should a reviewer read?
└── bundle    -&gt; what evidence can be shared?
</code></pre>
<p>An execution tree is the fastest entry point, not a substitute for checks or analysis.</p>
<h2>Turn a suspicious shape into a deterministic check</h2>
<p>Suppose the retry tree reveals that an inventory tool can run three times. If the intended policy permits at most two calls, encode that expectation rather than relying on future visual inspection.</p>
<p>At the CLI level, a trajectory check can require tools and fail on recorded observations:</p>
<pre><code class="language-bash">npx agent-inspect check travel-planner \
  --dir .agent-inspect \
  --preset trajectory \
  --required-tool search-flights \
  --fail-on-observation failed
</code></pre>
<p>For richer rules, AgentInspect exposes an experimental <code>TraceContract</code> API that can express tool requirements, forbidden tools, maximum calls, ordering, run status, duration, model allowlists, and token ceilings. Because that API is beta in the referenced release, pin the version and test the exact semantics before using it as a CI gate.</p>
<p>The important workflow is broader than one API:</p>
<ol>
<li><p>inspect the tree;</p>
</li>
<li><p>identify a stable behavioral invariant;</p>
</li>
<li><p>encode it as a deterministic check;</p>
</li>
<li><p>keep human judgment for context-dependent questions.</p>
</li>
</ol>
<h2>What the tree cannot tell you</h2>
<p>A clean tree does not prove that an answer is correct. A required retrieval step may return irrelevant documents. A model call may produce unsupported claims. A tool can succeed technically while returning stale data.</p>
<p>Execution trees are strongest for structural questions:</p>
<ul>
<li><p>Which operations ran?</p>
</li>
<li><p>Which operation owned a failure?</p>
</li>
<li><p>Was a fallback or retry used?</p>
</li>
<li><p>Which work happened as siblings?</p>
</li>
<li><p>Where did a run stop?</p>
</li>
</ul>
<p>Use semantic evaluators, domain tests, and human review for content quality. The most reliable agent debugging workflow combines these layers rather than asking one visualization to answer every question.</p>
<h2>Debug the path, not only the answer</h2>
<p>The final response is what the user sees, but the execution path is what the engineer can improve. A tree turns that path from an inferred narrative into a concrete artifact.</p>
<p>That is the design principle behind AgentInspect’s local view: preserve causal structure, expose unsuccessful work even when recovery succeeds, and make suspicious patterns easy to convert into repeatable checks.</p>
<p>You can explore the exact release used here on <a href="https://github.com/rajudandigam/agent-inspect/tree/agent-inspect%406.17.4">GitHub</a>. If you try it, start with a synthetic failure-and-fallback fixture. A perfect happy path is the least interesting test of a debugger.</p>
]]></content:encoded></item><item><title><![CDATA[Debug TypeScript AI Agent Trajectories Locally with AgentInspect]]></title><description><![CDATA[Your AI agent failed.
Again.
The final answer is wrong, but the logs look fine:
tool call started
model call started
tool call completed
model call completed
fallback used
error: timeout

Which tool c]]></description><link>https://rajudandigam.hashnode.dev/agent-inspect</link><guid isPermaLink="true">https://rajudandigam.hashnode.dev/agent-inspect</guid><category><![CDATA[TypeScript]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[Testing]]></category><category><![CDATA[Open Source]]></category><dc:creator><![CDATA[Raju Dandigam]]></dc:creator><pubDate>Tue, 01 Sep 2026 18:07:28 GMT</pubDate><content:encoded><![CDATA[<p>Your AI agent failed.</p>
<p>Again.</p>
<p>The final answer is wrong, but the logs look fine:</p>
<pre><code class="language-text">tool call started
model call started
tool call completed
model call completed
fallback used
error: timeout
</code></pre>
<p>Which tool caused the timeout? Did the model answer before retrieval finished? Was the fallback expected? Did the agent call the same tool twice?</p>
<p>This is where <code>console.log</code> stops feeling like debugging and starts feeling like archaeology.</p>
<p>I kept hitting this problem while building TypeScript AI agents. Once the flow moved beyond a single model call, the debugging loop became a system:</p>
<pre><code class="language-text">plan → retrieve → rank → generate → validate → maybe retry → maybe hand off
</code></pre>
<p>Flat logs lost the structure. Output only tests could miss a bad path that happened to produce a plausible answer. Model graded evals helped with semantic quality, but they were a poor fit for every deterministic CI rule. And raw traces were too risky to paste casually into issues or pull requests.</p>
<p>So I built <a href="https://github.com/rajudandigam/agent-inspect">agent-inspect</a>.</p>
<blockquote>
<p><strong>AgentInspect is a local evidence debugger and trajectory-test toolkit for TypeScript AI agents.</strong></p>
</blockquote>
<p>It turns one local trace into three things: a readable execution tree, a deterministic regression gate, and a derived Evidence v2 bundle that you can review before sharing.</p>
<p>No account. No collector. No default upload. Metadata only by default.</p>
<pre><code class="language-text">one local JSONL trace
├─ Debug   → view · report · explain
├─ Prevent → check · contract · CI
└─ Share   → redact · bundle · verify
</code></pre>
<h2>The bug is often in the trajectory</h2>
<p>A support agent can return a plausible answer after doing almost everything wrong.</p>
<p>The healthy path might be:</p>
<pre><code class="language-text">plan-request
└─ retrieve_policy
   └─ rank-results
      └─ generate_answer
         └─ policyShown: passed
</code></pre>
<p>The regression might be:</p>
<pre><code class="language-text">generate_answer          &lt;- answered before retrieval
retrieve_policy
retrieve_policy          &lt;- duplicate call
search_docs              &lt;- wrong tool, failed
policyShown: failed
</code></pre>
<p>An output only test may pass. A flat log may contain every event. Neither makes the wrong path obvious.</p>
<p>The final answer is only one fact about the run. Tool choice, ordering, repetition, completion, duration, token usage, and observed outcomes are facts too. Together, those facts form the agent's <strong>trajectory</strong>.</p>
<p>That trajectory should be inspectable. It should also be testable.</p>
<h2>Make execution boundaries explicit</h2>
<p>You can start with manual instrumentation:</p>
<pre><code class="language-ts">import { inspectRun, observeOutcome, step } from "agent-inspect";

const answer = await inspectRun(
  "support-agent",
  async () =&gt; {
    const policy = await step(
      "retrieve_policy",
      () =&gt; retrievePolicy(),
      {
        type: "tool",
        metadata: { toolName: "retrieve_policy" },
      },
    );

    const result = await step(
      "generate_answer",
      () =&gt; draftAnswer(policy),
      {
        type: "llm",
        metadata: { model: "your-model" },
      },
    );

    await observeOutcome("policyShown", {
      expectation: "The answer cites a retrieved policy",
      status: "passed",
      method: "custom",
    });

    return result;
  },
  { traceDir: ".agent-inspect" },
);
</code></pre>
<p>The wrapper records those boundaries as local JSONL while preserving the application's return value and errors. Raw prompts and model outputs are not required for the core workflow.</p>
<p>If your application already emits structured logs or uses AI SDK, OpenAI Agents JS, LangChain, or LangGraph you can use an adapter or reader instead of wrapping every step manually.</p>
<h2>Get a useful result without an API key</h2>
<p>The shortest path uses a generated synthetic demo:</p>
<pre><code class="language-bash">npm install agent-inspect
npx agent-inspect init --yes
node examples/agent-inspect-demo.mjs
npx agent-inspect list --dir .agent-inspect
</code></pre>
<p><code>init</code> writes a small config and demo into your project. The demo does not call a model or upload a trace.</p>
<p>Copy the run ID printed by <code>list</code>, then use the same local artifact for the three jobs below.</p>
<h2>1. Debug: read the execution tree</h2>
<pre><code class="language-bash">npx agent-inspect view &lt;run-id&gt; --dir .agent-inspect --summary
npx agent-inspect report &lt;run-id&gt; --dir .agent-inspect
npx agent-inspect explain &lt;run-id&gt; --dir .agent-inspect
</code></pre>
<img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/showcase/gif/debug-tree.gif" alt="A terminal lists a local AgentInspect run and renders its execution tree with step types, durations, model metadata, and token counts" style="display:block;margin:0 auto" />

<p>The tree restores the structure that flat logs lose: nested steps, tool and model calls, durations, safe metadata, errors, and observed outcomes. <code>explain</code> summarizes local trace facts deterministically; its default path makes no provider call.</p>
<p>The useful question changes from:</p>
<pre><code class="language-text">Did the run fail?
</code></pre>
<p>to:</p>
<pre><code class="language-text">Where did the passing and failing trajectories first diverge?
</code></pre>
<p>That distinction matters when the visible answer looks fine but the agent skipped a required retrieval, safety, or validation step.</p>
<h2>2. Prevent: turn the path into a CI gate</h2>
<p>Some agent quality questions are subjective. Helpfulness, tone, and open ended answer quality can benefit from model graded evaluation.</p>
<p>But many regressions are structural:</p>
<ul>
<li><p>Was <code>retrieve_policy</code> called?</p>
</li>
<li><p>Did the forbidden <code>search_docs</code> tool appear?</p>
</li>
<li><p>Did generation happen before retrieval?</p>
</li>
<li><p>Did the run complete?</p>
</li>
<li><p>Did an observed outcome fail?</p>
</li>
<li><p>Did the agent exceed a duration or token budget?</p>
</li>
</ul>
<p>Those checks do not need another model. They can be deterministic:</p>
<pre><code class="language-bash">npx agent-inspect check &lt;run-id&gt; --dir .agent-inspect \
  --preset trajectory \
  --required-tool retrieve_policy \
  --forbidden-tool search_docs \
  --fail-on-observation failed
</code></pre>
<p>The preset and explicit shorthand rules are additive. A healthy run exits <code>0</code>; a trajectory-rule failure exits <code>1</code>.</p>
<p>For the committed regression fixture, the result is concrete:</p>
<pre><code class="language-text">Check status: fail
Summary: 2 failed, 0 warning(s), 0 error(s)

- outcome.status: Observed outcome count 1 matched [failed].
- tool.usage: Forbidden tool search_docs appeared.
</code></pre>
<img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/showcase/gif/check-pass-fail.gif" alt="The same deterministic trajectory check exits zero for the good run and one for the regression" style="display:block;margin:0 auto" />

<p>Same trace. Same rules. Same verdict. No model judge and no provider call in the check path.</p>
<p>That makes it suitable for a normal CI step. If your test fixture writes a trace to a stable path:</p>
<pre><code class="language-yaml">- name: Run deterministic agent fixture
  run: node run-agent-fixture.mjs

- name: Check agent trajectory
  run: |
    npx agent-inspect check .agent-inspect/ci-run.jsonl \
      --preset trajectory \
      --required-tool retrieve_policy \
      --fail-on-observation failed \
      --evidence-on fail
</code></pre>
<p><code>--evidence-on fail</code> writes local Evidence for triage when the check fails. It does not upload the artifact.</p>
<p>When CLI flags outgrow one command, the Beta TraceContract API expresses the same expectations in TypeScript:</p>
<pre><code class="language-ts">import { openTraceFile } from "agent-inspect/readers";
import {
  defineTraceContract,
  evaluateTraceContractRead,
} from "agent-inspect/checks";

const read = await openTraceFile("./.agent-inspect/demo-regression.jsonl");

const contract = defineTraceContract({
  run: { requireCompleted: true },
  tools: {
    required: ["retrieve_policy"],
    forbidden: ["search_docs"],
  },
  observations: { failOn: ["failed"] },
});

const result = evaluateTraceContractRead(read, contract);
if (result.status !== "pass") process.exitCode = 1;
</code></pre>
<p>The principle is simple: use deterministic trace facts for structural CI rules, and reserve model grading for semantic quality.</p>
<h2>3. Share: derive reviewable Evidence v2</h2>
<p>A failing trace is often the best debugging artifact. It can also contain prompts, tool arguments, retrieved documents, customer identifiers, error messages, or secrets.</p>
<p>The collaboration strategy should not be “paste the raw trace into Slack.”</p>
<p>AgentInspect keeps the source trace read-only and creates a derived bundle:</p>
<pre><code class="language-bash">npx agent-inspect verify-safe &lt;run-id&gt; --dir .agent-inspect
npx agent-inspect bundle &lt;run-id&gt; --dir .agent-inspect \
  --profile share \
  --out ./evidence
npx agent-inspect bundle verify ./evidence
</code></pre>
<img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/showcase/gif/evidence-bundle.gif" alt="A terminal creates a share-checked Evidence v2 bundle and verifies its listed file hashes offline" style="display:block;margin:0 auto" />

<p>The bundle can include:</p>
<pre><code class="language-text">evidence.html          self-contained offline review surface
evidence.json          versioned manifest and SHA-256 file hashes
trace.jsonl            redacted derived trace
check-results.json     deterministic findings
redaction-report.json  detector summary without secret values
summary.md             human-readable overview
</code></pre>
<p><code>bundle verify</code> checks the manifest, listed files, hashes, assessment, and provenance offline.</p>
<p>This is an integrity check. It is not a signature or a compliance certificate.</p>
<p>The wording matters: the artifact is <strong>share-checked</strong>, not “certified safe.” <code>verify-safe</code> and redaction are best-effort controls. Review the generated HTML and safety results before attaching a bundle to a pull request, incident, or public issue.</p>
<h2>Use the capture path that matches your stack</h2>
<p>The local evidence model is not tied to one agent framework.</p>
<table>
<thead>
<tr>
<th>Your stack</th>
<th>Capture path</th>
</tr>
</thead>
<tbody><tr>
<td>Custom TypeScript functions or classes</td>
<td><code>inspectRun</code>, <code>step</code>, <code>observe</code>, or <code>createInspector</code></td>
</tr>
<tr>
<td>Vercel AI SDK</td>
<td><code>@agent-inspect/ai-sdk</code></td>
</tr>
<tr>
<td>OpenAI Agents JS</td>
<td><code>@agent-inspect/openai-agents</code></td>
</tr>
<tr>
<td>LangChain or LangGraph</td>
<td><code>@agent-inspect/langchain</code></td>
</tr>
<tr>
<td>Existing structured logs</td>
<td><code>agent-inspect logs</code> readers</td>
</tr>
<tr>
<td>OpenInference or OTLP JSON</td>
<td>local standards readers</td>
</tr>
<tr>
<td>Vitest or Jest</td>
<td>reporters plus experimental trace matchers</td>
</tr>
</tbody></table>
<p>The root package is enough for custom capture, the CLI, deterministic checks, and Evidence. Optional packages add only the integration you need.</p>
<h2>Optional: give a coding assistant the same facts</h2>
<p>The Preview MCP path exposes configured local evidence through bounded, read-only tools:</p>
<pre><code class="language-bash">npx agent-inspect mcp configure --client cursor
</code></pre>
<p>The command is a dry run by default, so you can review the generated configuration before enabling it.</p>
<p>A connected coding assistant can then investigate the same TraceFacts used by the CLI: What failed first? Which required tool was missing? What changed between the passing and failing runs?</p>
<p>This is not replay, an auto fix engine, or a hidden upload path. It is optional read-only access to explicitly configured local evidence.</p>
<h2>Where it fits—and where it does not</h2>
<p>AgentInspect owns the laptop to pull request evidence loop:</p>
<pre><code class="language-text">capture locally
→ understand the path
→ fail CI on structural drift
→ derive reviewable evidence
</code></pre>
<p>It complements hosted observability and evaluation platforms. Use hosted tools when you need production dashboards, long term retention, fleet wide alerting, team wide trace search, hosted datasets, or prompt management.</p>
<p>Use AgentInspect when you need to inspect one TypeScript agent run immediately, enforce deterministic trajectory expectations in CI, compare a passing and failing local run, or hand off a redacted, hash-verifiable artifact.</p>
<p>The boundary is intentional. AgentInspect is not:</p>
<ul>
<li><p>A maintainer hosted SaaS or production APM replacement</p>
</li>
<li><p>A hosted trace retention or prompt-management service</p>
</li>
<li><p>An LLM as judge or dataset platform by default</p>
</li>
<li><p>A replay or automatic remediation engine</p>
</li>
<li><p>A chain of thought recorder</p>
</li>
<li><p>A compliance certification tool</p>
</li>
</ul>
<h2>Try the complete loop</h2>
<p>The current release is <strong>6.17.4</strong>, requires Node.js 20 or newer, uses persisted schema <code>1.0</code>, and is MIT licensed. Legacy v0.1 and v0.2 traces remain readable.</p>
<pre><code class="language-bash">npm install agent-inspect
npx agent-inspect init --yes
node examples/agent-inspect-demo.mjs
npx agent-inspect list --dir .agent-inspect
</code></pre>
<p>Then inspect, check, and derive Evidence from the run:</p>
<pre><code class="language-bash">npx agent-inspect view &lt;run-id&gt; --dir .agent-inspect --summary
npx agent-inspect check &lt;run-id&gt; --dir .agent-inspect --preset trajectory
npx agent-inspect bundle &lt;run-id&gt; --dir .agent-inspect \
  --profile share \
  --out ./evidence
npx agent-inspect bundle verify ./evidence
</code></pre>
<ul>
<li><p><a href="https://agentinspect.vercel.app/docs/">Documentation</a></p>
</li>
<li><p><a href="https://www.npmjs.com/package/agent-inspect">npm package</a></p>
</li>
<li><p><a href="https://github.com/rajudandigam/agent-inspect">GitHub repository</a></p>
</li>
<li><p><a href="https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters/broken-agent-debugging">Keyless Debug / Prevent / Share starter</a></p>
</li>
<li><p><a href="https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters">Framework starters</a></p>
</li>
<li><p><a href="https://github.com/rajudandigam/agent-inspect/discussions">Discussions</a></p>
</li>
</ul>
<p>One local trace should be able to tell you what the agent did, prove that the regression stays fixed, and give a teammate evidence they can review without making upload the price of admission.</p>
<h2>How you can help</h2>
<p>AgentInspect is open source and MIT licensed. If this workflow is useful to you:</p>
<ul>
<li><p><a href="https://github.com/rajudandigam/agent-inspect">Star the repository</a> so more TypeScript agent developers can find it.</p>
</li>
<li><p>Try the <a href="https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters/broken-agent-debugging">keyless demo</a> and open an issue if anything feels confusing.</p>
</li>
<li><p>Add a starter or recipe for your stack.</p>
</li>
<li><p>Share a real debugging workflow you want the project to support.</p>
</li>
<li><p>Pick up a good first issue or contribute documentation.</p>
</li>
</ul>
<p>Most of all, <strong>leave a comment below</strong>. How do you debug agent runs today? Which trajectory rule would you put in CI first? And if AgentInspect does not fit your workflow, tell me why that feedback is just as useful.</p>
]]></content:encoded></item></channel></rss>