pub struct AgentConfig {Show 31 fields
pub home_dir: PathBuf,
pub model: String,
pub max_iterations: u32,
pub tool_delay_ms: u64,
pub provider: String,
pub base_url: Option<String>,
pub api_key: Option<String>,
pub compression: CompressionConfig,
pub network: NetworkConfig,
pub mcp_servers: Vec<McpServerConfig>,
pub max_concurrent_requests: Option<usize>,
pub security: SecurityConfig,
pub memory_expiry: MemoryExpiryConfig,
pub nudge_interval: u32,
pub llm_max_retries: u32,
pub llm_retry_base_ms: u64,
pub platform: PlatformConfig,
pub auto_skill_threshold: u32,
pub llm_timeout_secs: u64,
pub tool_timeout_secs: u64,
pub shutdown_timeout_secs: u64,
pub max_tokens_per_task: Option<u32>,
pub max_output_tokens: Option<u32>,
pub reasoning_effort: Option<ReasoningEffort>,
pub context_window: Option<usize>,
pub disabled_toolsets: Vec<String>,
pub disabled_tools: Vec<String>,
pub show_usage_footer: bool,
pub platforms: WebhookPlatformsConfig,
pub server: ServerConfig,
pub cron: CronConfig,
}Fields§
§home_dir: PathBuf§model: String§max_iterations: u32§tool_delay_ms: u64§provider: String§base_url: Option<String>§api_key: Option<String>§compression: CompressionConfig§network: NetworkConfig§mcp_servers: Vec<McpServerConfig>§max_concurrent_requests: Option<usize>§security: SecurityConfig§memory_expiry: MemoryExpiryConfig§nudge_interval: u32Inject a memory-save reminder every N tool-use iterations within a task. 0 = disabled. Default: 5.
llm_max_retries: u32Max retry attempts on transient LLM API errors (429, 5xx, network). 0 = disabled.
llm_retry_base_ms: u64Base delay in milliseconds for exponential backoff between retries.
platform: PlatformConfigPlatform-level access controls (whitelist, mention gate, session isolation).
auto_skill_threshold: u32Minimum tool-use iterations that trigger an automatic skill-reflection pass after a task. The agent reviews the conversation and calls write_skill if the workflow is reusable. Set to 0 to disable. Default: 5.
llm_timeout_secs: u64Timeout in seconds for a single LLM API call (chat or stream). 0 = no timeout. Default: 120.
tool_timeout_secs: u64Timeout in seconds applied to every non-terminal tool dispatch. 0 = no timeout. Default: 60.
shutdown_timeout_secs: u64Drain window in seconds for graceful shutdown — server waits this long for in-flight requests to complete before forcing exit. Default: 30.
max_tokens_per_task: Option<u32>Hard cap on total tokens (input + output) consumed by a single task.
When exceeded the agent stops and returns what it has with a budget notice.
None means no limit.
max_output_tokens: Option<u32>Maximum output tokens per LLM request. Default: 8192. Lower this for models with small context windows (e.g. 4096 for a 27k-ctx model).
reasoning_effort: Option<ReasoningEffort>Reasoning effort for supported models (Claude extended thinking, OpenAI o1/o3/o4).
Set via config.yaml: reasoning_effort: medium
context_window: Option<usize>Maximum context window of the model in tokens.
Used by the context compressor to decide when to summarise history.
Defaults to 128 000. Set this to the actual limit for small-context models
(e.g. context_window: 27168 for Qwen3-14B-AWQ on vLLM).
disabled_toolsets: Vec<String>Toolsets to disable. Removes all tools in the named toolset from every
request, reducing context usage for small-context models.
Available toolsets: web, files, terminal, memory, skills, agent,
browser, git, notes, json, mcp
Providers: anthropic, openrouter, vllm, ollama, bedrock, codex, thaillm
Example: disabled_toolsets: [browser, git, notes, json, agent]
disabled_tools: Vec<String>Individual tools to disable by exact name. Useful when only some tools
in a toolset need to be removed (e.g. disable image_read without
removing the entire files toolset).
Example: disabled_tools: [image_read, pdf_read, session_search]
Append a usage footer ([N iter | Xin Yout Ztok @ model]) to every
agent response. Useful for debugging; usually unwanted on chat platforms
where end users see the output. Default: false.
platforms: WebhookPlatformsConfigPer-platform webhook server settings (LINE, WhatsApp, generic webhook).
Each entry sets enabled flag, listening port, and HTTP path. Tokens and
secrets continue to be read from ~/.garudust/.env — never from yaml.
server: ServerConfigHTTP gateway server settings (port, …). Overridden by --port and
GARUDUST_PORT env var.
cron: CronConfigCron scheduler — recurring agent tasks plus the memory consolidation /
expiry sweeps. CLI flags (--cron-jobs, --memory-cron,
--memory-expiry-cron) and the corresponding env vars take precedence.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn garudust_dir() -> PathBuf
pub fn garudust_dir() -> PathBuf
Canonical ~/.garudust directory.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more