Event
Defined in the bus module.Rust AI Agent SDK An event in the event bus.
Fields
| Name | Type | Description |
|---|---|---|
event_type | EventType | Event type |
source | String | Source of the event (agent name, tool name, etc.) |
data | serde_json::Value | Event data |
timestamp | u64 | Timestamp (Unix millis) |
correlation_id | Option<String> | Correlation ID for tracing |
Methods
new
| Name | Type |
|---|---|
event_type | EventType |
source | impl Into<String> |
data
| Name | Type |
|---|---|
data | serde_json::Value |
correlation_id
| Name | Type |
|---|---|
id | impl Into<String> |
agent_start
| Name | Type |
|---|---|
agent_name | impl Into<String> |
agent_end
| Name | Type |
|---|---|
agent_name | impl Into<String> |
agent_error
| Name | Type |
|---|---|
agent_name | impl Into<String> |
error | impl Into<String> |
tool_start
| Name | Type |
|---|---|
tool_name | impl Into<String> |
tool_end
| Name | Type |
|---|---|
tool_name | impl Into<String> |
tool_error
| Name | Type |
|---|---|
tool_name | impl Into<String> |
error | impl Into<String> |
llm_request
| Name | Type |
|---|---|
model | impl Into<String> |
llm_response
| Name | Type |
|---|---|
model | impl Into<String> |
workflow_start
| Name | Type |
|---|---|
workflow_name | impl Into<String> |
workflow_end
| Name | Type |
|---|---|
workflow_name | impl Into<String> |
handoff_start
| Name | Type |
|---|---|
source | impl Into<String> |
target | impl Into<String> |
handoff_end
| Name | Type |
|---|---|
source | impl Into<String> |
target | impl Into<String> |
custom
| Name | Type |
|---|---|
source | impl Into<String> |
data | serde_json::Value |
Source
View on GitHub
praisonai/src/bus/mod.rs at line 73
