ContextEvent
Defined in the trace module.Rust AI Agent SDK A context event for replay/debugging.
Fields
| Name | Type | Description |
|---|---|---|
event_type | ContextEventType | Event type |
name | String | Event name |
timestamp_ms | u64 | Timestamp (milliseconds since epoch) |
agent_id | Option<String> | Agent ID (if applicable) |
agent_name | Option<String> | Agent name (if applicable) |
tool_name | Option<String> | Tool name (if applicable) |
input | Option<serde_json::Value> | Input data |
output | Option<serde_json::Value> | Output data |
error | Option<String> | Error message (if applicable) |
duration_ms | Option<u64> | Duration in milliseconds (if applicable) |
metadata | HashMap<String | Additional metadata |
serde_json | :Value> | Additional metadata |
Methods
new
| Name | Type |
|---|---|
event_type | ContextEventType |
name | impl Into<String> |
agent
| Name | Type |
|---|---|
id | impl Into<String> |
name | impl Into<String> |
tool
| Name | Type |
|---|---|
name | impl Into<String> |
input
| Name | Type |
|---|---|
input | serde_json::Value |
output
| Name | Type |
|---|---|
output | serde_json::Value |
error
| Name | Type |
|---|---|
error | impl Into<String> |
duration_ms
| Name | Type |
|---|---|
ms | u64 |
metadata
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHub
praisonai/src/trace/mod.rs at line 486
