Agents, Workers - Cloudflare Agents: trace every model call, tool run, and decision
- Announced
- Tags
- Agents, Workers
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-08-04-agent-tracing/
<p><a href="https://dash.cloudflare.com/?to=/:account/agents" target="_blank" rel="noopener">Cloudflare Agents<span class="external-link"> ↗︎</span></a> now has a dedicated home in the Cloudflare dashboard that lists your traced agents and subagents.</p> <p>Select an agent to inspect its traces in two ways:</p> <p><strong>Replay a session</strong> assembles the full conversation for a turn: system instructions, user messages, model reasoning, tool calls with arguments and results, and the final response.</p> <img src="https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=1980,height=1352,format=webp/_astro/agent_tracing_session_replay.uwseMu6e.png" alt="Session replay showing messages, reasoning, and subagent tool calls" loading="lazy" decoding="async" width="1980" height="1352"> <p><strong>View a trace</strong> shows the execution timeline, connecting agent operations to Workers infrastructure so you can see where time was spent.</p> <img src="https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=2832,height=1290,format=webp/_astro/agent_tracing_waterfall.Bw-JYiiV.png" alt="Trace waterfall showing nested agent, model, tool, and D1 spans" loading="lazy" decoding="async" width="2832" height="1290"> <p>Enable tracing in your Wrangler configuration:</p> <div data-nb-tabs data-nb-sync-key="wranglerConfig" class><div class="relative flex border-b border-border" role="tablist" data-nb-tabs-list><span class="bg-primary pointer-events-none absolute -bottom-px h-0.5 rounded-t-sm transition-[left,width] duration-200 ease-out" data-nb-tabs-indicator aria-hidden="true"></span></div><div class="mt-3"><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="wrangler.jsonc" class><figure class="nb-code-figure" data-nb-lang="jsonc"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="jsonc" data-nb-lang="jsonc"><code><span class="line"><span class="nb-shiki-140thh">{</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "observability"</span><span class="nb-shiki-140thh">: {</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "enabled"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-dzsirb">true</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "traces"</span><span class="nb-shiki-140thh">: {</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "enabled"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-dzsirb">true</span></span> <span class="line"><span class="nb-shiki-140thh"> }</span></span> <span class="line"><span class="nb-shiki-140thh"> }</span></span> <span class="line"><span class="nb-shiki-140thh">}</span></span></code></pre></figure></div><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="wrangler.toml" class><figure class="nb-code-figure" data-nb-lang="toml"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="toml" data-nb-lang="toml"><code><span class="line"><span class="nb-shiki-140thh">[</span><span class="nb-shiki-1t8gfj">observability</span><span class="nb-shiki-140thh">]</span></span> <span class="line"><span class="nb-shiki-140thh">enabled = </span><span class="nb-shiki-dzsirb">true</span></span> <span class="line"></span> <span class="line"><span class="nb-shiki-140thh"> [</span><span class="nb-shiki-1t8gfj">observability</span><span class="nb-shiki-140thh">.</span><span class="nb-shiki-1t8gfj">traces</span><span class="nb-shiki-140thh">]</span></span> <span class="line"><span class="nb-shiki-140thh"> enabled = </span><span class="nb-shiki-dzsirb">true</span></span></code></pre></figure></div></div></div><script type="module" src="https://developers.cloudflare.com/home/runner/work/cloudflare-docs/cloudflare-docs/src/components/ui/tabs/Tabs.astro?astro&type=script&index=0&lang.ts"></script> <div tabindex="-1" class="heading-wrapper level-h4"><h4 id="framework-support">Framework support</h4><a class="anchor-link" href="#framework-support"><span aria-hidden="true" class="anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span></a></div> <p>Think and Flue agents are instrumented automatically. For direct AI SDK calls, wrap the namespace with <a href="https://developers.cloudflare.com/agents/runtime/operations/observability/tracing/#ai-sdk"><code>wrapAISDK()</code></a>. Custom harnesses can use the <a href="https://developers.cloudflare.com/workers/observability/traces/custom-spans/">Workers custom spans API</a> with <a href="https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/" target="_blank" rel="noopener">OpenTelemetry Generative AI semantic conventions<span class="external-link"> ↗︎</span></a>.</p> <div tabindex="-1" class="heading-wrapper level-h4"><h4 id="get-started">Get Started</h4><a class="anchor-link" href="#get-started"><span aria-hidden="true" class="anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span></a></div> <p>Check out the full blog post: <a href="https://blog.cloudflare.com/agents-on-cloudflare" target="_blank" rel="noopener">Introducing: Cloudflare Agents<span class="external-link"> ↗︎</span></a>.</p> <p>For setup details, refer to the <a href="https://developers.cloudflare.com/agents/runtime/operations/observability/tracing/">Agent tracing documentation</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.