AgentFrameworkToolkit.Groq 1.13.0

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

Agent Framework Toolkit @ Groq

This package targets Groq as an LLM provider. Check out the general README for other providers and shared features in Agent Framework Toolkit.

What is Agent Framework Toolkit?

Agent Framework Toolkit is an opinionated C# wrapper on top of the Microsoft Agent Framework that makes advanced agent configuration, tools, middleware, and structured output easier to use.

Groq exposes an OpenAI-compatible API, so this provider uses the shared AgentFrameworkToolkit.OpenAI.AgentOptions configuration surface. Both Chat Completions (ClientType.ChatClient) and the Responses API (ClientType.ResponsesApi) are supported. Chat Completions is the default.

Getting Started

  1. Install the AgentFrameworkToolkit.Groq NuGet package: dotnet add package AgentFrameworkToolkit.Groq
  2. Get a Groq API key
  3. Create a GroqAgentFactory
  4. Create and run a GroqAgent

Minimal Example

GroqAgentFactory agentFactory = new("<API Key>");
GroqAgent agent = agentFactory.CreateAgent(GroqChatModels.GptOss20B);

AgentResponse response = await agent.RunAsync("Hello World");
Console.WriteLine(response.Text);

Options Example

GroqAgentFactory agentFactory = new(new GroqConnection
{
    ApiKey = "<API Key>",
    NetworkTimeout = TimeSpan.FromMinutes(5),
    DefaultClientType = ClientType.ResponsesApi
});

GroqAgent agent = agentFactory.CreateAgent(new AgentOptions
{
    Model = GroqChatModels.GptOss20B,
    ClientType = ClientType.ResponsesApi,
    Instructions = "You are a helpful AI.",
    MaxOutputTokens = 2000,
    Tools = []
});

AgentResponse response = await agent.RunAsync("Hello World");
Console.WriteLine(response.Text);

The endpoint defaults to https://api.groq.com/openai/v1 and can be overridden through GroqConnection.Endpoint.

Model Constants

GroqChatModels contains the chat-compatible production models, production systems, and preview models published in the Groq supported-models catalog. Audio-only models are not exposed because they cannot be used with GroqAgentFactory. Preview models can be discontinued at short notice; consult the Groq catalog before relying on one in production.

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.13.0 38 7/17/2026