// Copyright (c) Microsoft. All rights reserved. using System.Diagnostics.CodeAnalysis; using Microsoft.Shared.DiagnosticIds; namespace Microsoft.Agents.AI; /// /// Defines the contract for skill script execution modes. /// /// /// /// A provides the instructions and tools needed to enable /// script execution within an agent skill. Concrete implementations determine how scripts /// are executed (e.g., via the LLM's hosted code interpreter, an external executor, or a hybrid approach). /// /// /// Use the static factory methods to create instances: /// /// — executes scripts using the LLM provider's built-in code interpreter. /// /// /// [Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] public abstract class FileAgentSkillScriptExecutor { /// /// Creates a that uses the LLM provider's hosted code interpreter for script execution. /// /// A instance configured for hosted code interpreter execution. public static FileAgentSkillScriptExecutor HostedCodeInterpreter() => new HostedCodeInterpreterFileAgentSkillScriptExecutor(); /// /// Returns the tools and instructions contributed by this executor. /// /// /// The execution context provided by the skills provider, containing the loaded skills /// and the skill loader for reading resources. /// /// A containing the executor's tools and instructions. protected internal abstract FileAgentSkillScriptExecutionDetails GetExecutionDetails(FileAgentSkillScriptExecutionContext context); }