AgentFrameworkToolkit.Groq
1.13.0
dotnet add package AgentFrameworkToolkit.Groq --version 1.13.0
NuGet\Install-Package AgentFrameworkToolkit.Groq -Version 1.13.0
<PackageReference Include="AgentFrameworkToolkit.Groq" Version="1.13.0" />
<PackageVersion Include="AgentFrameworkToolkit.Groq" Version="1.13.0" />
<PackageReference Include="AgentFrameworkToolkit.Groq" />
paket add AgentFrameworkToolkit.Groq --version 1.13.0
#r "nuget: AgentFrameworkToolkit.Groq, 1.13.0"
#:package AgentFrameworkToolkit.Groq@1.13.0
#addin nuget:?package=AgentFrameworkToolkit.Groq&version=1.13.0
#tool nuget:?package=AgentFrameworkToolkit.Groq&version=1.13.0
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
- Install the
AgentFrameworkToolkit.GroqNuGet package:dotnet add package AgentFrameworkToolkit.Groq - Get a Groq API key
- Create a
GroqAgentFactory - 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 | Versions 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. |
-
net8.0
- AgentFrameworkToolkit.OpenAI (>= 1.13.0)
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 | 0 | 7/17/2026 |