Skip to content

Product / Agents

From agent traces to tested harness improvements

Richer agent evidence, step-linked diagnosis, reviewed regression experiments, and recorded-tool replay with bounded harness optimization in DriftRail.

By DriftRail ·

An agent can finish without solving its task. A tool can return successfully while the agent makes the wrong decision. And a lower token bill tells you little if the result is less useful.

DriftRail’s Agents section now connects the execution record to the work of improving it. Four additions help teams capture better evidence, investigate failures, turn a reviewed example into a regression test, and compare harness changes before activation.

Capture the work with less setup

Both JavaScript SDKs now include tool and model wrappers, with explicit run handles available in the browser and async context in Node. Wrap the functions your agent already calls, rather than rebuilding its orchestration around a new runtime. A downloadable setup skill helps coding agents install the right package, keep credentials on the server, and verify the first trace.

For teams already exporting telemetry, DriftRail’s versioned OTLP JSON mapping recognizes supported OpenTelemetry GenAI and OpenInference fields. Agent identity and version, conversation and tool-call IDs, instrumentation scope, model usage, and error evidence stay attached to the trace. Tool arguments, results and message content require explicit capture opt-in. Captured attributes use the existing encrypted payload storage and redaction rules.

See the evidence behind a diagnosis

Open a run’s Diagnosis tab to inspect observed failures and versioned harness checks. Each finding links to the steps that support it. Checks can verify a captured field, compare a result against an expected value, or bound a text response. Repeated tool inputs appear as an inferred pattern to review.

The distinction matters: an observed error is evidence, while repeated calls may simply be intentional polling. DriftRail labels those cases separately. Missing content makes a check unavailable instead of silently passing it. Coverage shows captured tool inputs, unavailable checks and missing parent steps. The first observed failure is a starting point for investigation, not a claim of proven root cause.

Turn a reviewed issue into a comparable experiment

Use Prepare improvement from a run’s Quality tab or from Feedback & Issues. Review the source task, supply its expected result, and edit a new candidate harness version. DriftRail creates an immutable regression snapshot plus baseline and candidate experiments using the same cases, evaluator version, trial count and release checks.

The operation is atomic and safe to retry: a lost response cannot leave duplicate snapshots or a half-created comparison. Existing harness versions stay immutable. Your team runs the experiments in its own application or CI and reviews the results in the dashboard. Preparing an improvement never changes the agent that serves production traffic.

Recorded-tool replay lets you reuse captured tool results when testing a harness change. Download a recording from Diagnosis and pass it to the experiment runner. Instrumented tool calls must match a recorded name and JSON input. An unmatched call fails instead of falling through to the live tool. Incomplete, redacted or ambiguous recordings are rejected before execution.

Replay does not reproduce the entire environment. Model calls still execute, and code outside the instrumented wrappers remains your responsibility. Replay measurements are labeled separately because recorded tools exclude live tool execution cost and latency.

For a broader search, both SDKs expose a bounded reflective optimization runner inspired by GEPA. Supply your task, versioned evaluator and proposal function. The proposer receives training evidence, suggests changes to allowed harness fields, and evaluates up to five proposal rounds. Each candidate receives a new immutable version.

The runner selects on training results, then evaluates the selected candidate against a separate held-out snapshot. It rejects overlapping inputs, case IDs and source runs before starting. Recommendations require complete scored validation, passing configured checks and measured success that does not fall below the held-out baseline. Sample size and evaluator quality remain part of the review. There is no automatic activation and no guaranteed improvement.

Start with one real task

Update to @drift_rail/sdk@2.6.0 or @drift_rail/browser@2.4.0, then open Agents → Runs. Capture one safe representative task, inspect its evidence, and prepare a reviewed case before expanding your evaluation dataset.

Token usage and catalog cost estimates remain visible beside execution and outcome evidence. Unknown costs stay unknown. Optional measured-cost limits stop optimization between experiments; they do not impose a hard spending cap or include external proposer and evaluator calls.

Read the tracing, replay and optimization guide →

Start with evidence

Make the next harness change reviewable.

Open Agents ↗Read the setup guide →