compose_behaviors

Function compose_behaviors 

Source
pub fn compose_behaviors(
    id: impl Into<String>,
    behaviors: Vec<Arc<dyn AgentBehavior>>,
) -> Arc<dyn AgentBehavior>
Expand description

Compose multiple behaviors into a single AgentBehavior.

If the list contains a single behavior, returns it directly. If it contains multiple, wraps them in a composite that concatenates their action lists in order.

This is the public API for behavior composition — callers never need to know about the concrete composite type.