ExAgent.Skills.Restore (ExAgent v2.2.2)

View Source

Capability that restores loaded skills removed from the request projection.

ExAgent.new/1 appends it after the agent's own capabilities when :skills is set (see ExAgent.Skills), so it runs after compaction. When an earlier capability set a request_messages projection that no longer contains a loaded skill's load_skill result, it inserts those results again as one user-level message, in the same position as a compaction summary: before the first message that is not instructions-only. Without a projection it does nothing. The canonical history is never changed, and the restored text is not counted by a compaction threshold that ran before it.

Summary

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.