Voda Protocol Overview

Voda is a high-performance, Rust-based framework that integrates AI Agent orchestration, distributed compute optimization, and continuous learning capabilities into a unified system. By combining these crucial components, Voda provides a robust foundation for building sophisticated AI applications that can evolve and scale efficiently. The Voda protocol provides a highly declarative, configuration-driven approach to building AI agent systems. It emphasizes simplicity and readability while maintaining powerful customization capabilities through its macro system.

Declarative Agent Configuration

Voda uses an intuitive macro-based configuration system that allows you to define complex agent behaviors with minimal boilerplate:
let db = get_db('character_db');
let roleplay_agent = roleplay_agent! {
    // character configuration
    characters: vec![], // manually define characters
    character_db: Some(db),
    
    // system configuration
    system_prompts: vec![
        EnglishSystemPrompt,
        ChineseSystemPrompt,
        KoreanSystemPrompt,
        JapaneseSystemPrompt
    ],
    system_config: vec![HermesLlama3],
    system_config_selection: SystemConfigSelection::BasedOnCharacterConfig,
    
    // voice TTS Config
    voice_model: vec![FishAudioTTS],
    enable_voice: EnableVoice::BasedOnCharacterConfig,
    
    // User Management
    cost_per_generation: 1,  // require 1 point per generation
    cost_per_regenerate: 1,
    cost_per_voice: 5,
    
    user_memory_rention_limit: 100,  // retain 100 pairs of convo for each session
    user_memory_max_conversations: None  // no limit on number of conversations
};

Component-Based Runtime Architecture

Voda’s runtime architecture is designed to be highly modular and scalable. It allows you to easily add or remove components to customize your AI system.
let port: u16 = std::env::var("PORT")
    .unwrap_or("3033".into())
    .parse()
    .expect("failed to convert to number");

let env = EnvVars::load();

let mut runtime = runtime! {
    // 0. Environment Variables
    env,
    on_bad_env: |e| {
        panic!("Error loading environment variables: {}", e);
    },

    // 1. user components
    user: vec![PersistentUser, UserPoints, UserUsage],

    // 2. agent system: 
    agent: vec![roleplay_agent],

    // 3. memory handling
    memory: vec![PersistentMemoryMongoDB],

    // 4. API Services
    api: StandardAPIService,
    user_authentication_middleware: Some(Xsalsa20Poly1305Authenticator), 
    // enable simple authentication

    port,
};

runtime.start().await;