Skip to content
Rasmus Wulff Jensen edited this page Jul 17, 2026 · 1 revision

NuGet README

Features

  • AgentFactory (GroqAgentFactory)
  • AIToolsFactory integration (tools in AgentOptions.Tools)
  • OpenAI-compatible Chat Completions and Responses API support
  • Model constants in GroqChatModels

Package

dotnet add package AgentFrameworkToolkit.Groq

Quick start

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

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

Connection options

  • ApiKey (required)
  • Endpoint (optional, defaults to https://api.groq.com/openai/v1)
  • NetworkTimeout
  • DefaultClientType (ChatClient by default)
  • AdditionalOpenAIClientOptions

Dependency injection

builder.Services.AddGroqAgentFactory("<apiKey>");
builder.Services.AddGroqAgentFactory(new GroqConnection
{
    ApiKey = "<apiKey>",
    NetworkTimeout = TimeSpan.FromMinutes(5),
    DefaultClientType = ClientType.ResponsesApi
});

Notes

  • Groq uses an OpenAI-compatible endpoint and the shared AgentFrameworkToolkit.OpenAI.AgentOptions configuration surface.
  • Preview model constants can be discontinued at short notice; check the Groq model catalog before relying on one in production.
  • See AgentFactories for shared agent options and middleware.
  • See AIToolsFactory for tool creation and MCP support.

Clone this wiki locally