Summary
Add support for executing agent skill scripts via the LLM's hosted code interpreter, encapsulated as SkillExecutor.HostedCodeInterpreter().
Background
The current agent skills functionality in FileAgentSkillsProvider handles skill loading and skill resource loading. Script execution is not yet supported as a configurable capability. This is the first of three planned execution modes:
SkillExecutor.HostedCodeInterpreter() ← this issue
SkillExecutor.External() — user-provided executor (future)
SkillExecutor.Hybrid() — conditional routing between the two (future)
Requirements
- Introduce
SkillExecutor as an abstract class that defines the contract for all execution modes:
- Abstract/virtual members for providing instructions and tools to the agent.
- A static
HostedCodeInterpreter() factory method that returns a concrete subclass instance.
- The
HostedCodeInterpreter mode (concrete sealed subclass) must:
- Provide instructions that direct the LLM to use
read_skill_resource for loading scripts and the hosted code interpreter for execution.
- Register
HostedCodeInterpreterTool as a provided tool.
- Handle tool invocations at runtime.
FileAgentSkillsProvider should have script execution disabled by default.
- When the provider's options include an executor (e.g.,
Executor = SkillExecutor.HostedCodeInterpreter()), the provider obtains instructions and tools from the executor via its public instance methods.
- Add a sample project Agent_Step02_ScriptExecutionWithCodeInterpreter demonstrating usage of this execution mode.
Acceptance Criteria
Part of #3499
Summary
Add support for executing agent skill scripts via the LLM's hosted code interpreter, encapsulated as
SkillExecutor.HostedCodeInterpreter().Background
The current agent skills functionality in
FileAgentSkillsProviderhandles skill loading and skill resource loading. Script execution is not yet supported as a configurable capability. This is the first of three planned execution modes:SkillExecutor.HostedCodeInterpreter()← this issueSkillExecutor.External()— user-provided executor (future)SkillExecutor.Hybrid()— conditional routing between the two (future)Requirements
SkillExecutoras an abstract class that defines the contract for all execution modes:HostedCodeInterpreter()factory method that returns a concrete subclass instance.HostedCodeInterpretermode (concrete sealed subclass) must:read_skill_resourcefor loading scripts and the hosted code interpreter for execution.HostedCodeInterpreterToolas a provided tool.FileAgentSkillsProvidershould have script execution disabled by default.Executor = SkillExecutor.HostedCodeInterpreter()), the provider obtains instructions and tools from the executor via its public instance methods.Acceptance Criteria
SkillExecutorabstract class created with public abstract/virtual members for instructions and toolsHostedCodeInterpreter()static factory method onSkillExecutorreturns a sealed concrete subclassHostedCodeInterpretermode provides instructions and registersHostedCodeInterpreterToolFileAgentSkillsProviderscript execution is off by defaultExternal()andHybrid()modes without breaking changesPart of #3499