pub struct AgentConfig {Show 15 fields
pub agent_id: String,
pub agent_type: AgentType,
pub capabilities: AgentCapabilities,
pub registration_endpoint: String,
pub sensory_endpoint: String,
pub motor_endpoint: String,
pub visualization_endpoint: String,
pub control_endpoint: String,
pub heartbeat_interval: f64,
pub connection_timeout_ms: u64,
pub registration_retries: u32,
pub retry_backoff_ms: u64,
pub sensory_send_hwm: i32,
pub sensory_linger_ms: i32,
pub sensory_immediate: bool,
}Expand description
Agent configuration builder
Fields§
§agent_id: StringUnique agent identifier
agent_type: AgentTypeAgent type (sensory, motor, both, visualization, or infrastructure)
capabilities: AgentCapabilitiesAgent capabilities
registration_endpoint: StringFEAGI registration endpoint (ZMQ REQ)
sensory_endpoint: StringFEAGI sensory input endpoint (ZMQ PUSH)
motor_endpoint: StringFEAGI motor output endpoint (ZMQ SUB)
visualization_endpoint: StringFEAGI visualization stream endpoint (ZMQ SUB)
control_endpoint: StringFEAGI control/API endpoint (ZMQ REQ - REST over ZMQ)
heartbeat_interval: f64Heartbeat interval in seconds (0 = disabled)
connection_timeout_ms: u64Connection timeout in milliseconds
registration_retries: u32Registration retry attempts
retry_backoff_ms: u64Retry backoff base in milliseconds
sensory_send_hwm: i32ZMQ PUSH socket high-water-mark for sensory data
sensory_linger_ms: i32ZMQ PUSH socket linger period when disconnecting
sensory_immediate: boolWhether to enable ZMQ immediate mode on the sensory socket
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn with_feagi_host(self, host: impl Into<String>) -> Self
👎Deprecated since 0.1.0: Use with_feagi_endpoints() instead to explicitly specify all ports
pub fn with_feagi_host(self, host: impl Into<String>) -> Self
Set FEAGI host and ports to derive all endpoints
Note: This method requires explicit port numbers. NO DEFAULTS are provided. Ports must match those configured in FEAGI’s feagi_configuration.toml
§Example
let config = AgentConfig::new("camera", AgentType::Sensory)
.with_feagi_endpoints("192.168.1.100", 30001, 5558, 5564, 5562, 5563);Sourcepub fn with_feagi_endpoints(
self,
host: impl Into<String>,
registration_port: u16,
sensory_port: u16,
motor_port: u16,
visualization_port: u16,
control_port: u16,
) -> Self
pub fn with_feagi_endpoints( self, host: impl Into<String>, registration_port: u16, sensory_port: u16, motor_port: u16, visualization_port: u16, control_port: u16, ) -> Self
Set FEAGI endpoints with explicit ports (RECOMMENDED)
All ports must be provided explicitly to match FEAGI’s configuration. No default values are used.
§Example
let config = AgentConfig::new("camera", AgentType::Sensory)
.with_feagi_endpoints(
"192.168.1.100",
30001, // registration_port
5558, // sensory_port
5564, // motor_port
5562, // visualization_port
5563 // control_port
);Sourcepub fn with_registration_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_registration_endpoint(self, endpoint: impl Into<String>) -> Self
Set registration endpoint
Sourcepub fn with_sensory_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_sensory_endpoint(self, endpoint: impl Into<String>) -> Self
Set sensory input endpoint
Sourcepub fn with_motor_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_motor_endpoint(self, endpoint: impl Into<String>) -> Self
Set motor output endpoint
Sourcepub fn with_visualization_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_visualization_endpoint(self, endpoint: impl Into<String>) -> Self
Set visualization stream endpoint
Sourcepub fn with_control_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_control_endpoint(self, endpoint: impl Into<String>) -> Self
Set control/API endpoint
Sourcepub fn with_heartbeat_interval(self, interval: f64) -> Self
pub fn with_heartbeat_interval(self, interval: f64) -> Self
Set heartbeat interval in seconds (0 to disable)
Sourcepub fn with_connection_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_connection_timeout_ms(self, timeout_ms: u64) -> Self
Set connection timeout in milliseconds
Sourcepub fn with_registration_retries(self, retries: u32) -> Self
pub fn with_registration_retries(self, retries: u32) -> Self
Set registration retry attempts
Sourcepub fn with_sensory_socket_config(
self,
send_hwm: i32,
linger_ms: i32,
immediate: bool,
) -> Self
pub fn with_sensory_socket_config( self, send_hwm: i32, linger_ms: i32, immediate: bool, ) -> Self
Configure sensory socket behaviour (ZMQ PUSH)
Sourcepub fn with_vision_capability(
self,
modality: impl Into<String>,
dimensions: (usize, usize),
channels: usize,
target_cortical_area: impl Into<String>,
) -> Self
pub fn with_vision_capability( self, modality: impl Into<String>, dimensions: (usize, usize), channels: usize, target_cortical_area: impl Into<String>, ) -> Self
Add vision capability
§Example
let config = AgentConfig::new("camera", AgentType::Sensory)
.with_vision_capability("camera", (640, 480), 3, "i_vision");Sourcepub fn with_motor_capability(
self,
modality: impl Into<String>,
output_count: usize,
source_cortical_areas: Vec<String>,
) -> Self
pub fn with_motor_capability( self, modality: impl Into<String>, output_count: usize, source_cortical_areas: Vec<String>, ) -> Self
Add motor capability
§Example
let config = AgentConfig::new("arm", AgentType::Motor)
.with_motor_capability("servo", 4, vec!["o_motor".to_string()]);Sourcepub fn with_vision_unit(
self,
modality: impl Into<String>,
dimensions: (usize, usize),
channels: usize,
unit: SensoryUnit,
group: u8,
) -> Self
pub fn with_vision_unit( self, modality: impl Into<String>, dimensions: (usize, usize), channels: usize, unit: SensoryUnit, group: u8, ) -> Self
Add vision capability using semantic unit + group (Option B contract).
This avoids requiring SDK users to know FEAGI’s internal cortical ID encoding.
Sourcepub fn with_motor_unit(
self,
modality: impl Into<String>,
output_count: usize,
unit: MotorUnit,
group: u8,
) -> Self
pub fn with_motor_unit( self, modality: impl Into<String>, output_count: usize, unit: MotorUnit, group: u8, ) -> Self
Add motor capability using semantic unit + group (Option B contract).
Sourcepub fn with_motor_units(
self,
modality: impl Into<String>,
output_count: usize,
source_units: Vec<MotorUnitSpec>,
) -> Self
pub fn with_motor_units( self, modality: impl Into<String>, output_count: usize, source_units: Vec<MotorUnitSpec>, ) -> Self
Add multiple motor units using semantic unit + group pairs (Option B contract).
Sourcepub fn with_visualization_capability(
self,
visualization_type: impl Into<String>,
resolution: Option<(usize, usize)>,
refresh_rate: Option<f64>,
bridge_proxy: bool,
) -> Self
pub fn with_visualization_capability( self, visualization_type: impl Into<String>, resolution: Option<(usize, usize)>, refresh_rate: Option<f64>, bridge_proxy: bool, ) -> Self
Add visualization capability
§Example
let config = AgentConfig::new("brain_viz", AgentType::Visualization)
.with_visualization_capability("3d_brain", Some((1920, 1080)), Some(30.0), false);Sourcepub fn with_sensory_capability(
self,
rate_hz: f64,
shm_path: Option<String>,
) -> Self
pub fn with_sensory_capability( self, rate_hz: f64, shm_path: Option<String>, ) -> Self
Add sensory capability (generic)
This is used for non-vision sensory modalities (text, audio, etc.)
Device registrations are handled separately via ConnectorAgent and device_registrations in capabilities.
§Arguments
rate_hz- Sensory data rate in Hzshm_path- Optional shared memory path
§Example
let config = AgentConfig::new("text_input", AgentType::Sensory)
.with_sensory_capability(20.0, None);Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnwindSafe for AgentConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more