#[non_exhaustive]pub enum GraphEvent {
Show 18 variants
UserMessage {
content: Vec<ContentPart>,
timestamp: DateTime<Utc>,
},
AssistantMessage {
content: Vec<ContentPart>,
usage: Option<Usage>,
timestamp: DateTime<Utc>,
},
ContextCompacted {
dropped_chars: usize,
retained_chars: usize,
timestamp: DateTime<Utc>,
},
ToolCall {
id: String,
name: String,
input: Value,
timestamp: DateTime<Utc>,
},
ToolResult {
tool_use_id: String,
name: String,
content: ToolResultContent,
is_error: bool,
timestamp: DateTime<Utc>,
},
BranchCreated {
branch_id: String,
parent_event: usize,
timestamp: DateTime<Utc>,
},
CheckpointMarker {
checkpoint_id: String,
thread_id: String,
timestamp: DateTime<Utc>,
},
Warning {
warning: ModelWarning,
timestamp: DateTime<Utc>,
},
ThinkingDelta {
text: String,
provider_echoes: Vec<ProviderEchoSnapshot>,
timestamp: DateTime<Utc>,
},
RateLimit {
snapshot: RateLimitSnapshot,
timestamp: DateTime<Utc>,
},
Interrupt {
payload: Value,
timestamp: DateTime<Utc>,
},
Cancelled {
reason: String,
timestamp: DateTime<Utc>,
},
SubAgentInvoked {
agent_id: String,
sub_thread_id: String,
timestamp: DateTime<Utc>,
},
AgentHandoff {
from: Option<String>,
to: String,
timestamp: DateTime<Utc>,
},
Resumed {
from_checkpoint: String,
timestamp: DateTime<Utc>,
},
MemoryRecall {
tier: String,
namespace_key: String,
hits: usize,
timestamp: DateTime<Utc>,
},
UsageLimitExceeded {
breach: UsageLimitBreach,
timestamp: DateTime<Utc>,
},
Error {
class: String,
message: String,
timestamp: DateTime<Utc>,
},
}Expand description
One audit-log entry.
Aggregating these (oldest-to-newest) reconstructs the full conversation trace for a thread. Branches and checkpoints are recorded inline so a single linear scan is enough for replay.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UserMessage
User-authored input.
Fields
content: Vec<ContentPart>Multi-part content (text, image, tool_result).
AssistantMessage
Assistant reply (after stream aggregation).
Fields
content: Vec<ContentPart>Multi-part content (text, tool_use).
ContextCompacted
An auto-compaction adapter trimmed the working message slice.
dropped_chars is the character cost the compactor removed
(or summarised away); retained_chars is the cost the
post-compaction slice carries forward. The pair lets dashboards
detect drift between the threshold the operator wired and the
actual trim each invocation produces.
Fields
ToolCall
A tool was dispatched by the assistant.
Fields
ToolResult
The dispatched tool returned.
Fields
name: StringToolCall::name this result resolves — required by
codecs whose wire format keys correlation by name
(Gemini’s functionResponse) rather than id.
content: ToolResultContentResult payload.
BranchCreated
A branch was forked off this session at the indicated event index. The new branch’s thread id is recorded alongside.
Fields
CheckpointMarker
Marker tying this position in the audit log to a Checkpointer
snapshot. Cross-tier reference for crash recovery flows that pair
SessionGraph (Tier 2) with StateGraph checkpoints (Tier 1).
Fields
Warning
Codec / runtime advisory captured into the audit trail.
Fields
warning: ModelWarningUnderlying advisory.
ThinkingDelta
Streaming thinking-content fragment captured into the audit
trail. Aggregators fold consecutive deltas into a single
ContentPart::Thinking when reconstructing a finalised
message. Recording deltas individually keeps the audit log
faithful to the wire — a replay that needs only the final
block can fold the deltas, while a replay that needs per-token
timing has the data.
Fields
provider_echoes: Vec<ProviderEchoSnapshot>Vendor opaque round-trip tokens carried on this delta
(Anthropic signature_delta, Gemini thought_signature
on streamed parts, OpenAI Responses reasoning-item
encrypted_content). Codecs pre-wrap into
ProviderEchoSnapshot on decode; the audit log preserves
the same opaque bytes for replay.
RateLimit
Provider rate-limit snapshot at this position in the conversation. Operators reading the audit log can correlate a later throttling failure with the snapshot that warned them. Recorded inline rather than on a separate metric channel so the audit trail is self-contained for compliance review.
Fields
snapshot: RateLimitSnapshotSnapshot the codec extracted from response headers.
Interrupt
HITL pause point — the runtime asked the host application for
input. The matching resume signal lands in
entelix_graph::Command outside the audit log; this event
records that the pause happened and what was visible to the
human at the time.
Fields
Cancelled
The run was cancelled — either via cancellation token or via a deadline elapsing. Recording the reason inline lets a replay reconstruct partial-run audit traces faithfully.
Fields
SubAgentInvoked
A sub-agent was dispatched from the parent’s run. The parent
run_id (recorded on the surrounding AgentEvent::Started)
scopes the audit trail; this event ties the parent’s
position to the child’s sub_thread_id so a replay can walk
from parent to child without keying on heuristic timing.
Managed-agent shape — every Subagent::execute
call surfaces here as the canonical “brain passes hand”
audit boundary.
Fields
agent_id: StringStable identifier the parent uses to refer to the
sub-agent (typically the Subagent’s configured name).
AgentHandoff
A supervisor recipe handed control between named agents.
Distinct from SubAgentInvoked — supervisor handoffs route
inside one logical conversation, while sub-agent invocations
open a child run.
Fields
Resumed
A run resumed from a prior checkpoint — either via
wake(thread_id) after a crash or via Command::Resume from
a HITL pause. Pairs with the CheckpointMarker whose id is
referenced so a single linear replay stays coherent across
the suspend / resume seam.
Fields
MemoryRecall
A long-term memory tier returned hits to the agent. Records
which tier was queried (semantic / entity / graph /
caller-defined), the namespace key (operator identifier for
the slice queried), and the number of hits returned. The
hits themselves stay outside the audit log — the model-facing
content already lands in AssistantMessage / ToolResult,
and storing the full retrieved corpus inline would balloon
the audit trail.
Fields
UsageLimitExceeded
An entelix_core::RunBudget axis hit its cap and
short-circuited the run with
entelix_core::Error::UsageLimitExceeded. Compliance and
billing audits replay this to attribute breaches per-tenant
per-run; the operator-facing Error continues to flow
through the typed dispatch return as well, so the audit
channel’s role here is the durable record, not the only
breach signal.
Fields
breach: UsageLimitBreachTyped axis-and-magnitude pair carried straight through
from the matching Error::UsageLimitExceeded(breach).
The axis variant carries its own magnitude shape
(u64 for counts, Decimal for cost).
Error
A failure surfaced from the model / tool / graph runtime. Errors that the agent recovers from internally are still recorded so post-mortems see the full picture.
Implementations§
Trait Implementations§
Source§impl Clone for GraphEvent
impl Clone for GraphEvent
Source§fn clone(&self) -> GraphEvent
fn clone(&self) -> GraphEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GraphEvent
impl Debug for GraphEvent
Source§impl<'de> Deserialize<'de> for GraphEvent
impl<'de> Deserialize<'de> for GraphEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GraphEvent
impl PartialEq for GraphEvent
Source§fn eq(&self, other: &GraphEvent) -> bool
fn eq(&self, other: &GraphEvent) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for GraphEvent
impl Serialize for GraphEvent
impl Eq for GraphEvent
impl StructuralPartialEq for GraphEvent
Auto Trait Implementations§
impl Freeze for GraphEvent
impl RefUnwindSafe for GraphEvent
impl Send for GraphEvent
impl Sync for GraphEvent
impl Unpin for GraphEvent
impl UnsafeUnpin for GraphEvent
impl UnwindSafe for GraphEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.