Rapid.Agentic.AI.Framework 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rapid.Agentic.AI.Framework --version 2.0.0
                    
NuGet\Install-Package Rapid.Agentic.AI.Framework -Version 2.0.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="Rapid.Agentic.AI.Framework" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rapid.Agentic.AI.Framework" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Rapid.Agentic.AI.Framework" />
                    
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 Rapid.Agentic.AI.Framework --version 2.0.0
                    
#r "nuget: Rapid.Agentic.AI.Framework, 2.0.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 Rapid.Agentic.AI.Framework@2.0.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=Rapid.Agentic.AI.Framework&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Rapid.Agentic.AI.Framework&version=2.0.0
                    
Install as a Cake Tool

Rapid.Agentic.AI.Framework

Rapid.Agentic.AI.Framework is a lightweight .NET library that simplifies integration with Retrieval-Augmented Generation (RAG) systems and Ollama LLMs. It provides intuitive gateway interfaces for building intelligent applications that can chat, generate content, and ingest domain-specific documents such as PDFs.


โœจ Features

  • ๐Ÿค– Ollama Integration: Send prompts and receive completions from local or remote Ollama servers.
  • ๐Ÿ“„ Document Ingestion: Upload and convert PDFs into vectorized knowledge for retrieval.
  • ๐Ÿง  RAG-Powered Answers: Ask questions based on your custom data (uploaded documents).
  • ๐Ÿงผ Stateful & Stateless Chat: Clearable chat histories to manage conversational memory.

๐Ÿ” RAG Gateway (IRagGateway)

  • Upload and process PDF documents
  • Query domain-specific knowledge with context
  • Generate answers and summaries
  • Statefull and Stateless by default, with optional history reset

๐Ÿค– Ollama Gateway (IOllamaGateway)

  • Lightweight prompt-based chat and content generation
  • Statefull and Stateless by default, with optional history reset

๐Ÿงช Use Cases

  • RAG-enabled customer support systems
  • AI-driven PDF analysis tools
  • Developer tools for querying technical documentation
  • AI assistants embedded in enterprise software

๐Ÿ“ฆ Installation

Install from NuGet.org:

dotnet add package Rapid.Agentic.AI.Framework

Or via Package Manager Console:

Install-Package Rapid.Agentic.AI.Framework

๐Ÿš€ Getting Started

๐Ÿ“ฆ Prerequisites

  • .NET 6 or later
  • Ollama running locally (default port http://localhost:11434)
  • A downloaded model (e.g., llama3, llama3.2:1b, etc.)

๐Ÿงฑ Example Model Names

  • llama3
  • llama3.2:1b
  • mistral

Any other model available through Ollama

Ensure the model is already pulled by running:

ollama run llama3.2:1b

๐Ÿงช Usage

๐Ÿญ 1. Factory Class

public interface IAgenticClientFactory
{
     IRagGateway CreateRagGateway(string ollamaUrl, string model, string dbPath = "rag.db");
     IOllamaGateway CreateOllamaGateway(string ollamaUrl, string model);
}

๐Ÿ” 1. RAG Gateway

public interface IRagGateway
{
    Task<string> ChatAsync(string question);
    void ClearChatHistory();
    Task<string> GenerateAsync(string question, bool enableStreaming);
    Task UploadFileAsync(string pdfPath);
}
โœจ 1. Usage example - Summarizing a PDF document

var factory = new AgenticClientFactory();
var rag = factory.CreateRagGateway("http://localhost:11434", "llama3");

await rag.UploadFileAsync("documents/manual.pdf");

string summary = await rag.GenerateAsync("Summarize the manual.", enableStreaming: false);
Console.WriteLine(summary);
โœจ 2. Usage example - Reviewing c# source code
var factory = new AgenticClientFactory();
var rag = factory.CreateRagGateway("http://localhost:11434", "llama3");

await rag.UploadFileAsync("documents/MyAlgorithm.cs");

string summary = await rag.GenerateAsync("Review the cs file", enableStreaming: false);
Console.WriteLine(summary);
โœจ 3. Usage example - without uploading local file
var factory = new AgenticClientFactory();
var rag = factory.CreateRagGateway("http://localhost:11434", "llama3");

string summary = await rag.GenerateAsync("What are the best tourist places in Bangalore", enableStreaming: false);
Console.WriteLine(summary);
โœจ 4. Chat Usage example (Multi-Turn) - Reviewing c# source code and asking for fix
var factory = new AgenticClientFactory();
var rag = factory.CreateRagGateway("http://localhost:11434", "llama3");

await rag.UploadFileAsync("documents/MyAlgorithm.cs");

string summary = await rag.ChatAsync("Review the cs file", enableStreaming: false);
Console.WriteLine(summary);

string modifiedsummary = await rag.ChatAsync("Provide me top review comments with potential fix", enableStreaming: false);
Console.WriteLine(modifiedsummary);
๐Ÿ”„ To Clear Chat History:
rag.ClearChatHistory();

๐Ÿค– 2. IOllamaGateway

public interface IOllamaGateway
{
    string ChatAsync(string prompt, string model = "");
    void ClearChatHistory();
    string GenerateAsync(string prompt, string model = "");
}
โœจ 1. Chat Usage example with Context (Multi-Turn)

var factory = new AgenticClientFactory();
var ollama = factory.CreateOllamaGateway(ollamaUrl, myModel);

string response = ollama.ChatAsync("Tell me about India?");
Console.WriteLine(response);

string responseUpdated = ollama.ChatAsync("What are the best tourist places?");
Console.WriteLine(responseUpdated);

ollama.ClearChatHistory();
โœจ 1. Content generation Usage example

var factory = new AgenticClientFactory();
var ollama = factory.CreateOllamaGateway(ollamaUrl, myModel);

string response = ollama.GenerateAsync("Tell me about India?");
Console.WriteLine(response);
๐Ÿ”„ To Clear Chat History:
OllamaClient.ClearChatHistory();

๐Ÿ“ƒ License

The Core Framework is not open-source, but is freely distributed via NuGet.

For commercial use, licensing, or integration support:

๐Ÿ“ง support@vedicaai.com or aruna.devadiga@gmail.com


๐Ÿ™‹ Support & Contributions

This framework is not open source, but it is freely distributed via NuGet. If you encounter issues, bugs, or have suggestions, feel free to reach out to the maintainers or submit feedback via the appropriate support channels.

๐Ÿ“ง support@vedicaai.com or aruna.devadiga@gmail.com


Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.

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
3.2.6 62 9/7/2025
3.2.3 59 9/6/2025
3.2.0 64 9/6/2025
3.1.1 66 8/16/2025
3.1.0 60 8/16/2025
3.0.1 57 8/16/2025
3.0.0 68 8/16/2025
2.1.9 59 8/16/2025
2.1.8 132 8/14/2025
2.1.7 305 6/12/2025
2.1.6 215 6/9/2025
2.1.4 144 6/2/2025
2.1.3 153 5/29/2025
2.1.2 146 5/29/2025
2.1.1 149 5/25/2025
2.1.0 153 5/25/2025
2.0.5 102 5/25/2025
2.0.2 80 5/24/2025
2.0.0 123 5/23/2025
1.0.1 161 5/21/2025

- Complete RAG Framework implementation added
- OllamaGateway for easy integration with Ollama