Skip to main content

Samples

All samples are runnable projects in the samples/ directory. Each demonstrates a specific pattern or integration.

Getting Started

SampleDescription
CliAgentMinimal multi-turn streaming REPL — the simplest possible agent
QuickstartSampleThe code from the Getting Started page as a runnable project
DiAgentFull dependency injection wiring with IServiceCollection

Web & API

SampleDescription
AspNetAgentSSE /chat endpoint with session continuity
ChatUIBrowser chat UI with server-sent events and tool call badges
CustomerServiceApiProduction REST API with file-based session persistence
BlazorResearchBlazor Server app with live parallel agent cards
SwarmResearchWebWeb-based swarm research interface

Multi-Agent

SampleDescription
MultiAgentPipelineSequential and parallel orchestration patterns
OrchestratedResearchAll three orchestration patterns (pipeline, parallel, graph)
SupportTriageGraph routing with hooks and structured output
FinanceAssistant4-agent parallel swarm for financial analysis
SwarmResearchMulti-agent swarm research pattern
DistributedAgentsA2A cross-process agent communication

Deployment

SampleDescription
AotLambdaNativeAOT Lambda deployment — 93ms average cold start
DurableWorkflowStep Functions orchestrated multi-stage pipeline with stage-level retries
AgentCoreSampleAmazon Bedrock AgentCore Runtime deployment
AgentCoreGatewaySampleAgentCore Gateway tool integration with web UI

Specialized

SampleDescription
FileAgentFile system operations with built-in file tools
AutoTrimAssistantAutomatic context window trimming with sliding window
PersistentAssistantCross-run memory with conversation summarization
ResponsibleAiSampleGuardrails and responsible AI patterns
CodeInterpreterSampleAgentCore Code Interpreter tool integration
BrowserSampleAgentCore Browser tool for web interaction
SemanticMemorySampleAgentCore Semantic Memory for knowledge retrieval