HookInput
Defined in the hooks module.Rust AI Agent SDK Input data for hooks
Fields
| Name | Type | Description |
|---|---|---|
session_id | String | Session ID |
event_name | String | Event name |
timestamp | String | Timestamp (ISO 8601) |
agent_name | Option<String> | Agent name (optional) |
tool_name | Option<String> | Tool name (for tool events) |
tool_args | Option<serde_json::Value> | Tool arguments (for tool events) |
message | Option<String> | Message content (for agent/LLM events) |
error | Option<String> | Error message (for error events) |
extra | HashMap<String | Additional data |
serde_json | :Value> | Additional data |
Methods
new
| Name | Type |
|---|---|
event | HookEvent |
session_id | impl Into<String> |
with_agent
| Name | Type |
|---|---|
name | impl Into<String> |
with_tool
| Name | Type |
|---|---|
name | impl Into<String> |
args | serde_json::Value |
with_message
| Name | Type |
|---|---|
message | impl Into<String> |
with_error
| Name | Type |
|---|---|
error | impl Into<String> |
with_extra
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHub
praisonai/src/hooks/mod.rs at line 105
