Strands.AgentCore 0.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Strands.AgentCore --version 0.1.2
                    
NuGet\Install-Package Strands.AgentCore -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Strands.AgentCore" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Strands.AgentCore" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Strands.AgentCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Strands.AgentCore --version 0.1.2
                    
#r "nuget: Strands.AgentCore, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Strands.AgentCore@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Strands.AgentCore&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Strands.AgentCore&version=0.1.2
                    
Install as a Cake Tool

Strands.AgentCore

Deploy any Strands.NET agent to Amazon Bedrock AgentCore Runtime with one line. Optionally use AgentCore managed services — Memory, Browser, and Code Interpreter — as tools your agent can invoke.

dotnet add package Strands.AgentCore

Your agent code is unchanged

using Strands.AgentCore.Hosting;
using Strands.AgentCore.Extensions;
using Strands.Extensions.DI;

var builder = WebApplication.CreateBuilder(args);

// ── Agent configuration — identical whether running locally or on AgentCore Runtime ──
builder.Services
    .AddBedrockModel("us-east-1")
    .AddAgentCoreBrowser()                  // optional managed browser
    .AddAgentCoreCodeInterpreter()          // optional managed code execution
    .AddAgentCoreSessionManager(            // optional managed session storage
        Environment.GetEnvironmentVariable("AGENTCORE_MEMORY_ID") ?? "")
    .AddStrandsAgent("You are a helpful assistant.");

// ── AgentCore hosting — one line makes this deployable to AgentCore Runtime ──
var app = builder.Build();
app.MapAgentCoreEndpoints();  // POST /invocations + GET /health
app.UseAgentCorePort(8080);   // AgentCore Runtime expects port 8080
app.Run();

Python equivalent: BedrockAgentCoreApp() + @app.entrypoint + app.run()

Test locally before deploying

dotnet run

# Non-streaming
curl -X POST http://localhost:8080/invocations \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What is 42 multiplied by 1764?"}'

# Streaming
curl -X POST http://localhost:8080/invocations \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{"prompt": "Explain quantum computing in 3 sentences"}'

# Health check (required by AgentCore Runtime)
curl http://localhost:8080/health

What this package provides

Component What it does
MapAgentCoreEndpoints() Registers POST /invocations + GET /health on your WebApplication
UseAgentCorePort(8080) Binds to port 8080 — required by AgentCore Runtime
AgentCoreSessionManager Persists conversation history to AgentCore Memory
AgentCoreMemoryTool Agent-initiated explicit memory operations
AgentCoreBrowserTool Managed browser sandbox for JS-rendered pages
AgentCoreCodeInterpreterTool Managed code execution sandbox

Additive and optional

This package adds zero changes to Strands.Core, Strands.Models.Bedrock, or any other package. An agent built with Strands.Core compiles and runs identically with or without Strands.AgentCore installed.

AgentCore Gateway

Connect your agent to tools hosted on an Amazon Bedrock AgentCore Gateway — a managed MCP endpoint that proxies external APIs and services with built-in auth.

// Direct usage
await using var gateway = await AgentCoreGatewayToolProvider.CreateAsync(
    gatewayUrl: new Uri("https://...gateway-url.../mcp"),
    auth: new AgentCoreGatewayAuth.Iam(region: "us-east-1"));

var tools = await gateway.ListToolsAsync();
var agent = new Agent(model, tools: tools);

Three auth modes match your gateway's inbound authorization setting:

new AgentCoreGatewayAuth.Iam(region: "us-east-1")      // IAM SigV4
new AgentCoreGatewayAuth.Bearer(accessToken: token)     // JWT / OIDC
new AgentCoreGatewayAuth.None()                         // network-isolated

With DI, AddAgentCoreGatewayTools() registers all gateway tools directly into the container:

builder.Services
    .AddBedrockModel("us-east-1")
    .AddAgentCoreGatewayTools(gatewayUrl, auth: new AgentCoreGatewayAuth.Iam("us-east-1"))
    .AddStrandsAgent();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.1.4 59 5/9/2026 0.1.4 is deprecated because it is no longer maintained.
0.1.2 47 5/7/2026
0.1.1 45 5/7/2026
0.1.0 48 5/7/2026
0.1.0-preview.2 62 4/28/2026
0.1.0-preview.1 58 4/28/2026