Skip to main content

Module config

Module config 

Source
Expand description

Configuration system.

Configuration is loaded from multiple sources with the following priority (highest to lowest):

  1. CLI flags and environment variables
  2. Project-local settings (.agent/settings.toml)
  3. 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.
FeaturesConfig
Feature flags. All enabled by default — no artificial gates. Users can disable individual features in config.toml under [features].
HookDefinition
A hook definition binding an event to an action.
McpServerEntry
Entry for a configured MCP server.
PermissionRule
A single permission rule matching a tool and optional pattern.
PermissionsConfig
Permission system configuration.
SandboxConfig
Process-level sandbox configuration.
SecurityConfig
Security and enterprise configuration.
UiConfig
UI configuration.

Enums§

HookAction
A configured hook action.
HookEvent
Hook event types that can trigger user-defined actions.
PermissionMode
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.