traces/v3/synth_ai.db). The uvx synth-ai filter command turns those traces into SFT-ready JSONL samples that match the schema used by validate_jsonl_or_raise.
Need CLI specifics? See Filter Traces for flag-by-flag details.
Example filter config
configs/filter.toml (the repository ships examples under examples/task_apps/**/filter_sft_dataset.toml).
Run the filter
- Validates the TOML via
FilterConfig(fails fast if fields are missing or mis-typed). - Reads candidate sessions from the trace database (local file path or
sqlite+aiosqlite://URL). - Applies score, metadata, and model filters.
- Writes SFT records to the
outputpath—one JSON object per line withmessages[], optionaltools[], andmetadata.
Inspect the output
--no-poll flag returns immediately after validation—perfect for agents that want to gate subsequent steps on clean data.
When you’re ready to launch a full run, refer to Launch Training Jobs.
Tip: the CLI automatically loads secrets from the .env written during setup. Use --env-file only when you need to point at an alternate environment.