CORE BUILDING BLOCKS

Trace Viewer

Inspect saved or live multi-agent Runs in a zero-dependency browser UI — zoomable swimlanes, Service handoffs, model contexts, and exported files.

RECORDED RUN · INTERACTIVE REPLAY
Wheel to zoom · Drag to pan · Hover for timing · Click any span to inspectp-limit · Subagents

Standard Harness sessions save a Run report, and each Runtime they create writes its own structured trace. The built-in Trace Viewer (anyswarm trace) lets you inspect recorded Runtime activity right in your browser with zero extra frontend dependencies. A Harness can finish or fail before creating a Runtime; see the version note below for viewing that report.

The widget replays a saved Subagents run on p-limit at a8a6fbec. Root and two children ran in isolated OpenSandbox containers using Pi. The public replay selects input, model, and Service metadata from that run while omitting private Runtime files.

Open Files & Results for the exported report.md and its SHA-256 checksum. Generic Subagents records acceptance as not-run, so always assess report conclusions against the source.

Try the controls without installing anything.

  • Switch panels cleanly: use the outer bar above to switch between Swimlane Timeline, Recorded Events, and Files & Results, or click Open full viewer ↗ for the Run sidebar and search.
  • Zoom & pan: scroll your mouse wheel over the swimlanes to zoom around your cursor, drag the swimlanes or overview minimap to pan, or press W/S (zoom), A/D (pan), and 0 (fit).
  • Hover & inspect: hover any span for recorded timing and metadata; click any bar to open the slide-over Evidence Inspector (Structured or Raw JSON).

1. Launch anyswarm trace locally

The standard CLI and createHarnessSession() default to ${XDG_STATE_HOME:-$HOME/.local/state}/anyswarm/runs. From a project with the SDK installed, point its local CLI at that directory:

# Inspect the standard Harness output root
./node_modules/.bin/anyswarm trace --root "${XDG_STATE_HOME:-$HOME/.local/state}/anyswarm/runs" --port 8787 --open

# If the Run explicitly used --output-dir ./runs or outputRoot: './runs'
./node_modules/.bin/anyswarm trace ./runs --port 8787

With a global installation, use anyswarm in place of ./node_modules/.bin/anyswarm. --output-dir on the CLI and outputRoot on a Harness session override the default. If the default directory is unavailable or falls inside the captured workspace, the Harness may use a private temporary directory. Follow the actual printed replay command, or pass the directory containing the saved reportPath as --root.

Open http://127.0.0.1:8787. Trace Viewer reads saved files and needs no Docker, OpenSandbox, or model keys. --port 0 chooses an available port; use the URL printed at startup. A selected Runtime receives live updates over SSE as new records arrive.

Automatic Run discovery

  • anyswarm trace without a root uses the standard Harness state directory. A missing directory enters a waiting state and displays the path being watched.
  • The visible page checks for new Runs about every two seconds. List updates preserve the selected Run, filters, time window and keyboard focus. Read errors keep the last successful list visible with an error message.
  • A valid project-run.json can be opened when no matching Runtime association is confirmed. Files & results shows its recorded outcome, reason, failure, result, verification, export and cleanup facts. The gap explains missing identities, unavailable records or an association that cannot be confirmed; it does not imply that no Runtime exists elsewhere. The Viewer does not invent Agent counts, timelines, costs or durations. A consistent, unique Runtime association provides an explicit link.

2. Viewing runs on a remote Linux server (SSH)

Because sandboxes run on a Linux host while your browser is usually on a laptop, bind to loopback (127.0.0.1) and forward over SSH:

# On the Linux host
anyswarm trace --root /path/to/runs --port 8787

# On your laptop, reuse your normal SSH destination and options
ssh -N -L 8787:127.0.0.1:8787 user@your-linux-host

Then open http://127.0.0.1:8787 locally. Keep Run traces private behind SSH — they contain prompts, code, and full transcripts.

3. Saved reports and Runtime files

A standard Harness saves project-run.json at <root>/<runId>/. When it uses that directory as its Runtime output root, the Runtime files are under <root>/<runId>/<runtimeId>/.

