Skip to content

The run log

Every run writes one JSONL file: one event per line, each with seq, ts and type (SPEC-003, schema runlog.schema.json).

Event Holds
run_start log version, run id, seed, world, agents (with seeds and capabilities), limits, scenario hash, versions
turn_start step and who acts
observation what one agent saw
action the action and optional reasoning
usage tokens, cost, provider and model as reported, running total
message / message_dropped chat between agents, and messages that were refused
step_result whether the move was legal, rewards, info
provider_error / agent_error backend failures (never a forfeit) and bad replies (count as illegal)
warning for example an agent whose cost is unknown
forfeit, limit_hit why a run stopped early
run_end reason, outcome, steps, total cost, duration

Check a log in Python:

from agentplaykit.core import read_log, validate_log

print(validate_log("runs/tic-tac-toe-demo-7.jsonl"))  # [] means valid
log = read_log("runs/tic-tac-toe-demo-7.jsonl")
print(log.complete, log.events[-1]["outcome"])

The same config, seed and agent replies give the same log, apart from timestamps, run id, duration and versions; a golden-log test pins the format.