mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* initial commit * address comments * address comments * address comments * address comments * rename executor to runner to align naming with python implementation * rename runner execute method to run method * remove poc leftovers and fix compilation issues * make script runner optional * remove unnecessary pragmas * make resources and scripts props virtual * address comments * update comment for name validation regex * address comments
28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Extensions.AI;
|
|
using Microsoft.Shared.DiagnosticIds;
|
|
|
|
namespace Microsoft.Agents.AI;
|
|
|
|
/// <summary>
|
|
/// Delegate for running file-based skill scripts.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Implementations determine the execution strategy (e.g., local subprocess, hosted code execution environment).
|
|
/// </remarks>
|
|
/// <param name="skill">The skill that owns the script.</param>
|
|
/// <param name="script">The file-based script to run.</param>
|
|
/// <param name="arguments">Optional arguments for the script, provided by the agent/LLM.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The script execution result.</returns>
|
|
[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)]
|
|
public delegate Task<object?> AgentFileSkillScriptRunner(
|
|
AgentFileSkill skill,
|
|
AgentFileSkillScript script,
|
|
AIFunctionArguments arguments,
|
|
CancellationToken cancellationToken);
|