nexo-core 0.1.18

Agent runtime: event bus, sessions, plugin trait, heartbeat, A2A delegation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::behavior::AgentBehavior;
use nexo_config::types::agents::AgentConfig;
use std::sync::Arc;
pub struct Agent {
    pub id: String,
    pub config: Arc<AgentConfig>,
    pub behavior: Arc<dyn AgentBehavior>,
}
impl Agent {
    pub fn new(config: AgentConfig, behavior: impl AgentBehavior + 'static) -> Self {
        let id = config.id.clone();
        Self {
            id,
            config: Arc::new(config),
            behavior: Arc::new(behavior),
        }
    }
}