feagi_agent/sdk/base/controller.rs
1//! Controller trait for SDK-based agents.
2
3use crate::core::SdkError;
4
5/// Common lifecycle interface for SDK controllers.
6///
7/// Controllers wrap higher-level behavior (sensing/actuation) on top of FEAGI
8/// networking and device registration.
9pub trait Controller {
10 /// Start the controller and any background loops.
11 fn start(&mut self) -> Result<(), SdkError>;
12
13 /// Stop the controller and release resources.
14 fn stop(&mut self);
15
16 /// Returns true if the controller is actively running.
17 fn is_running(&self) -> bool;
18}