# Turn production agent traces into datasets

The best seed material often comes from real agent runs. DataSmith ingests OTLP JSON and span JSONL locally for training export. AgentClash imports traces into workspace datasets for eval baselines and CI gates.

Source: https://www.agentclash.dev/trace-to-dataset
Markdown export: https://www.agentclash.dev/md/trace-to-dataset

## Two paths from traces

Training teams use DataSmith ingest-otel for SFT and DPO pipelines. Platform teams use AgentClash trace import to promote production failures into regression coverage.

- Use the documented OpenTelemetry trace import to create dataset candidates.
- Remove sensitive content, establish expected outcomes and pin useful cases.

## How can a trace become an eval candidate?

Use OTel trace import as described in dataset/trace documentation, review and pin resulting cases.

Trace content can contain sensitive data and does not automatically provide ground truth

## Trace ingestion workflow

### 1. Import a trace

Use the documented OpenTelemetry trace import to create dataset candidates.

### 2. Review and pin

Remove sensitive content, establish expected outcomes and pin useful cases.

## Ingest traces

Start with one exported trace bundle, convert to seeds or candidates, then expand with Agentic Self-Instruct generation.

- [Datasets overview](https://www.agentclash.dev/docs/guides/datasets-overview): Learn about dataset creation and trace imports.
- [Tools network and secrets](https://www.agentclash.dev/docs/concepts/tools-network-and-secrets): Review tool, network and secret configuration.
- [DataSmith OTLP docs](https://github.com/Atharva-Kanherkar/datasmith/blob/main/docs/otel.md): Local trace ingestion reference.
- [Synthetic data generation](https://www.agentclash.dev/synthetic-data-generation-agents): Expand seeds with weak-vs-strong generation.
- [Agent regression testing](https://www.agentclash.dev/platform/agent-regression-testing): Gate releases on trace-derived coverage.
- [Dataset CI gates](https://www.agentclash.dev/docs/guides/dataset-ci-gates): Fail builds when a candidate regresses against a pinned baseline.
- [Agent evals](https://www.agentclash.dev/agent-evals): Real-task agent evals with replay evidence and CI gates.
- [LLM agent evaluation](https://www.agentclash.dev/llm-agent-evaluation): Evaluate LLM agents on full trajectories, not one-shot answers.
- [Compare tools](https://www.agentclash.dev/compare): See how AgentClash differs from prompt-eval platforms.

## Trace to dataset FAQ

### What trace formats does DataSmith support?

OTLP JSON exports and flattened span JSONL. See the DataSmith docs/otel.md guide for field expectations.

### Does AgentClash import the same traces?

AgentClash supports OTel-compatible trace import into workspace datasets for eval and regression workflows, complementary to DataSmith training export.

### Should traces become seeds or finished examples?

Usually seeds. Run Agentic Self-Instruct afterward to expand grounded, judge-filtered examples rather than training on raw spans alone.