![]() |
VOOZH | about |
dotnet add package AntRunner.ToolCalling --version 2.0.1
NuGet\Install-Package AntRunner.ToolCalling -Version 2.0.1
<PackageReference Include="AntRunner.ToolCalling" Version="2.0.1" />
<PackageVersion Include="AntRunner.ToolCalling" Version="2.0.1" />Directory.Packages.props
<PackageReference Include="AntRunner.ToolCalling" />Project file
paket add AntRunner.ToolCalling --version 2.0.1
#r "nuget: AntRunner.ToolCalling, 2.0.1"
#:package AntRunner.ToolCalling@2.0.1
#addin nuget:?package=AntRunner.ToolCalling&version=2.0.1Install as a Cake Addin
#tool nuget:?package=AntRunner.ToolCalling&version=2.0.1Install as a Cake Tool
The AntRunner.ToolCalling library provides a fully decoupled framework for defining and executing tool calls within AI assistant workflows. It separates assistant definitions and tool calling logic from the Assistants API, enabling flexible integration with any .NET library that supports the OpenAI Chat Completions API.
This library enables assistants to dynamically invoke external tools or functions during conversations. Tools can be defined using OpenAPI specifications or as local functions, and the library manages the execution of these tools, including handling web API requests and processing responses.
[Tool], [Parameter], and related attributes to declaratively register tools, eliminating the need for hardcoded schema generators.ToolContractRegistry automatically generates OpenAPI schemas from method signatures and attributes at runtime.CrewBridgeSchemaGenerator enables multi-agent workflows by exposing crew member assistants as callable tools.Tools can be registered using attributes instead of static JSON schema files:
[Tool(OperationId = "search_documents", Summary = "Search for documents by query")]
public static async Task<string> SearchDocuments(
[Parameter(Description = "The search query")] string query,
[Parameter(Description = "Maximum results to return")] int maxResults = 10)
{
// Implementation
}
| Attribute | Target | Description |
|---|---|---|
[Tool] |
Method | Marks a method as a callable tool with OperationId and Summary |
[Parameter] |
Parameter | Provides description, default value, and visibility for parameters |
[RequiresNotebookContext] |
Method | Indicates the tool needs notebook context injection |
[OAuth] |
Method | Specifies OAuth token handling policy (None, Forward, Required) |
The CrewBridgeSchemaGenerator generates OpenAPI schemas for multi-agent orchestration, allowing a lead assistant to delegate tasks to crew member assistants:
var schema = CrewBridgeSchemaGenerator.GetSchema(new[] { "ResearchAgent", "WriterAgent", "ReviewerAgent" });
This creates tool definitions that route through Agent.Invoke for assistant-to-assistant communication.
The AntRunner.Chat.ChatRunner class illustrates how to use the AntRunner.ToolCalling library in practice. It demonstrates:
This sequence diagram illustrates the interaction between the ChatRunner class and the AntRunner.ToolCalling library during a chat run, highlighting tool calling lifecycle and execution.
For detailed implementation and usage, see the source code in \AntRunner\AntRunner.Chat\AntRunner.Chat\ChatRunner.cs.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on AntRunner.ToolCalling:
| Package | Downloads |
|---|---|
|
AntRunner.Chat
Toolbased AI Agents via Chat Completions compatible with AntRunner assistant definitions |
This package is not used by any popular GitHub repositories.
Added ReasoningEffort