Crate feagi_agent

Crate feagi_agent 

Source
Expand description

§FEAGI Agent Library

Complete toolkit for building FEAGI agents, from low-level protocol to high-level controllers.

§Core Module

Low-level agent protocol implementation (always available):

§SDK Module (Optional)

High-level tools for building controllers (enabled with sdk feature):

§Examples

§Using Core Only (Minimal Agent)

use feagi_agent::core::{AgentClient, AgentConfig, AgentType};

let config = AgentConfig::new("my-agent", AgentType::Sensory)
    .with_registration_endpoint("tcp://localhost:30001")
    .with_sensory_endpoint("tcp://localhost:5555");

let mut client = AgentClient::new(config)?;
client.connect()?;
client.send_sensory_bytes(data)?;

§Building a Controller with SDK

use feagi_agent::sdk::sensory::video::{VideoEncoder, VideoEncoderConfig};
use feagi_agent::sdk::base::TopologyCache;
use feagi_agent::core::{AgentClient, AgentConfig};

// Create topology cache (shared across encoders)
let topology_cache = TopologyCache::new("localhost", 8080, 5.0)?;

// Create video encoder
let encoder = VideoEncoder::new(config, &topology_cache).await?;

// Create agent client
let mut client = AgentClient::new(agent_config)?;
client.connect()?;

// Encode and send frames
let encoded = encoder.encode(&frame)?;
client.send_sensory_bytes(encoded)?;

Re-exports§

pub use core::AgentClient;
pub use core::AgentConfig;
pub use core::Result;
pub use core::SdkError;

Modules§

core
Core agent protocol implementation
sdk
FEAGI Agent SDK

Enums§

AgentType
Type of agent based on I/O direction and purpose