-
-
Notifications
You must be signed in to change notification settings - Fork 12
Anthropic
Rasmus Wulff Jensen edited this page Jan 27, 2026
·
4 revisions
- AgentFactory (
AnthropicAgentFactory) - AIToolsFactory integration (tools in
AnthropicAgentOptions.Tools) - Thinking budget via
BudgetTokens - Requires
MaxOutputTokenson agent creation
dotnet add package AgentFrameworkToolkit.Anthropic
AnthropicAgentFactory agentFactory = new("<apiKey>");
AnthropicAgent agent = agentFactory.CreateAgent(new AnthropicAgentOptions
{
Model = "claude-haiku-4-5",
MaxOutputTokens = 2000,
BudgetTokens = 1024,
Instructions = "You are a nice AI"
});
AgentRunResponse response = await agent.RunAsync("Hello World");
Console.WriteLine(response);-
ApiKey(required) -
NetworkTimeout(optional) -
Endpoint(optional, override base URL)
builder.Services.AddAnthropicAgentFactory("<apiKey>");
builder.Services.AddAnthropicAgentFactory(new AnthropicConnection
{
ApiKey = "<apiKey>",
NetworkTimeout = TimeSpan.FromMinutes(5)
});- See AgentFactories for shared agent options and middleware.
- See AIToolsFactory for tool creation and MCP support.