-
-
Notifications
You must be signed in to change notification settings - Fork 13
AmazonBedrock
Rasmus Wulff Jensen edited this page Jan 27, 2026
·
1 revision
- AgentFactory (
AmazonBedrockAgentFactory) - AIToolsFactory integration (tools in
AmazonBedrockAgentOptions.Tools)
dotnet add package AgentFrameworkToolkit.AmazonBedrock
using AgentFrameworkToolkit.AmazonBedrock;
using Amazon;
using Microsoft.Extensions.AI;
AmazonBedrockAgentFactory agentFactory = new(new AmazonBedrockConnection
{
Region = RegionEndpoint.EUNorth1,
ApiKey = "<your-bedrock-api-key>"
});
AmazonBedrockAgent agent = agentFactory.CreateAgent(new AmazonBedrockAgentOptions
{
Model = "eu.anthropic.claude-haiku-4-5-20251001-v1:0",
Instructions = "You are a helpful assistant",
Tools = [AIFunctionFactory.Create((string city) => "sunny", "get_weather")]
});
AgentRunResponse response = await agent.RunAsync("Hello");
Console.WriteLine(response.Text);-
Region(RegionEndpoint, required) -
ApiKey(optional, bearer token) -
NetworkTimeout(optional)
builder.Services.AddAmazonBedrockAgentFactory(RegionEndpoint.EUNorth1, "<apiKey>");
builder.Services.AddAmazonBedrockAgentFactory(new AmazonBedrockConnection
{
Region = RegionEndpoint.EUNorth1,
ApiKey = "<apiKey>"
});-
ApiKeyis applied via theAWS_BEARER_TOKEN_BEDROCKenvironment variable (if not already defined). - See Connections for shared credential guidance and connection patterns.
- See AgentFactories for shared agent options and middleware.
- See AIToolsFactory and CommonTools for tool creation.