Direct SDK calls to createRuntime() still require an explicit outputDir and write to <outputDir>/<runtimeId>/. Open those records with ./node_modules/.bin/anyswarm trace --root <outputDir>; the Harness state-directory default does not choose a direct SDK output directory. The following paths are relative to a Runtime directory:

Path Contents
runtime.json Effective configuration, Agent summary, and final CloseReceipt (cleanup: complete | pending)
evidence.jsonl Ordered host lifecycle ledger (spawn, input, settled, interrupt, stop, management)
service-calls.jsonl Every Bridge-authenticated Service call with validated input, reply, timing, and errors
service-states.jsonl Service export identities, framework export windows, statuses and file references
service-state.<id>.<uuid>.json Optional public state exported on close or retirement, plus Service-provided capture facts and display hints
model-trace/ Raw forwarded Responses or Chat Completions requests and streamed responses from Model Gateway
<agentId>/session/ & artifacts/ Archived Pi / Codex native sessions and files collected via Profile.collect
harness-report.json Business outcome and verification report, when written by the Harness

Open Service states in the Run header or select a Service call to inspect its exported state. The inspector shows export status, instance identity and the framework export window. Service capture time and business revision appear only when the Service supplies them. Missing hooks, failed exports, truncated content and missing files have distinct statuses. The recorded close/retirement snapshot retains its own observation window beside an earlier call. A Service can provide a data-only summary or table, and the original JSON remains available. The persistent Board example supplies a count and an Entries table. Run the Board example.

In Files & results, opening an archived file with a recorded SHA-256 checks that version. Load next 64 KB continues from the prior byte boundary, and Copy includes all currently loaded text. A website replay may end its file preview before the original file ends. Open the original Run in the installed Viewer to inspect the remaining bytes.

4. Search a long Run

The header’s Model / Service / Tool counts cover the full Run, even when the timeline displays a smaller range. Each model request, Service attempt or tool execution counts once; its start and end records are not two calls. Historical Runs without native tool boundaries use archived Session tool results, including results without timestamps.

The timeline draws up to 1,000 entries at a time. Pan or zoom to load a different time range. Use Search full Run: names or IDs… to find a tool, Service operation, Agent, model name, or request/operation ID anywhere in the Run, then select a result to load its time range and inspect its evidence. In Events, the same search combines with Agent and type filters before pagination. The matching count covers all pages.

Search is case-insensitive and limited to names and IDs, including the input.tool name inside a generic Service invoke call. It does not download or scan full prompts, tool arguments or SSE responses. Select the original record to inspect those bodies. Follow live updates active searches when new records arrive. A record without a timestamp remains searchable and inspectable without being assigned an inferred time.


Next: see all six SDK building blocks come together in the AutoResearch Flagship Walkthrough!

Inspect configuration, failures and shared evidence

Open an Agent to inspect its Profile intent, recorded spawn overrides, resource hashes and executor configuration observations. Each observation links to its original record. Startup evidence remains visible alongside the 100 most recent other configuration records. The startup prompt hash identifies the parameter submitted for that Agent. If the Runtime recorded a local Worker build, the Agent inspector also shows its image ID, executor version and build fingerprint. Saved model requests have their own evidence. Open a model request to see Responses instructions/input or Chat messages, reasoning, tool schemas, actual token-limit fields and before/after differences. Large records show a truncation notice and offer the original file in bounded ranges.

The header keeps application outcome, Runtime state, cleanup and the last recorded activity visible. Expand the failed/unknown list to jump to original evidence across pages and time windows. In Files & results, inspect application verification, export status, pending cleanup receipts and artifact availability separately.

When the Harness explicitly supplies member mapping, Member groups merges instance activity into stable member lanes. Click a group to expand its instance lanes or switch to Instances. Collaboration retains original UUIDs, creation/replacement observations, known reasons and evidence. Application-declared publication, reading, adoption and acceptance keep their own fact labels and object versions. Missing evidence appears as a gap.

Use Copy link in the inspector to share the selected evidence with its Run, panel, filters and time window. Refresh, Back and Forward restore that position. The recipient needs access to the same Viewer and Run files. Free-text searches stay in your browser history for refresh, Back and Forward. The shared address carries the structured filters and evidence identity. When a handoff file is opened, the Viewer checks its current SHA-256. Missing files and changed versions appear as evidence gaps alongside the historical acceptance.