How data moves between steps
Two places hold data, and one rule governs what an agent can see:- The entity is the durable store. Write to it with
data_accumulation(the step that records fields on the entity; unrelated toaccumulate); read it anywhere withentity.*. Entity fields persist across handlers, so a value written when the ticket was created is still readable when a later event arrives. - The emitted payload is how a handler hands data to the next subscriber. You build it with
emit.fields. It is neither the entity nor the triggering event: you populate it explicitly. - An agent sees only the payload of the event delivered to it, never the entity directly. So that payload is the contract for what the agent can act on. If a resolver agent needs the ticket body, the event that reaches it must carry the body.
data_accumulation records what matters on the
entity, and emit.fields reads from the entity to populate the next event.
What goes in a handler
A handler is written roughly in this order, and each part is its own page:Getting the entity
create_entity, select_entity, select_or_create_entity: how a handler gets the entity it
acts on.Guards
guard, check, and on_fail: only proceed when a condition holds.Writing data and advancing state
data_accumulation, advances_to, sets_gate, clear_gates.Emitting events
emit and emit.fields: populate and send the next event.Branching
on_complete and rules: take different paths.Accumulation and computation
accumulate, compute, filter, reduce, count, fan_out, query.Actions
create_flow_instance, record_evidence, mailbox_write, artifact_repo_commit.
