Glacier.AgentDevKit.Adk 1.0.2

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

Agent Development Kit (ADK)

DEV.to Story NuGet

📖 Read the Deep-Dive: C# got left behind in the AI Agent hype. So I fixed it. (AgentDevKit)

Welcome to the Agent Development Kit. This C# library is designed to help you create "Agents"—AI personalities that don't just talk, but think, plan, and act using real-world tools.

What is an Agent?

Think of it as a specialized job description for an AI. While ChatGPT is a generalist, an ADK Agent is an expert (like a "Database Researcher" or "Python Expert") equipped with the specific tools and instructions needed for that role.


Why Agent Development Kit (ADK)?

This project was inspired by the official Google Agent SDKs available for other languages. Recognizing that a robust, production-ready C# implementation was missing, this ADK was created to fill that gap.

It provides .NET developers with a native, high-performance way to build sophisticated AI agents using Google's Gemini models and the Model Context Protocol (MCP), while following established patterns for agent orchestration.


The Brain

At the center of everything is the LlmAgent. It takes your instructions and uses a Language Model (like Google Gemini or Google Gemma) to decide what to do next.

Agent Architecture Figure 1: High-level Agent Architecture showing the loop of thought.

Getting Started

// 1. Setup the Brain connections
var llm = new GeminiService(apiKey);

// 2. Create your Agent character
var agent = new LlmAgent(
    name: "ChefBot",
    instructions: "You are an expert chef. Give short, punchy recipes."
);

// 3. Ask it a question
string result = await agent.RunAsync("How do I make a grilled cheese?", llm);

The Hands (Tools)

Tools are what make agents truly powerful. Without tools, an AI can only talk. With tools, an AI can read files, calculate math, or search the web.

Dynamic Capability: When an agent realizes it needs information it doesn't have (like the current time or a file's contents), it will automatically pause, call a Tool, and use the result to finish its reply.

// Define a new capability
public class FileReadTool : ITool { ... }

// Give the hands to the agent
agent.Tools.Add(new FileReadTool());

The Memory

By default, AI models have "Goldfish Memory"—they forget every request as soon as it's done. Our SDK uses Sessions to give them long-term memory.

// Using Sqlite lets your agent remember things even if you restart the app!
var memory = new SqliteSessionProvider("Data Source=agents.db");

// Load the history for "User_42"
var (history, save) = await memory.GetSessionAsync("User_42");

// Run the agent with that history
var response = await agent.RunAsync(prompt, llm, history);

// Save the new conversation part
await save(agent.History);

Building Teams (Delegation)

One agent is smart, but a Team of Agents is unstoppable. You can give one agent (The Manager) another agent (The Specialist) as a tool.

Delegation Pattern Figure 2: The Delegation Tool pattern.

var researcher = new LlmAgent("Researcher", "Find facts...");
var manager = new LlmAgent("Manager", "Guide the project...");

// Manager now has a "Researcher Tool"
manager.Tools.Add(new DelegationTool(researcher, llm));

Design Patterns

Orchestration helps you solve huge problems by breaking them into patterns. These three patterns are the foundation of all advanced agent workflows.

1. Sequential Pipeline

The simplest pattern. Data flows in a straight line from one expert to another. Each agent refines or transforms the output of the previous one.

Sequential Pipeline Figure 3: Sequential flow. Ideal for cleaning, translating, or formatting data.

2. Parallel Workflow

Perfect for speed. One task is divided and sent to multiple agents at once. A "merger" step then combines their findings into a single response.

Parallel Workflow Figure 4: Parallel execution. Used for searching multiple sources simultaneously.

3. Loop Workflow

For high-quality results. An agent creates content, and a "Validator" checks it against rules. If it fails, the agent is told what to fix and tries again.

Loop Workflow Figure 5: Loop pattern. Great for code generation or fact-checking.


Dynamic Tools (MCP)

The Model Context Protocol is an industry standard. It lets your agent "plug in" to a database, a local file system, or a web search engine without writing any custom C# code.

// Auto-connect to a local SQLite database using MCP
var mcp = new McpService();
var databaseTools = await mcp.InitializeFromConfigAsync(config);

agent.Tools.AddRange(databaseTools);

Security & Safety

In the real world, agents can be dangerous. Our SDK provides Guardrails and Manual Approvals to keep your agents safe and compliant.

Human-in-the-Loop (HITL): By wrapping a tool in SensitiveTool, you ensure the agent cannot run it without explicit permission from a human using the IApprovalService.

// 1. Define a tool as "Sensitive"
var tool = new SensitiveTool(new DeleteDatabaseTool());

// 2. Provide an approval mechanism (e.g. CLI, Web, or Email)
agent.ApprovalService = new ConsoleApprovalService();

Guardrail Interceptors

Use the BeforeToolCall hook to modify or block requests before they reach a tool. This is perfect for Path Sanitization or Token Filtering.

agent.BeforeToolCall = async (tool, args) => {
    if (args.Contains("..")) {
        throw new SecurityException("Path breakout attempt!");
    }
    return args;
};

🛡️ Robustness & Retries

Modern LLMs (especially smaller local ones) can sometimes produce malformed JSON or include conversational noise when calling tools. The ADK includes built-in safeguards to handle these scenarios.

Resilient Parsing & Self-Correction

The SDK automatically "extracts" JSON blocks from noisy strings. If a tool call is still invalid, the agent provides feedback to the model and automatically retries the request.

Self-Correction Loop Figure 6: The Self-Correction Loop for malformed outputs.

// Configure a robust agent with a retry budget
var agent = new LlmAgent(...) {
    MaxRetries = 3 // Automatically fix malformed output up to 3 times
};

Seeing the Logic (Telemetry)

Ever wonder why an AI said something? Our SDK has built-in OpenTelemetry. You can watch the "mental flow" of your agents in production-grade dashboards.

Visibility: Track exactly how many tokens were used, how much it cost, and the specific sequence of tool calls that led to an answer.


Credits

Developed by Ian Cowley and Antigravity (Google DeepMind).

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
1.0.2 92 5/20/2026
1.0.1 96 5/14/2026