Expand description
Unified configuration system for the agentic tools ecosystem.
This crate provides:
AgenticConfig: The root configuration type with namespaced sub-configsload_merged: Two-layer config loading (global + local) with env overridesschema: JSON Schema generation for IDE autocomplete (Taplo support)validation: Advisory validation that produces warnings
§Configuration Precedence (lowest to highest)
- Default values
- Global config (
~/.config/agentic/agentic.toml) - Local config (
./agentic.toml) - Environment variables
§Example
use agentic_config::{load_merged, AgenticConfig};
use std::path::Path;
let loaded = load_merged(Path::new(".")).unwrap();
println!("Locator model: {}", loaded.config.subagents.locator_model);
for warning in &loaded.warnings {
eprintln!("Warning: {}", warning);
}§Environment Variables
ANTHROPIC_BASE_URL: Override Anthropic API base URLANTHROPIC_API_KEY: Set Anthropic API key (env-only)EXA_BASE_URL: Override Exa API base URLEXA_API_KEY: Set Exa API key (env-only)AGENTIC_SUBAGENTS_LOCATOR_MODEL: Overridesubagents.locator_modelAGENTIC_SUBAGENTS_ANALYZER_MODEL: Overridesubagents.analyzer_modelAGENTIC_REASONING_OPTIMIZER_MODEL: Overridereasoning.optimizer_modelAGENTIC_REASONING_EXECUTOR_MODEL: Overridereasoning.executor_modelAGENTIC_REASONING_EFFORT: Overridereasoning.reasoning_effortAGENTIC_LOG_LEVEL: Override log levelAGENTIC_LOG_JSON: Enable JSON logging (“true” or “1”)
Re-exports§
pub use loader::LoadedAgenticConfig;pub use loader::load_merged;pub use paths::agentic_config_dir;pub use paths::xdg_config_home;pub use schema::schema_json_pretty;pub use types::AgenticConfig;
Modules§
- loader
- Configuration loader with two-layer merge and env overrides.
- merge
- TOML deep-merge implementation.
- paths
- XDG path resolution for configuration files.
- schema
- JSON Schema generation for
AgenticConfig. - types
- Configuration types for the agentic tools ecosystem.
- validation
- Advisory validation for
AgenticConfig.