Braintrust has added first-class tracing for AI agents built on Cloudflare, allowing developers to send OpenTelemetry data from the Cloudflare stack into Braintrust for inspection and evaluation. The integration connects application-level agent behaviour with the infrastructure events around it.
That shared view is useful because a slow or incorrect agent response rarely has one obvious cause. The issue may come from the model, a tool call, a sub-agent, token growth or the Worker that coordinates the request. Looking at those components in separate systems makes it harder to reconstruct what happened.
A trace follows the whole agent run
The integration records structured spans for the agent, model invocations, tools, sub-agents and token use, alongside Cloudflare Workers information. Developers can follow a request through the sequence instead of treating the final response as a single opaque event.
Braintrust lists support for Cloudflare Agents SDK version 0.17 and later, @cloudflare/ai-chat version 0.9 and later, @cloudflare/think version 0.13 and later, and Flue. Projects must enable the nodejs_compat compatibility flag where required.
Teams can export traces to Braintrust’s OpenTelemetry endpoint or instrument a JavaScript application directly. The exact setup differs by stack, but both routes are built on a standard telemetry format rather than a proprietary event schema.
Production examples can become test cases
Once traces reach Braintrust, developers can inspect individual runs and use selected production activity to build evaluation datasets. A failed tool selection, unusually long response or valuable edge case can become a repeatable test for the next prompt, model or code change.
This closes a common gap in agent development. Pre-release tests are usually cleaner than real conversations, while production logs are often too unstructured to reuse. Turning a trace into an evaluation example lets a team preserve the actual inputs and the relevant steps, then compare future versions against the behaviour that mattered.
Production data needs careful handling before it is reused. Organisations should define redaction, retention and access policies for prompts, tool inputs and model outputs, particularly where agents process personal or confidential information.
Observability does not replace evaluation design
A detailed trace explains the path an agent took, but teams still need criteria for whether that path was good. Evaluations might measure task completion, factual support, tool choice, latency, token use or adherence to a workflow. The appropriate score depends on the agent’s role.
It is also important to distinguish infrastructure reliability from model quality. A tool timeout and a confidently wrong model response may look equally unsuccessful to a user, yet require different fixes. The combined trace helps separate them, provided teams add useful metadata and consistent error handling.
A practical bridge between two platforms
For organisations already building agents on Cloudflare and using Braintrust for evaluation, the native integration reduces custom instrumentation work. New adopters should confirm supported package versions, regional telemetry routing, pricing for trace volume and the effect of instrumentation on latency.
The release reflects a broader shift from monitoring only the final output to observing an agent’s decisions and dependencies. As agent workflows add more tools and delegated tasks, that level of visibility becomes less of a debugging convenience and more of an operating requirement.