pub enum HookEvent<'a> {
LoopIteration {
turn: usize,
},
PreLlmCall {
request: &'a CompletionRequest,
},
PostLlmCall {
response: &'a CompletionResponse,
},
PreToolExecution {
tool_name: &'a str,
input: &'a Value,
},
PostToolExecution {
tool_name: &'a str,
output: &'a ToolOutput,
},
ContextCompaction {
old_tokens: usize,
new_tokens: usize,
},
SessionStart {
session_id: &'a str,
},
SessionEnd {
session_id: &'a str,
},
}Expand description
Events fired during the agentic loop for observability.
Variants§
LoopIteration
Start of a loop iteration.
PreLlmCall
Before calling the LLM provider.
Fields
§
request: &'a CompletionRequestThe request about to be sent.
PostLlmCall
After receiving the LLM response.
Fields
§
response: &'a CompletionResponseThe response received.
PreToolExecution
Before executing a tool.
PostToolExecution
After executing a tool.
ContextCompaction
Context was compacted.
Fields
SessionStart
A session started.
SessionEnd
A session ended.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for HookEvent<'a>
impl<'a> RefUnwindSafe for HookEvent<'a>
impl<'a> Send for HookEvent<'a>
impl<'a> Sync for HookEvent<'a>
impl<'a> Unpin for HookEvent<'a>
impl<'a> UnsafeUnpin for HookEvent<'a>
impl<'a> UnwindSafe for HookEvent<'a>
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
Mutably borrows from an owned value. Read more