OpenHub.Agents.AIAgent
0.1.4
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package OpenHub.Agents.AIAgent --version 0.1.4
NuGet\Install-Package OpenHub.Agents.AIAgent -Version 0.1.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenHub.Agents.AIAgent" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenHub.Agents.AIAgent" Version="0.1.4" />
<PackageReference Include="OpenHub.Agents.AIAgent" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenHub.Agents.AIAgent --version 0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OpenHub.Agents.AIAgent, 0.1.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenHub.Agents.AIAgent@0.1.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenHub.Agents.AIAgent&version=0.1.4
#tool nuget:?package=OpenHub.Agents.AIAgent&version=0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenHub.Agents
OpenHub.Agents is a task-oriented abstraction layer built on top of the Microsoft Agents SDK and the GitHub Copilot SDK. It wraps different AI backends behind a unified ITaskAgent API so callers can create tasks and consume streaming updates in one consistent way.
Features
- Unified
ITaskAgentabstraction for task creation and streaming subscriptions - Multi-targeting support for
netstandard2.0,netstandard2.1,net8.0,net9.0, andnet10.0 - Two GitHub Copilot execution modes:
- shared session with preserved conversation context
- factory mode with a fresh session per task
- Rx-based streaming model for reasoning, content, tool calls, media, and usage updates
- Central package management with
Directory.Packages.props
Installation
dotnet add package OpenHub.Agents.Abstractions
dotnet add package OpenHub.Agents.AIAgent
dotnet add package OpenHub.Agents.GitHubCopilot
Install only the packages you need:
OpenHub.Agents.Abstractionsfor contracts and modelsOpenHub.Agents.AIAgentwhen you want to adaptMicrosoft.Agents.AI.AIAgentOpenHub.Agents.GitHubCopilotwhen you want GitHub Copilot integration
Projects
| Project | Purpose |
|---|---|
src/OpenHub.Agents.Abstractions |
Core task-agent contracts and event models |
src/OpenHub.Agents.AIAgent |
Adapter from Microsoft.Agents.AI.AIAgent to ITaskAgent |
src/OpenHub.Agents.GitHubCopilot |
Adapters for shared-session and per-task GitHub Copilot execution |
samples/OpenHub.Agents.Sample.Console |
Console sample covering OpenAI + GitHub Copilot flows |
tests/OpenHub.Agents.Tests |
xUnit test suite |
Dependencies Explained
Runtime and core packages
| Package | Purpose | Repository |
|---|---|---|
| GitHub.Copilot.SDK | Native .NET SDK used to create, start, and manage GitHub Copilot sessions. | github/copilot-sdk |
| Microsoft.Agents.AI | Main Microsoft Agents SDK package used to represent and run AIAgent pipelines. |
microsoft/agents |
| Microsoft.Agents.AI.Abstractions | Shared abstractions from the Microsoft Agents SDK used by the contract layer. | microsoft/agents |
| Microsoft.Agents.AI.GitHub.Copilot | Microsoft Agents integration package for GitHub Copilot-related capabilities. | microsoft/agents |
| Microsoft.Agents.AI.OpenAI | OpenAI adapter package used by the sample application. | microsoft/agents |
| Microsoft.Bcl.AsyncInterfaces | Compatibility package for async interfaces on older target frameworks. | dotnet/runtime |
| Microsoft.Extensions.AI.Abstractions | Shared AI content abstractions such as ChatMessage, UsageContent, and tool-call content types. |
dotnet/extensions |
| Microsoft.Extensions.DependencyInjection.Abstractions | Dependency injection abstractions used by the AIAgent integration layer. | dotnet/runtime |
| Microsoft.Extensions.Logging.Abstractions | Logging abstractions used by the AIAgent integration layer. | dotnet/runtime |
| System.Reactive | Rx.NET implementation used for observable task and event streams. | dotnet/reactive |
Testing and tooling packages
| Package | Purpose | Repository |
|---|---|---|
| coverlet.collector | Code coverage collector for test runs. | coverlet-coverage/coverlet |
| Microsoft.NET.Test.Sdk | Test host and discovery infrastructure for dotnet test. |
microsoft/vstest |
| xunit | Unit testing framework used by the repository. | xunit/xunit |
| xunit.runner.visualstudio | Visual Studio and dotnet test runner integration for xUnit. |
xunit/xunit |
Build and test
dotnet build OpenHub.Agents.slnx
dotnet test tests\OpenHub.Agents.Tests\OpenHub.Agents.Tests.csproj
Quick Start
Wrap an AIAgent
ITaskAgent taskAgent = chatClient
.AsAIAgent(options)
.AsTaskAgent();
CreateTaskResponse response = await taskAgent.CreateTaskAsync(new("Summarize this repo."));
using IDisposable contentSubscription = response.Subscriber.TaskContentChunk.Subscribe(chunk =>
{
Console.Write(chunk.Content);
});
await response.Subscriber.WaitForCompletionAsync();
Wrap GitHub Copilot
await using CopilotClient copilotClient = new();
await copilotClient.StartAsync();
SessionConfig sessionConfig = new()
{
Streaming = true,
Model = "claude-sonnet-4.6",
OnPermissionRequest = PermissionHandler.ApproveAll
};
ITaskAgent factoryAgent = copilotClient.AsTaskAgent(sessionConfig);
GitHub Copilot can be used in two ways:
CopilotSession.AsTaskAgent(...): reuse one session and preserve conversation stateCopilotClient.AsTaskAgent(...): create a fresh session per task
Notes
OpenHub.Agents.GitHubCopilotcurrently depends on preview packageMicrosoft.Agents.AI.GitHub.Copilot.- Package versions are managed centrally via
Directory.Packages.props. - Repository-wide build conventions live in
Directory.Build.propsand.editorconfig.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Agents.AI (>= 1.1.0)
- Microsoft.Agents.AI.Abstractions (>= 1.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
- Microsoft.Extensions.AI.Abstractions (>= 10.4.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- OpenHub.Agents.Abstractions (>= 0.1.4)
- System.Reactive (>= 6.1.0)
-
.NETStandard 2.1
- Microsoft.Agents.AI (>= 1.1.0)
- Microsoft.Agents.AI.Abstractions (>= 1.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
- Microsoft.Extensions.AI.Abstractions (>= 10.4.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- OpenHub.Agents.Abstractions (>= 0.1.4)
- System.Reactive (>= 6.1.0)
-
net10.0
- Microsoft.Agents.AI (>= 1.1.0)
- Microsoft.Agents.AI.Abstractions (>= 1.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
- Microsoft.Extensions.AI.Abstractions (>= 10.4.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- OpenHub.Agents.Abstractions (>= 0.1.4)
- System.Reactive (>= 6.1.0)
-
net8.0
- Microsoft.Agents.AI (>= 1.1.0)
- Microsoft.Agents.AI.Abstractions (>= 1.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
- Microsoft.Extensions.AI.Abstractions (>= 10.4.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- OpenHub.Agents.Abstractions (>= 0.1.4)
- System.Reactive (>= 6.1.0)
-
net9.0
- Microsoft.Agents.AI (>= 1.1.0)
- Microsoft.Agents.AI.Abstractions (>= 1.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
- Microsoft.Extensions.AI.Abstractions (>= 10.4.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- OpenHub.Agents.Abstractions (>= 0.1.4)
- System.Reactive (>= 6.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OpenHub.Agents.AIAgent:
| Package | Downloads |
|---|---|
|
OpenHub.Agents.GitHubCopilot
GitHub Copilot adapters for OpenHub.Agents with shared-session and per-task session modes. |
GitHub repositories
This package is not used by any popular GitHub repositories.