pub enum EventBody {
Put {
key: String,
value: Vec<u8>,
},
Delete {
key: String,
},
SessionStarted {
agent_id: String,
config_hash: String,
},
ModelTurn {
role: Role,
content: String,
model: String,
},
ToolCall {
call_id: String,
tool: String,
args_json: String,
},
ToolResult {
call_id: String,
ok: bool,
content: String,
},
Decision {
summary: String,
rationale: String,
},
SessionEnded {
reason: String,
},
}Expand description
The built-in agent-memory payload: a key/value vocabulary plus the typed events of an agent session (turns, tool calls, decisions). This is one provided payload over the generic engine — you can define your own instead.
Variants§
Put
Set key to value in the key/value projection.
Delete
Remove key from the key/value projection.
SessionStarted
Marks the start of an agent session.
Fields
ModelTurn
One conversational turn.
Fields
ToolCall
An invocation of a tool.
Fields
§
call_id: StringCorrelates this call with its EventBody::ToolResult.
ToolResult
The result of a EventBody::ToolCall.
Fields
Decision
A recorded decision — the natural fork point in a session.
SessionEnded
Marks the end of a session.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventBody
impl<'de> Deserialize<'de> for EventBody
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EventBody
impl RefUnwindSafe for EventBody
impl Send for EventBody
impl Sync for EventBody
impl Unpin for EventBody
impl UnsafeUnpin for EventBody
impl UnwindSafe for EventBody
Blanket Implementations§
impl<T> Body for T
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