The artifact subsystem uses three layers of metadata:
This is the full per-run truth.
Use it when you need:
- complete prompt details
- full input/output asset records
- provider trace paths
- warnings/errors/defaults
- derivative settings
- source metadata and source context
This is the per-run summary for fast browsing.
It now includes:
run_idcreated_atstatusmodel_keytask_modehero_originalhero_output_pathhero_webhero_thumbprompt_summarytagsinput_countoutput_counthas_videohas_imageduration_secondsrun_folder
Use it for:
- dashboard cards
- quick previews
- list views
- lightweight run summaries
This is the cross-run summary layer.
Each line is one RunIndexEntry.
It is intentionally compact but dashboard-friendly:
run_idcreated_atstatusmodel_keytask_modetagsprompt_summaryhero_originalhero_outputhero_webhero_thumbinput_countoutput_counthas_videohas_imageduration_secondsrun_path
append_run_index(...) is duplicate-safe by run_id.
If a matching run_id already exists in index.jsonl, the helper does not append a second copy.
If outputs/index.jsonl is missing or stale:
from kie_api import rebuild_run_index
rebuild_run_index()This rescans artifact folders, loads run.json and manifest.json, rebuilds the index, and writes a fresh index.jsonl.
run.json: archival truthmanifest.json: per-run browse summaryindex.jsonl: cross-run browse/query summary
This is filesystem-only and intentionally simple. It is designed so a future dashboard or agent can list and filter runs without loading every run.json manually.