JsonFileStorage writes one events.jsonl file per run.
DuckDB can read all runs for an experiment directly; no import step or fixed table schema is required.
The examples below assume this path:
union_by_name = true because different event types have different fields.
Quote "@type" because the discriminator contains @.
Header rows have @type = 'header', so event filters exclude them.
Count tool calls
Summarize LLM usage and cost by run file
Ask DuckDB to add the source filename explicitly:Extract ordered tool sequences
Count adjacent tool transitions
Analyze derived events separately
Per-step cost attribution and step outcomes live inanalysis.jsonl, not events.jsonl.
Read that file with the same read_ndjson_auto(..., union_by_name = true) pattern.
Use the run directory or stream header for run identity, and join an analysis stepId to the execution event’s stable id when the event has one.
DuckDB reads the JSONL files directly, but Agent Journal’s Java
loadEvents and loadDerivedEvents methods currently load the requested file into memory.
Use DuckDB or another streaming data tool for large cross-run analysis.