Class AgentToolProvider
- Namespace
- Oscova.Agents.Providers
- Assembly
- Oscova.Agents.dll
Provides a filtered subset of crew tools as Microsoft.Agents.AI.AIContext.Tools for a
Microsoft.Agents.AI.ChatClientAgent and applies sparse agent-specific governance overrides.
Only tools whose qualified names appear in allowedToolNames are exposed.
Oscova.Agents.Policies.ToolApprovalMode.RequireApproval wraps the tool with approval semantics;
Oscova.Agents.Policies.ToolApprovalMode.Deny omits the tool entirely. When the agent is used as a
tool (sub-agent), approval-required tools are omitted rather than wrapped because no approval
channel exists to route the request. Reflected confidentiality markers are also enforced.
public class AgentToolProvider : AIContextProviderInheritance
-
AIContextProvider
Inherited Members
-
AIContextProvider.InvokingAsync(AIContextProvider.InvokingContext, CancellationToken)AIContextProvider.InvokingCoreAsync(AIContextProvider.InvokingContext, CancellationToken)AIContextProvider.ProvideAIContextAsync(AIContextProvider.InvokingContext, CancellationToken)AIContextProvider.InvokedAsync(AIContextProvider.InvokedContext, CancellationToken)AIContextProvider.InvokedCoreAsync(AIContextProvider.InvokedContext, CancellationToken)AIContextProvider.StoreAIContextAsync(AIContextProvider.InvokedContext, CancellationToken)AIContextProvider.GetService(Type, object?)AIContextProvider.GetService<TService>(object?)AIContextProvider.ProvideInputMessageFilterAIContextProvider.StoreInputRequestMessageFilterAIContextProvider.StoreInputResponseMessageFilterAIContextProvider.StateKeys
Constructors
- AgentToolProvider(IEnumerable<string>, CrewToolCollection, IEnumerable<AgentToolPolicy>?, bool, bool, bool)
-
Provides a filtered subset of crew tools as Microsoft.Agents.AI.AIContext.Tools for a Microsoft.Agents.AI.ChatClientAgent and applies sparse agent-specific governance overrides. Only tools whose qualified names appear in
allowedToolNamesare exposed. Oscova.Agents.Policies.ToolApprovalMode.RequireApproval wraps the tool with approval semantics; Oscova.Agents.Policies.ToolApprovalMode.Deny omits the tool entirely. When the agent is used as a tool (sub-agent), approval-required tools are omitted rather than wrapped because no approval channel exists to route the request. Reflected confidentiality markers are also enforced.
Methods
- ProvideAIContextAsync(InvokingContext, CancellationToken)
-
When overridden in a derived class, provides additional AI context to be merged with the input context for the current invocation.