Ragent 0.0.1.2

dotnet add package Ragent --version 0.0.1.2
                    
NuGet\Install-Package Ragent -Version 0.0.1.2
                    
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="Ragent" Version="0.0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ragent" Version="0.0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Ragent" />
                    
Project file
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 Ragent --version 0.0.1.2
                    
#r "nuget: Ragent, 0.0.1.2"
                    
#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 Ragent@0.0.1.2
                    
#: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=Ragent&version=0.0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Ragent&version=0.0.1.2
                    
Install as a Cake Tool

Ragent

A lightweight .NET agentic framework with tool discovery, LLM abstraction, and configuration.

Installation

dotnet add package Ragent

Quick Start

using Microsoft.Extensions.Logging;
using Ragent.Agent;
using Ragent.Config;
using Ragent.LLMClients;

var loggerFactory = LoggerFactory.Create(b => b.AddConsole());
var logger = loggerFactory.CreateLogger<Agent>();

var agent = new Agent(logger, new AgentConfig {
    Model = EModel.GEMINI_2_5_FLASH
});

agent.OnMessageReceived = async () => {
    Console.WriteLine(agent.ChatHistory.Last().Content);
    await Task.CompletedTask;
};

await agent.ProcessMessage("What is the square root of 144?");

Configuration

AgentConfig controls all agent behaviour:

var config = new AgentConfig {
    Model                  = EModel.GEMINI_2_5_FLASH,
    MaxIterations          = 5,
    MaxToolRetries         = 2,
    MaxChatHistorySize     = 50,
    ExtraSystemInstructions = "Always respond concisely.",
    SystemPromptOverride   = null,           // replaces the built-in prompt entirely
    ToolIdsBlackList       = ["query_db"],   // tool IDs to hide from the LLM
    AdditionalAssemblies   = [typeof(RagentTools).Assembly]  // third-party tool packages
};
Property Default Description
Model required LLM backend to use
MaxIterations 5 Max tool-call loops per message
MaxToolRetries 1 Retries on tool failure
MaxChatHistorySize null (unlimited) Oldest messages dropped when exceeded
ExtraSystemInstructions null Appended to the built-in system prompt
SystemPromptOverride null Replaces the built-in system prompt entirely
ToolIdsBlackList [] Tool IDs hidden from the LLM
AdditionalAssemblies [] Extra assemblies scanned for tools

Supported Models

Enum Backend Model
EModel.GEMINI_2_5_FLASH Google Gemini gemini-2.5-flash
EModel.OLLAMA_MISTRAL Ollama (local) mistral
EModel.OLLAMA_LLAMA32 Ollama (local) llama3.2

Defining Tools

Tools are discovered automatically from the entry assembly. Decorate a static class and its methods:

using Ragent.Reflection;

[ToolCollection]
public static class MathTools
{
    [Tool(Id = "sqrt", Name = "Square Root", Description = "Returns the square root of a number")]
    public static double SquareRoot(
        [ToolParam(Description = "The input number")] double value)
        => Math.Sqrt(value);
}
  • [ToolCollection] marks a class as a source of tools.
  • [Tool] marks a public static method as an invocable tool.
  • [ToolParam] annotates parameters with descriptions sent to the LLM.

Tool Discovery

Ragent scans three sources for tools automatically:

  1. Ragent core assembly — built-in tools.
  2. Entry assembly — your application's tools, discovered automatically with no configuration.
  3. AdditionalAssemblies — third-party tool packages (e.g. Ragent.Tools).
// Load built-in Ragent.Tools package alongside your own tools
AdditionalAssemblies = [typeof(RagentTools).Assembly]

Dependency Injection (Blazor / ASP.NET Core)

builder.Services.AddSingleton(new AgentConfig { Model = EModel.GEMINI_2_5_FLASH });
builder.Services.AddScoped<Agent>();

Events

// Func<Task> — awaited by the agent after every status change
agent.OnMessageReceived = () => InvokeAsync(StateHasChanged);

Source & Issues

github.com/RoryLinnane-Evolve/Agent

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ragent:

Package Downloads
Ragent.Tools

Built-in tool collections for the Ragent agentic framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1.2 103 5/3/2026
0.0.1.1 100 5/3/2026