RunRecord
A RunRecord bundles one execution into a single JSON-serialisable object:
the chain snapshot, the input, the full result and the timing. MAESTRO’s
maestro replay command reads such files back (see
generate & run).
Capture a run
Section titled “Capture a run”from datetime import datetime, timezonefrom mmar_carl import RunRecord
started = datetime.now(timezone.utc)result = await chain.execute_async(context)
record = RunRecord.from_run( chain=chain, context=context, result=result, started_at=started, chain_id="my-chain", # optional chain_version="v3", # optional)from_run stores chain.to_dict(), captures outer_context and memory plus
the context metadata (dropping framework-internal __-prefixed keys), and
sets finished_at to now if you don’t pass it.
Fields
Section titled “Fields”| Field | Meaning |
|---|---|
chain_id / chain_version | Identity of the executed chain (optional). |
chain_dict | The serialized chain. Subject to the same limits as JSON serialization. |
input | outer_context, memory and context_metadata the run started from. |
result | The ReasoningResult, serialized in full form. |
started_at / finished_at | Timestamps. |
runtime_info | Library version and environment info. |
Persist & reload
Section titled “Persist & reload”record.save("runs/run-001.json")loaded = RunRecord.load("runs/run-001.json")
d = record.to_dict(); RunRecord.from_dict(d)s = record.to_json(); RunRecord.from_json(s)In MAESTRO
Section titled “In MAESTRO”The desktop app keeps its own execution receipts (chain and input digests,
a bounded per-step preview) rather than RunRecord files; see
Runs. maestro replay accepts a RunRecord file as well
as a bare ReasoningResult.