Skip to main content
The harbor traces command group provides utilities for exporting agent trajectories from trials to datasets for analysis, sharing, and training.

Commands

harbor traces export

Export agent trajectories from trial directories to a Hugging Face dataset.

Options

Path
required
Path to a trial directory or a root containing trials recursively.
boolean
Search recursively for trials under path. Default: --recursive
string
Export all episodes or only the last episode per trial. Options: all, last. Default: all
boolean
Also emit ShareGPT-formatted conversations column. Default: --no-sharegpt
boolean
Push dataset to Hugging Face Hub after export. Default: --no-push
string
Target Hugging Face repo id (org/name) when --push is set. Required when using --push.
boolean
Print discovery details for debugging. Default: --no-verbose
string
Filter trials by result: success, failure, or all. Default: all
boolean
Export subagent traces. Default: --subagents
boolean
Include instruction text for each row when available. Default: --no-instruction-metadata
boolean
Include verifier stdout/stderr blobs when available. Default: --no-verifier-metadata

Examples

Export traces from a job directory:
Export and push to Hugging Face:
Export only successful trials:
Export only failed trials:
Export only last episode per trial:
Export with ShareGPT format:
Export with metadata:
Export from a single trial:

Trajectory Format (ATIF)

Harbor uses the Agent Trajectory Interchange Format (ATIF) to represent agent executions. Trajectories are stored as trajectory.json in trial directories.

ATIF Structure

Agent Support

Agents that support ATIF export (set SUPPORTS_ATIF = True):
  • claude-code
  • opencode
  • More agents being added…
Other agents may not generate trajectory files.

Dataset Schema

Exported datasets include:

Core Fields

  • trial_name: Unique trial identifier
  • task_name: Task identifier
  • agent_name: Agent used
  • model_name: Model used (if applicable)
  • episode_id: Episode identifier
  • trajectory: ATIF-formatted trajectory
  • reward: Trial reward (0.0-1.0)
  • success: Boolean success indicator

Optional Fields

  • conversation: ShareGPT format (if --sharegpt)
  • instruction: Task instruction text (if --instruction-metadata)
  • verifier_stdout: Verifier output (if --verifier-metadata)
  • verifier_stderr: Verifier errors (if --verifier-metadata)

ShareGPT Format

When --sharegpt is enabled, each row includes a conversation column:
This format is compatible with many fine-tuning pipelines.

Subagent Traces

When --subagents is enabled (default), the export returns a dictionary with:
  • main: Dataset of main agent traces
  • subagent_name_1: Dataset of subagent 1 traces
  • subagent_name_2: Dataset of subagent 2 traces
  • etc.
When --no-subagents, only the main dataset is returned.

Use Cases

Training Data Collection

Collect successful agent traces for training:

Failure Analysis

Analyze failed attempts:

Reinforcement Learning

Export all traces for RL:

Benchmark Sharing

Share evaluation results:

Integration with Jobs

You can export traces automatically after job completion:
See harbor run for all trace export options.

Examples

Export from Multiple Jobs

Filter and Export

Export for Analysis

See Also