pub struct AgentConfig {
pub name: String,
pub max_tool_iterations: usize,
pub auto_update_check: bool,
pub instruction_files: Vec<PathBuf>,
pub instruction_auto_detect: bool,
pub max_tool_retries: usize,
pub tool_repeat_threshold: usize,
pub max_retry_duration_secs: u64,
pub focus: FocusConfig,
pub tool_filter: ToolFilterConfig,
pub budget_hint_enabled: bool,
pub supervisor: TaskSupervisorConfig,
}Expand description
Core agent behavior configuration, nested under [agent] in TOML.
Controls the agent’s name, tool-loop limits, instruction loading, and retry
behavior. All fields have sensible defaults; only name is typically changed
by end users.
§Example (TOML)
[agent]
name = "Zeph"
max_tool_iterations = 15
max_tool_retries = 3Fields§
§name: StringHuman-readable agent name surfaced in the TUI and Telegram header. Default: "Zeph".
max_tool_iterations: usizeMaximum number of tool-call iterations per agent turn before the loop is aborted.
Must be <= 100. Default: 10.
auto_update_check: boolCheck for new Zeph releases at startup. Default: true.
instruction_files: Vec<PathBuf>Additional instruction files to always load, regardless of provider.
instruction_auto_detect: boolWhen true, automatically detect provider-specific instruction files
(e.g. CLAUDE.md for Claude, AGENTS.md for OpenAI).
max_tool_retries: usizeMaximum retry attempts for transient tool errors (0 to disable).
tool_repeat_threshold: usizeNumber of identical tool+args calls within the recent window to trigger repeat-detection abort (0 to disable).
max_retry_duration_secs: u64Maximum total wall-clock time (seconds) to spend on retries for a single tool call.
focus: FocusConfigFocus-based active context compression configuration (#1850).
tool_filter: ToolFilterConfigDynamic tool schema filtering configuration (#2020).
budget_hint_enabled: boolInject a <budget> XML block into the volatile system prompt section so the LLM
can self-regulate tool calls and cost. Self-suppresses when no budget data is
available (#2267).
supervisor: TaskSupervisorConfigBackground task supervisor tuning. Controls concurrency limits and turn-boundary abort.
Trait Implementations§
Source§impl Debug for AgentConfig
impl Debug for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AgentConfig
impl Serialize for AgentConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl UnwindSafe for AgentConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request