Skip to main content

AgentConfig

Trait AgentConfig 

Source
pub trait AgentConfig {
    // Required methods
    fn config_path(&self) -> &str;
    fn default_system_prompt(&self) -> &str;
    fn log_prefix(&self) -> &str;
    fn name(&self) -> &str;

    // Provided method
    fn channel_buffer_size(&self) -> Option<usize> { ... }
}
Expand description

Trait for agent-specific configuration.

Implement this trait to provide custom config paths and system prompts for your agent.

Required Methods§

Source

fn config_path(&self) -> &str

The config file path.

Paths starting with ~/ are expanded to the home directory. All other paths (absolute or relative) are used as-is.

Source

fn default_system_prompt(&self) -> &str

The default system prompt for this agent

Source

fn log_prefix(&self) -> &str

The log file prefix for this agent (e.g., “multi_code”, “europa”)

Source

fn name(&self) -> &str

Agent name for display and logging

Provided Methods§

Source

fn channel_buffer_size(&self) -> Option<usize>

Channel buffer size for internal communication channels.

Returns None to use the default (500). Override to customize the buffer size for all async channels (LLM responses, tool results, UI events, etc.).

Larger values reduce backpressure but use more memory. Smaller values provide tighter flow control.

Implementors§