Skip to content
shimmer/docs
Capture traces

Capture and inspect traces

Bring real agent behavior into Shimmer and follow every message and tool call.

On this page

Start with real interactions that represent the behavior you want to protect. Include ordinary successes, difficult inputs, and known failures.

Import a LangSmith export

Open Traces and use the upload control, or drag a LangSmith JSON export onto the trace list. Shimmer imports the payload and shows a summary in the list.

Import the complete interaction, including the child runs that contain model and tool activity. Missing children can leave the trace without the context needed to understand what happened.

Each upload creates a new Shimmer trace ID. Re-importing an export does not update the previous import.

Upload a native Shimmer trace

Agents can construct Shimmer's normalized event format directly, without a LangSmith export. Save the interaction as trace.json:

json
{
  "events": [
    { "kind": "user", "content": "Track my order" },
    {
      "kind": "tool_call",
      "callId": "call_1",
      "name": "get_order",
      "arguments": { "id": "123" },
      "result": { "status": "shipped" }
    },
    { "kind": "assistant", "content": "Your order shipped." }
  ]
}

Create the trace with the CLI:

terminal
shimmer traces create trace.json --source shimmer

The command returns the full trace ID as JSON. Add --name 'Order lookup' to give the trace a display name, or use - in place of the filename to read JSON from stdin.

Add the saved trace to a suite in a separate step:

terminal
shimmer suites list
shimmer suites cases add SUITE_ID --trace-id TRACE_ID

Use the full trace ID returned by trace creation. Use the full suite ID returned by shimmer suites list. If adding the test case fails, retry that command without uploading the trace again.

The payload must contain an events array. Supported event kinds are user, assistant, and tool_call; null events are rejected. Empty arrays are accepted. Omit result from a tool call when its result was not captured.

Inspect an interaction

Open a trace to read its ordered events. Follow the user request through the assistant’s decisions, tool calls, returned results, and final answer.

Check more than the final response. Tool names, arguments, and results often explain why an apparently reasonable answer hides a regression.

A small change. A very different outcome.EXAMPLE
BASELINE

Issue a refund for my $42 order.

refund_order
{ "amount": 42 } Expected amount
CANDIDATE

Issue a refund for my $42 order.

refund_order
{ "amount": 420 }Changed tool argument

Collect traces from a test run

The Python runner collects LangSmith-instrumented activity during your test’s run method and uploads the result to Shimmer.

With the package installed, enable tracing before starting the CLI:

terminal
LANGSMITH_TRACING=local shimmer suites run refunds \
  --path harness

This captures local traces without uploading them to LangSmith. See the LangSmith integration for a complete instrumentation example.

Turn a trace into a case

Use the suite picker to add the trace to an existing suite or create a new suite. Choose a meaningful name and add evaluation criteria to the source trace.

Removing suite membership keeps the original trace. Deleting a source trace can make historical comparisons that reference it unavailable, so keep baselines you still need.