pub struct Lineage {
pub root_agent_id: Option<AgentId>,
pub parent_agent_id: Option<AgentId>,
pub team_id: Option<String>,
pub org_id: Option<String>,
pub delegation_reason: Option<String>,
pub spawned_by_tool: Option<String>,
pub depth: Option<u32>,
}Expand description
Optional agent-topology fields attached to an AuditEntry.
All fields are None for entries emitted without an AgentContext
(legacy path). Lineage::default() passed to
AuditEntry::new_with_lineage produces a hash identical to
AuditEntry::new with the same base fields.
Fields§
§root_agent_id: Option<AgentId>Root agent identifier at the top of the delegation chain.
parent_agent_id: Option<AgentId>Identifier of the agent that directly spawned this agent.
team_id: Option<String>Team identifier associated with the agent that produced the entry.
org_id: Option<String>AAASM-2008 — organization identifier of the agent that produced the
entry. Mirrors team_id but at the multi-tenancy tier so audit logs,
compliance exports, and operator queries can filter / scope by Org.
Present when the gateway can resolve org_id from the agent’s
registration metadata; None for entries emitted without an
AgentContext or registered without org metadata.
delegation_reason: Option<String>Human-readable reason the action was delegated to this agent.
spawned_by_tool: Option<String>Name of the tool or framework that spawned this agent (e.g. "langgraph").
depth: Option<u32>Delegation depth from the root agent (0 = root, 1 = first delegate, …).