Expand description
Agent profiles — workload-specific configurations.
Profiles compose existing configuration knobs into named presets. They are loaded from three tiers (highest priority first):
- Project:
.lean-ctx/profiles/<name>.toml - User:
~/.config/lean-ctx/profiles/<name>.toml - Built-in defaults
A profile can extend another via extends = "parent". Child fields override
parent fields; unset fields inherit.
Structs§
- Budget
Config - Token and cost budget limits.
- Compression
Config - Compression strategy configuration.
- Degradation
Config - Budget/SLO degradation policy configuration.
- Layout
Config - Layout (attention-aware reorder) configuration.
- Output
Hints - Controls which optional hints/footers are appended to tool output.
All default to
falsefor minimal output overhead. - Pipeline
Config - Pipeline layer activation per profile.
- Profile
- A complete context profile definition.
- Profile
Autonomy - Autonomy overrides per profile.
- Profile
Info - Information about an available profile.
- Profile
Meta - Profile identity and inheritance.
- Read
Config - Read behavior configuration.
- Routing
Config - Routing policy overrides (intent → model tier → read mode/budgets).
- Translation
Config - Translation (tokenizer-aware) configuration.
Enums§
- Profile
Source - Where a profile was loaded from.
Functions§
- active_
profile - Loads the currently active profile.
- active_
profile_ name - Returns the currently active profile name.
- builtin_
profiles - Returns all built-in profile definitions.
- format_
as_ toml - Formats a profile as TOML for display or file creation.
- list_
profiles - Lists all available profile names (built-in + on-disk).
- load_
profile - Loads a profile by name with full resolution:
- set_
active_ profile - Sets the active profile for the current process.