Expand description
Skills: progressive-disclosure capability packages.
Rust equivalent of agent_framework._skills (upstream _skills.py,
~4,370 lines). A Skill is a named capability package: a short
description (always visible to the model, so it can decide whether the
skill is relevant), a longer instructions body (revealed on demand), and
zero or more named resources (revealed on demand, individually).
SkillsProvider is a ContextProvider that surfaces a set of skills
to an agent run with progressive disclosure: on every
ContextProvider::before_run it injects a compact catalog (name +
description for every skill) into the run’s instructions, plus two
framework-generated FunctionTools — load_skill and
read_skill_resource — that let the model pull in a skill’s full
instructions or a specific resource only when it decides the skill is
relevant, instead of paying the token cost of every skill’s full detail
on every turn. Once a skill has been loaded (via a load_skill call),
its full instructions are also injected on every subsequent before_run
for the lifetime of the provider, so the model does not have to re-load it
each turn.
This is a deliberate subset of upstream: no MCP-backed skills (an
@experimental upstream feature) and no run_skill_script /
sandboxed script execution (upstream’s third framework-generated tool) —
both are out of scope here. Only load_skill and read_skill_resource
are implemented.
Structs§
- Skill
- A named, progressive-disclosure capability package.
- Skills
Provider - A
ContextProviderthat attaches a set ofSkills to an agent run with progressive disclosure.