sim_platform.research.attribution

Decision attribution: which reads, model replies and notes led to each order.

An Agent run’s log records every tool call in order, grouped into work rounds (one round per scheduled turn). decision_timeline lays the rounds out step by step and links each order to the steps of its round that came before it: the data it read, the model replies and the journal notes, plus the notes written later in the same round (often the stated reason). Fills come from the run’s recorded events.

Attribution is by order of events within a round, not by causation: a read listed before an order is evidence the Agent had that information, not proof it used it.

sim_platform.research.attribution.decision_timeline(archive, events)[source]

Rounds of Agent work and, for each order, the steps that preceded it.

Parameters:
  • archive (Dict[str, Any] | None) – The run’s archived Agent log (Platform.agent_log_archive).

  • events (List[Dict[str, Any]]) – The run’s recorded events (Platform.run_events).

Returns:

{'rounds': [...], 'orders': [...]}. Each round has work_id, started_ns, reason and steps (ordinal, time_ns, kind of ‘read’, ‘model’, ‘order’, ‘journal’ or ‘control’, tool, arguments, status, summary). Each order has order_id, tool, time_ns, summary, status, work_id, reads and model_replies (steps before it in its round), notes_before and notes_after (journal text in its round) and fills (time_ns, quantity, integer price in ten-thousandths of a dollar, fee).

Return type:

Dict[str, Any]