pub trait AgentNodeHandler: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
env_id: &'life2 str,
agent_id: &'life3 str,
session_id: &'life4 str,
flow_input: &'life5 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait;
}Expand description
Bridges a DwAgent flow node into the agentic-worker runtime.
The concrete impl (constructed in the runner binary, Task 4.3) wraps
greentic_aw_runtime::AgentRuntime. The engine holds it as a trait
object so engine.rs stays free of AW-runtime construction details.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
env_id: &'life2 str,
agent_id: &'life3 str,
session_id: &'life4 str,
flow_input: &'life5 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
env_id: &'life2 str,
agent_id: &'life3 str,
session_id: &'life4 str,
flow_input: &'life5 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
Execute one agentic step. flow_input is the upstream node’s
JSON payload (expects at least {"user_text": "..."}); returns
the node output JSON ({"reply", "trail", "terminated_by"}).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".