AF.AgentFramework
0.9.0
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 AF.AgentFramework --version 0.9.0
NuGet\Install-Package AF.AgentFramework -Version 0.9.0
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="AF.AgentFramework" Version="0.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AF.AgentFramework" Version="0.9.0" />
<PackageReference Include="AF.AgentFramework" />
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 AF.AgentFramework --version 0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AF.AgentFramework, 0.9.0"
#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 AF.AgentFramework@0.9.0
#: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=AF.AgentFramework&version=0.9.0
#tool nuget:?package=AF.AgentFramework&version=0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AF.AgentFramework
A lightweight, theory-aligned agent framework for .NET — build autonomous agents and multi-agent systems (MAS) with clean, composable primitives: Kernel · Engines · Runners · Hosting · Tools.
Requires .NET 9.0 or later
Install
dotnet add package AF.AgentFramework
Quick start
Minimal example:
using AgentFramework.Hosting;
using AgentFramework.Engines.Loop;
using AgentFramework.Runners.Timers;
using AgentFramework.Kernel;
using AgentFramework.Kernel.Policies.Defaults;
sealed class HelloAgent : IAgent
{
public string Id => "hello";
public async Task HandleAsync(WorkItem item, IAgentContext ctx)
{
Console.WriteLine($"[Agent] {Id} handling {item.Kind}");
await Task.Delay(100, ctx.Cancellation);
}
}
var host = AgentHostBuilder.Create()
.WithKernelDefaults(PolicySetDefaults.Create())
.WithKernel(() => new InProcKernelFactory())
.AddEngine("loop", () => new LoopEngine("loop"))
.AddRunner("loop", () => new TimerRunner(TimeSpan.FromSeconds(1)))
.AddAgent("hello", () => new HelloAgent())
.Attach("hello", "loop")
.Build();
await host.StartAsync();
await Task.Delay(5000);
await host.StopAsync();
Links
- Source & issues
- API docs (DocFX): see
docs/in the repository
License
MIT © David Runemalm
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.16.0 | 127 | 11/1/2025 |
| 0.15.1 | 126 | 11/1/2025 |
| 0.15.0 | 172 | 10/26/2025 |
| 0.14.0 | 149 | 10/19/2025 |
| 0.13.0 | 92 | 10/18/2025 |
| 0.12.1 | 158 | 10/12/2025 |
| 0.12.0 | 163 | 10/12/2025 |
| 0.11.0 | 161 | 10/12/2025 |
| 0.10.0 | 116 | 10/11/2025 |
| 0.9.0 | 115 | 10/11/2025 |
| 0.8.0 | 108 | 10/11/2025 |
| 0.7.0 | 112 | 10/10/2025 |
| 0.6.0 | 170 | 10/1/2025 |
| 0.5.1 | 202 | 9/21/2025 |