ExAgent.Skills.Gate (ExAgent v2.2.2)

View Source

Capability that offers a skill's tools only after the skill is loaded.

ExAgent.new/1 places it before the agent's own capabilities when a skill has :tools (see ExAgent.Skills). Before each model request it omits every gated tool from function_tools until one of its skills has been loaded successfully in the conversation. Once loaded, the tool is offered again from the agent's tool inventory: the request tool set persists between steps, so a tool omitted on an earlier step must be put back explicitly.

Omitted tools are not executable for that request. Capabilities that run later can still remove (or add) tools, so the gate is a disclosure mechanism, not a security boundary; use ExAgent.Permissions for authority.

Summary

Types

t()

Gated tool name => names of the skills that unlock it.

Types

t()

@type t() :: %ExAgent.Skills.Gate{gates: %{required(String.t()) => [String.t()]}}

Gated tool name => names of the skills that unlock it.

Functions

after_model_request(cap, state)

Callback implementation for ExAgent.Capability.after_model_request/2.

after_tool_execute(cap, ctx, tool_call, result)

Callback implementation for ExAgent.Capability.after_tool_execute/4.

before_tool_execute(cap, ctx, tool_call)

Callback implementation for ExAgent.Capability.before_tool_execute/3.