Expand description
Configuration system.
Configuration is loaded from multiple sources with the following priority (highest to lowest):
- CLI flags and environment variables
- Project-local settings (
.agent/settings.toml) - User settings (
~/.config/agent-code/config.toml)
Each layer is merged into the final Config struct.
Structs§
- ApiConfig
- API connection settings.
- Config
- Top-level configuration for the agent.
- Features
Config - Feature flags. All enabled by default — no artificial gates. Users can disable individual features in config.toml under [features].
- Hook
Definition - A hook definition binding an event to an action.
- McpServer
Entry - Entry for a configured MCP server.
- Permission
Rule - A single permission rule matching a tool and optional pattern.
- Permissions
Config - Permission system configuration.
- Sandbox
Config - Process-level sandbox configuration.
- Security
Config - Security and enterprise configuration.
- UiConfig
- UI configuration.
Enums§
- Hook
Action - A configured hook action.
- Hook
Event - Hook event types that can trigger user-defined actions.
- Permission
Mode - Permission mode controlling how tool calls are authorized.
Functions§
- watch_
config - Watch config files for changes and reload when modified. Returns a handle that can be dropped to stop watching.