ExAgent. Skills. Gate
(ExAgent v3.0.0)
View Source
Capability that contributes the skills' tools and offers a skill's own tools only after the skill is loaded.
Stability — Stable.
ExAgent.new/1 places it before the agent's own capabilities when :skills
is set (see ExAgent.Skills). Its ExAgent.Capability.tools/1 adds
load_skill, read_skill_file (when a skill has files) and the skills'
tools to the agent's inventory. Before each model request it omits every
gated tool from the offered tools until one of its skills has been loaded
successfully in the conversation.
Unlocking a tool changes the prefix of a ReqLLM model with
reasoning_binding: :prefix. The adapter retires affected reasoning and
emits [:exagent, :model, :reasoning_prefix, :reset].
Its ExAgent.Capability.instructions/2 adds one constant line pointing at
load_skill. The catalog stays in the tool description, but an agent
instruction that restrains tool use can otherwise outweigh it (GPT-6 Luna
answered a matching request without loading the skill).
Omitted tools are not executable for that request. Capabilities that run later
can still remove tools, so the gate is a disclosure mechanism, not a security
boundary; use ExAgent.Permissions for authority.
Summary
Types
@type t() :: %ExAgent.Skills.Gate{ gates: %{required(String.t()) => [String.t()]}, tools: [ExAgent.Tool.t()] }
Gated tool name => names of the skills that unlock it, plus the tools it contributes.