pub enum HiveEvent {
Show 14 variants
AgentStarted {
timestamp_ms: u64,
agent_id: String,
name: String,
kind: AgentKindTag,
},
AgentCompleted {
timestamp_ms: u64,
agent_id: String,
outcome: AgentOutcome,
},
LlmCallStarted {
timestamp_ms: u64,
agent_id: String,
model: String,
message_count: usize,
},
LlmCallCompleted {
timestamp_ms: u64,
agent_id: String,
model: String,
duration_ms: u64,
input_tokens: u32,
output_tokens: u32,
},
LlmTokenStreamed {
timestamp_ms: u64,
agent_id: String,
token: String,
},
ToolCallStarted {
timestamp_ms: u64,
agent_id: String,
tool_name: String,
params: String,
},
ToolCallCompleted {
timestamp_ms: u64,
agent_id: String,
tool_name: String,
duration_ms: u64,
result_preview: String,
},
ToolApprovalRequested {
timestamp_ms: u64,
agent_id: String,
tool_name: String,
description: String,
},
ExperienceRecorded {
timestamp_ms: u64,
experience_id: ExperienceId,
agent_id: String,
content_preview: String,
experience_type: String,
importance: f32,
},
RelationshipInferred {
timestamp_ms: u64,
relation_id: RelationId,
agent_id: String,
},
InsightGenerated {
timestamp_ms: u64,
insight_id: InsightId,
source_count: usize,
agent_id: String,
},
SubstratePerceived {
timestamp_ms: u64,
agent_id: String,
experience_count: usize,
insight_count: usize,
},
EmbeddingComputed {
timestamp_ms: u64,
agent_id: String,
dimensions: usize,
duration_ms: u64,
},
WatchNotification {
timestamp_ms: u64,
experience_id: ExperienceId,
collective_id: CollectiveId,
event_type: String,
},
}Expand description
Events emitted during agent execution.
Covers the full lifecycle: agent start/stop, LLM calls, tool execution,
substrate operations, and perception. All variants include timestamp_ms
(epoch milliseconds) and agent_id where applicable for correlation.
Serializes to tagged JSON: {"type": "llm_call_completed", "agent_id": "...", ...}
Must be Clone because EventEmitter uses tokio::sync::broadcast
which requires cloneable values.
Variants§
AgentStarted
An agent has started execution.
AgentCompleted
An agent has completed execution.
LlmCallStarted
An LLM call has been initiated.
LlmCallCompleted
An LLM call has completed.
Fields
LlmTokenStreamed
A token was received from a streaming LLM response.
ToolCallStarted
A tool call has started.
Fields
ToolCallCompleted
A tool call has completed.
Fields
ToolApprovalRequested
A tool requires human approval before execution.
ExperienceRecorded
An experience was recorded in the substrate.
Fields
experience_id: ExperienceIdRelationshipInferred
A relationship was inferred between experiences.
Fields
relation_id: RelationIdInsightGenerated
An insight was synthesized from an experience cluster.
Fields
SubstratePerceived
An agent perceived the substrate through its lens.
EmbeddingComputed
An embedding was computed via the EmbeddingProvider.
WatchNotification
A real-time Watch event from the substrate.
Emitted when experiences are created, updated, archived, or deleted by other agents in the same collective. Forwarded from PulseDB’s Watch system into the HiveEvent stream.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HiveEvent
impl<'de> Deserialize<'de> for HiveEvent
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>,
Auto Trait Implementations§
impl Freeze for HiveEvent
impl RefUnwindSafe for HiveEvent
impl Send for HiveEvent
impl Sync for HiveEvent
impl Unpin for HiveEvent
impl UnsafeUnpin for HiveEvent
impl UnwindSafe for HiveEvent
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more