pub struct LedgerRow {
pub ts: DateTime<FixedOffset>,
pub partition: String,
pub agent: String,
pub kind: String,
pub effect: Option<String>,
pub duration_ms: Option<u64>,
pub subject_hash: Option<String>,
pub meta: Map<String, Value>,
pub trace_id: Option<String>,
}Expand description
One row of an exported activity ledger, with the columns of spec 3.2 §7.10.
A ledger is content-free: a row records what kind of thing happened, when, for how long and to which hashed subject — never a payload, a prompt or a secret. An export is one camelCase JSON object per line; fields this type does not know are ignored.
{"ts":"2026-10-22T19:20:04+03:00","partition":"work","agent":"assistant","kind":"tool_call","effect":"read_only","durationMs":182,"subjectHash":"hmac-sha256:5f2c…","meta":{"attempt":1},"traceId":"4bf92f35…"}§Example
use adk_eval::ledger::LedgerRow;
let row: LedgerRow = serde_json::from_str(
r#"{"ts":"2026-10-22T19:20:04+03:00","partition":"work","agent":"assistant","kind":"wake"}"#,
)
.unwrap();
assert_eq!(row.kind, "wake");
assert_eq!(row.duration_ms, None);Fields§
§ts: DateTime<FixedOffset>When the row was written, RFC 3339 with the offset of the user’s local time; its day and time of day are read in that offset.
partition: StringThe partition the activity belongs to.
agent: StringThe agent that acted.
kind: StringWhat happened: intent, tool_call, approval, rejection, observation, wake,
proposal, or another kind the kernel defines.
effect: Option<String>The effect class of the action, such as read_only.
duration_ms: Option<u64>How long the action took.
subject_hash: Option<String>An HMAC of the action’s subject, never the subject itself.
meta: Map<String, Value>Small, schema-checked metadata; numbers only feed the statistics.
trace_id: Option<String>The trace the row belongs to.