Progressive disclosure pattern.
Allows a single agent to dynamically load specialized system prompts and tool sets based on conversation context. Skills are evaluated before each LLM call and the matching skill's persona is applied.
Summary
Functions
Applies a skill to the agent state by updating the active_skill and injecting the skill's system prompt into the provider.
Returns the effective tools: base tools plus active skill tools.
Evaluates all skills against the current context.
Functions
@spec apply_skill(map(), ExAgent.Skill.t()) :: map()
Applies a skill to the agent state by updating the active_skill and injecting the skill's system prompt into the provider.
@spec effective_tools(map()) :: [ExAgent.Tool.t()]
Returns the effective tools: base tools plus active skill tools.
@spec evaluate_skills([ExAgent.Skill.t()], ExAgent.Context.t()) :: ExAgent.Skill.t() | nil
Evaluates all skills against the current context.
Returns the first skill whose activation_fn returns true,
or nil if no skill matches or has an activation function.