systemprompt-agent 0.2.2

Agent-to-Agent (A2A) protocol for systemprompt.io AI governance: streaming, JSON-RPC models, task lifecycle, .well-known discovery, and governed agent orchestration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::{ExecutionStrategy, PlannedAgenticStrategy, StandardExecutionStrategy};

#[derive(Debug, Clone, Copy, Default)]
pub struct ExecutionStrategySelector;

impl ExecutionStrategySelector {
    pub const fn new() -> Self {
        Self
    }

    pub fn select_strategy(has_tools: bool) -> Box<dyn ExecutionStrategy> {
        if has_tools {
            Box::new(PlannedAgenticStrategy::new())
        } else {
            Box::new(StandardExecutionStrategy::new())
        }
    }
}