Skip to content
Rasmus Wulff Jensen edited this page Dec 26, 2025 · 3 revisions

NuGet README

Features

  • AgentFactory (CohereAgentFactory)
  • AIToolsFactory integration (tools in AgentOptions.Tools)

Package

dotnet add package AgentFrameworkToolkit.Cohere

Quick start

CohereAgentFactory agentFactory = new("<apiKey>");
CohereAgent agent = agentFactory.CreateAgent(new AgentOptions
{
    Model = "command-a-03-2025",
    Instructions = "You are a nice AI"
});

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

Connection options

  • ApiKey (required)
  • Endpoint (optional, defaults to https://api.cohere.ai/compatibility/v1)
  • NetworkTimeout
  • DefaultClientType (Only support ChatClient)
  • AdditionalOpenAIClientOptions

Dependency injection

builder.Services.AddCohereAgentFactory("<apiKey>");
builder.Services.AddCohereAgentFactory(new CohereConnection
{
    ApiKey = "<apiKey>"
});

Notes

Clone this wiki locally