config.rs — Agent Configuration via JSON

The config.rs module defines the struct mappings for config.json, allowing agents to be configured without code changes. This supports rapid iteration and modularity.

🧾 Core Struct

r#[derive(Deserialize)]
pub struct AgentConfig {
    pub name: String,
    pub persona: String,
    pub voice_profile: Option<VoiceProfile>,
    pub memory_file: Option<String>,
    pub goals: Vec<GoalConfig>,
    pub model_preferences: Option<ModelPrefs>,
}

Each field maps directly from a JSON key used to initialize an agent at runtime.


🗣️ Voice Profile (Optional)

pub struct VoiceProfile {
    pub tts: String,
    pub stt: String,
}

Used to configure text-to-speech and speech-to-text services (e.g., Whisper, ElevenLabs).


🎯 Goals

This list feeds into the GoalManager.


🧠 Model Preferences

Specify preferred LLM provider and whether fallback is allowed.


🪵 Example (Trimmed)


🧩 Extensibility

New fields can be added to this config to:

  • Enable new features

  • Tune emotional weights

  • Control LLM temperature or system prompts

Rust-side deserialization ensures type safety.