Skip to main content

oharness_loop/
config.rs

1//! Agent-level configuration knobs. Many correspond to fields on `LoopContext`.
2
3#[derive(Debug, Clone)]
4pub struct AgentConfig {
5    pub max_turns: u32,
6    pub revision_depth_cap: u32,
7    /// Default token budget hint for memory policies. Matches `LlmCapabilities.max_context_tokens`
8    /// when available; otherwise this floor.
9    pub default_token_budget: u32,
10    /// If true, the CLI-facing flag `--system-prompt` (or builder
11    /// `.with_system_prompt()`) prepends a system message; if false the loop only
12    /// sends what the caller supplies via the initial task.
13    pub include_default_system_prompt: bool,
14}
15
16impl Default for AgentConfig {
17    fn default() -> Self {
18        Self {
19            max_turns: 30,
20            revision_depth_cap: 3,
21            default_token_budget: 180_000,
22            include_default_system_prompt: true,
23        }
24    }
25}