Skip to main content

Module profiles

Module profiles 

Source
Expand description

Agent profiles — workload-specific configurations.

Profiles compose existing configuration knobs into named presets. They are loaded from three tiers (highest priority first):

  1. Project: .lean-ctx/profiles/<name>.toml
  2. User: ~/.config/lean-ctx/profiles/<name>.toml
  3. Built-in defaults

A profile can extend another via extends = "parent". Child fields override parent fields; unset fields inherit.

Structs§

BudgetConfig
Token and cost budget limits.
CompressionConfig
Compression strategy configuration.
DegradationConfig
Budget/SLO degradation policy configuration.
LayoutConfig
Layout (attention-aware reorder) configuration.
OutputHints
Controls which optional hints/footers are appended to tool output. All default to false for minimal output overhead.
PipelineConfig
Pipeline layer activation per profile.
Profile
A complete context profile definition.
ProfileAutonomy
Autonomy overrides per profile.
ProfileInfo
Information about an available profile.
ProfileMeta
Profile identity and inheritance.
ReadConfig
Read behavior configuration.
RoutingConfig
Routing policy overrides (intent → model tier → read mode/budgets).
TranslationConfig
Translation (tokenizer-aware) configuration.

Enums§

ProfileSource
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.