Instrumented apps
If the app is instrumented with Laminar (it callsLaminar.initialize()), there’s nothing to convert. During a run, the plugin sets LMNR_TRAJECTORY_PATH=/logs/agent/trajectory.json in the agent env. With it set, the SDK writes the app’s spans to that file instead of sending them to Laminar, and the plugin attaches them to the trial’s trace: every LLM call with tokens and cost, and tool calls as TOOL spans. The app needs no Laminar API key and no network access to Laminar. This works with the Python SDK (lmnr 0.8.4 and later); TypeScript SDK support is in progress. Make sure the app process actually receives LMNR_TRAJECTORY_PATH, especially if the start script uses env -i.
If the app isn’t instrumented yet, adding Laminar is a small production change that also gives you production traces. See Tracing.
Apps without instrumentation
If it isn’t instrumented, reconstruct the trajectory from the app’s own history. Most products already store the conversation for their UI, for audit, or as agent memory: message tables, run and step tables, LangGraph checkpointers, JSONL transcripts. After the driver finishes, including onfailed and timeout since partial trajectories are the most useful, run an exporter that reads this case’s history and writes /logs/agent/trajectory.json in Harbor’s ATIF format:
- Each message is a step with a sequential
step_id(1, 2, 3…), asource(system,user, oragent), amessage, and an ISO 8601timestamp. model_name,tool_calls, andmetricsare only allowed onagentsteps. Tool results go in that step’sobservation.results, paired bysource_call_id.- History seeded from
case.jsongetsis_copied_context: true, so it’s shown but not mistaken for the agent’s work. - Leave
metricsunset rather than estimating: stored history usually lacks token counts, costs, and the exact prompt of each call. Say where the trajectory came from innotes.
Next steps
Write the agent and verifier
Drive the entry point, wait for a terminal state, and grade the result.
Read a failing trial
Open a low-scoring datapoint and read the app’s run as a transcript.
Track failures with Signals
Detect a failure in production traces, then turn the flagged traces into cases.
Troubleshooting
Fixes for stale images, missing env vars, and empty traces.