X-API-Key header set to your ENVIRONMENT_API_KEY (run uvx synth-ai setup to provision credentials).
SFT task apps serve two purposes: expose the standard HTTP interface and emit supervision data that downstream tooling can filter, validate, and upload. Document the pieces below when building a new task.
Supervised data capture
- Store each conversation as a JSONL record validated by
validate_training_jsonl/validate_jsonl_or_raise: - Honour tracing environment flags:
TASKAPP_TRACING_ENABLED: enable supervised logging.TASKAPP_SFT_OUTPUT_DIR: write JSONL batches viaunique_sft_path.TURSO_LOCAL_DB_URL/SQLD_DB_PATH: route traces to the configured store.
- Provide trace filtering knobs through
FilterConfigso tooling can query by score, model, or split before exporting to JSONL.
- Supply TOML configs that
build_sft_payloadaccepts (data paths, model allowlist, hyperparameters). - After filtering, call
FtClient.upload_training_file, then launch jobs withFtClient.create_sft_jobandFtClient.start_job.
- Expose a
TaskAppConfigwhosebase_task_info,describe_taskset(), andprovide_task_instances()fields describe the supervision dataset (task descriptors, environment ids, seeds, splits). - Ensure
rollout()responses keeppipeline_metadata.inference_urland everyinfo.meta.inference_urlin sync with a?cid=...token so traces correlate with upstream inference logs. - If you intend to host on Modal, package a Modal app script and
ModalTaskAppConfig(identical requirements to RL deployments) so traces can be collected remotely.
- /
- Method: GET
- Returns:
- /health
- Method: GET
- Returns:
- /info
- Method: GET
- Returns:
- /task_info
- Method: GET
- Query params:
seed(int, repeatable) orseeds(array[int]) - No seed returns:
- With seed(s) returns:
- /rollout
- Method: POST
- Body: RolloutRequest (used to collect supervised traces)
- Returns: