# awslabs/agentcore-samples architecture

> Architecture diagram of the GitHub repository awslabs/agentcore-samples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/awslabs/agentcore-samples
- Repository: https://github.com/awslabs/agentcore-samples

## Overview

This repository is a catalog of Amazon Bedrock AgentCore tutorials and reference applications, not one integrated runtime. The README describes a user path from creating an agent through deploying and operating it, while the tree shows examples for hosting, tools, advanced runtime behaviors, governance, and application use cases. The graph maps these documented capability areas and representative sample paths; most sample implementations were not inspected, so it avoids implying that separate examples call one another.

Main entry points: [`00-getting-started/main.py`](https://github.com/awslabs/agentcore-samples/blob/main/00-getting-started/main.py) (Getting started), [`06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lambda/agentcore-policy-engine/agentcore_policy_engine.py`](https://github.com/awslabs/agentcore-samples/blob/main/06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lambda/agentcore-policy-engine/agentcore_policy_engine.py) (Policy engine handler), [`01-features/02-host-your-agent/01-runtime/01-hosting-agents/01-http-protocol/01-strands-bedrock/invoke.py`](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/01-http-protocol/01-strands-bedrock/invoke.py) (HTTP hosting), [`01-features/02-host-your-agent/01-runtime/01-hosting-agents/02-a2a-protocol/invoke.py`](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/02-a2a-protocol/invoke.py) (A2A hosting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_start["Build Agents"]
  node_getting_started["Getting started<br/>[main.py]"]
  node_harness["Harness examples<br/>[getting_started.py]"]
end

subgraph group_host["Host and Operate"]
  node_host_http["HTTP hosting<br/>[invoke.py]"]
  node_host_a2a["A2A hosting<br/>[invoke.py]"]
  node_host_agui["AG-UI hosting<br/>[invoke.py]"]
  node_streaming["Streaming<br/>[invoke.py]"]
  node_sessions["Sessions<br/>[invoke.py]"]
  node_multi_agent["Multi-agent"]
end

subgraph group_capabilities["Agent Capabilities"]
  node_mcp_servers["MCP servers<br/>[mcp_server.py]"]
  node_gateway["Gateway integration"]
  node_memory["Persistent filesystem<br/>[agent.py]"]
  node_tools["Built-in tools<br/>[agent.py]"]
  node_observability["Observability sample<br/>[invoke.py]"]
  node_evaluation["Agent evaluation<br/>[evaluation.py]"]
end

subgraph group_applications["Applications"]
  node_weather_app["Weather agent app<br/>[agent.py]"]
  node_customer_service["Customer service"]
  node_review_ui["Review UI<br/>[useReviews.ts]"]
end

subgraph group_governance["Governance"]
  node_policy_cdk["Policy resources"]
  node_policy_engine["Policy engine handler"]
  node_sandbox_policy["Sandbox authorization<br/>[policy_engine.py]"]
end

node_developer(("Agent developer"))
node_agentcore{{"AgentCore services"}}
node_user(("Application user"))

node_developer -->|"starts with"| node_getting_started
node_developer -->|"explores examples"| node_harness
node_getting_started -.->|"deploys to"| node_agentcore
node_host_http -.->|"invokes runtime"| node_agentcore
node_host_a2a -.->|"invokes runtime"| node_agentcore
node_host_agui -.->|"invokes runtime"| node_agentcore
node_streaming -.->|"invokes runtime"| node_agentcore
node_sessions -.->|"invokes runtime"| node_agentcore
node_mcp_servers -.->|"hosts tools"| node_agentcore
node_gateway -.->|"integrates gateway"| node_agentcore
node_memory -.->|"uses runtime"| node_agentcore
node_tools -.->|"uses runtime"| node_agentcore
node_observability -.->|"observes runtime"| node_agentcore
node_evaluation -.->|"evaluates agent"| node_agentcore
node_user -->|"uses"| node_weather_app
node_user -->|"uses"| node_customer_service
node_user -->|"reviews tasks"| node_review_ui
node_policy_cdk -->|"dispatches resource actions"| node_policy_engine
node_policy_engine -->|"manages policies"| node_agentcore
node_sandbox_policy -.->|"authorizes actions"| node_agentcore
node_multi_agent -.->|"runs agent"| node_agentcore

click node_getting_started "https://github.com/awslabs/agentcore-samples/blob/main/00-getting-started/main.py"
click node_harness "https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/00-getting-started/getting_started.py"
click node_host_http "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/01-http-protocol/01-strands-bedrock/invoke.py"
click node_host_a2a "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/02-a2a-protocol/invoke.py"
click node_host_agui "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/03-ag-ui-protocol/invoke.py"
click node_streaming "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/01-streaming-responses/invoke.py"
click node_sessions "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/02-session-management/invoke.py"
click node_multi_agent "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/06-multi-agent/orchestrator_agent.py"
click node_mcp_servers "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/02-hosting-tools/01-mcp-server-basics/mcp_server.py"
click node_gateway "https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/01-advanced-examples/02-gateway-integration/gateway_integration.py"
click node_memory "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/07-persistent-filesystems/agent.py"
click node_tools "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/05-execute-commands/agent.py"
click node_observability "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/04-observability-with-strands/invoke.py"
click node_evaluation "https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/02-use-cases/04-weather-agent/backend/evaluation.py"
click node_weather_app "https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/02-use-cases/04-weather-agent/backend/agent.py"
click node_customer_service "https://github.com/awslabs/agentcore-samples/blob/main/05-blueprints/end-to-end-customer-service-agent/cx-agent-backend/cx_agent_backend/infrastructure/adapters/openai_llm_service.py"
click node_review_ui "https://github.com/awslabs/agentcore-samples/blob/main/02-use-cases/01-conversational-agents/episodic-memory-claims-agent/frontend/src/hooks/useReviews.ts"
click node_policy_cdk "https://github.com/awslabs/agentcore-samples/blob/main/06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lib/agentcore-policy-engine.ts"
click node_policy_engine "https://github.com/awslabs/agentcore-samples/blob/main/06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lambda/agentcore-policy-engine/agentcore_policy_engine.py"
click node_sandbox_policy "https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/04-coding-agents/05-autonomous-coding-agent-durable/sandbox/policy_engine.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_getting_started,node_harness,node_user toneBlue
class node_host_http,node_host_a2a,node_host_agui,node_streaming,node_sessions,node_multi_agent toneAmber
class node_mcp_servers,node_gateway,node_memory,node_tools,node_observability,node_evaluation toneMint
class node_weather_app,node_customer_service,node_review_ui toneRose
class node_policy_cdk,node_policy_engine,node_sandbox_policy,node_developer,node_agentcore toneIndigo
```

## Components

### Build Agents

- [Getting started](https://github.com/awslabs/agentcore-samples/blob/main/00-getting-started/main.py): `00-getting-started/main.py`
- [Harness examples](https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/00-getting-started/getting_started.py): `01-features/01-harness/00-getting-started/getting_started.py`

### Host and Operate

- [HTTP hosting](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/01-http-protocol/01-strands-bedrock/invoke.py): `01-features/02-host-your-agent/01-runtime/01-hosting-agents/01-http-protocol/01-strands-bedrock/invoke.py`
- [A2A hosting](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/02-a2a-protocol/invoke.py): `01-features/02-host-your-agent/01-runtime/01-hosting-agents/02-a2a-protocol/invoke.py`
- [AG-UI hosting](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/03-ag-ui-protocol/invoke.py): `01-features/02-host-your-agent/01-runtime/01-hosting-agents/03-ag-ui-protocol/invoke.py`
- [Streaming](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/01-streaming-responses/invoke.py): `01-features/02-host-your-agent/01-runtime/03-advanced/01-streaming-responses/invoke.py`
- [Sessions](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/02-session-management/invoke.py): `01-features/02-host-your-agent/01-runtime/03-advanced/02-session-management/invoke.py`
- [Multi-agent](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/06-multi-agent/orchestrator_agent.py): `01-features/02-host-your-agent/01-runtime/03-advanced/06-multi-agent/orchestrator_agent.py`

### Agent Capabilities

- [MCP servers](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/02-hosting-tools/01-mcp-server-basics/mcp_server.py): `01-features/02-host-your-agent/01-runtime/02-hosting-tools/01-mcp-server-basics/mcp_server.py`
- [Gateway integration](https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/01-advanced-examples/02-gateway-integration/gateway_integration.py): `01-features/01-harness/01-advanced-examples/02-gateway-integration/gateway_integration.py`
- [Persistent filesystem](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/07-persistent-filesystems/agent.py): `01-features/02-host-your-agent/01-runtime/03-advanced/07-persistent-filesystems/agent.py`
- [Built-in tools](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/03-advanced/05-execute-commands/agent.py): `01-features/02-host-your-agent/01-runtime/03-advanced/05-execute-commands/agent.py`
- [Observability sample](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/01-hosting-agents/04-observability-with-strands/invoke.py): `01-features/02-host-your-agent/01-runtime/01-hosting-agents/04-observability-with-strands/invoke.py`
- [Agent evaluation](https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/02-use-cases/04-weather-agent/backend/evaluation.py): `01-features/01-harness/02-use-cases/04-weather-agent/backend/evaluation.py`

### Applications

- [Weather agent app](https://github.com/awslabs/agentcore-samples/blob/main/01-features/01-harness/02-use-cases/04-weather-agent/backend/agent.py): `01-features/01-harness/02-use-cases/04-weather-agent/backend/agent.py`
- [Customer service](https://github.com/awslabs/agentcore-samples/blob/main/05-blueprints/end-to-end-customer-service-agent/cx-agent-backend/cx_agent_backend/infrastructure/adapters/openai_llm_service.py): `05-blueprints/end-to-end-customer-service-agent/cx-agent-backend/cx_agent_backend/infrastructure/adapters/openai_llm_service.py`
- [Review UI](https://github.com/awslabs/agentcore-samples/blob/main/02-use-cases/01-conversational-agents/episodic-memory-claims-agent/frontend/src/hooks/useReviews.ts): `02-use-cases/01-conversational-agents/episodic-memory-claims-agent/frontend/src/hooks/useReviews.ts`

### Governance

- [Policy resources](https://github.com/awslabs/agentcore-samples/blob/main/06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lib/agentcore-policy-engine.ts): `06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lib/agentcore-policy-engine.ts`
- [Policy engine handler](https://github.com/awslabs/agentcore-samples/blob/main/06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lambda/agentcore-policy-engine/agentcore_policy_engine.py): `06-workshops/02-AgentCore-gateway/04-integration/04-enterprise-mcp-demo/cdk/lambda/agentcore-policy-engine/agentcore_policy_engine.py`
- [Sandbox authorization](https://github.com/awslabs/agentcore-samples/blob/main/01-features/02-host-your-agent/01-runtime/04-coding-agents/05-autonomous-coding-agent-durable/sandbox/policy_engine.py): `01-features/02-host-your-agent/01-runtime/04-coding-agents/05-autonomous-coding-agent-durable/sandbox/policy_engine.py`

### Other components

- **Agent developer**
- **AgentCore services**
- **Application user**

## Connections

- Agent developer → Getting started: starts with
- Agent developer → Harness examples: explores examples
- Getting started → AgentCore services: deploys to
- HTTP hosting → AgentCore services: invokes runtime
- A2A hosting → AgentCore services: invokes runtime
- AG-UI hosting → AgentCore services: invokes runtime
- Streaming → AgentCore services: invokes runtime
- Sessions → AgentCore services: invokes runtime
- MCP servers → AgentCore services: hosts tools
- Gateway integration → AgentCore services: integrates gateway
- Persistent filesystem → AgentCore services: uses runtime
- Built-in tools → AgentCore services: uses runtime
- Observability sample → AgentCore services: observes runtime
- Agent evaluation → AgentCore services: evaluates agent
- Application user → Weather agent app: uses
- Application user → Customer service: uses
- Application user → Review UI: reviews tasks
- Policy resources → Policy engine handler: dispatches resource actions
- Policy engine handler → AgentCore services: manages policies
- Sandbox authorization → AgentCore services: authorizes actions
- Multi-agent → AgentCore services: runs agent
