Skip to content

Commit e110fc2

Browse files
author
Elizabeth
committed
Update deploy-to-production sample-test files and README.md
1 parent af528dc commit e110fc2

4 files changed

Lines changed: 192 additions & 293 deletions

File tree

deploy-to-production/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@
44

55
Deploy the multimodal travel assistant agent to production using [Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html). This agent features persistent memory, multimodal content analysis (images, videos, documents), and personalized travel recommendations.
66

7+
### AgentCore Services
8+
9+
- **[AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime.html)** ⭐ - Serverless execution with auto-scaling and session management
10+
- **[AgentCore Identity](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity.html)** - Secure credential management for API keys and tokens
11+
- **[AgentCore Memory](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory.html)** ⭐ - State persistence and conversation history
12+
- **[AgentCore Code Interpreter](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-tool.html)** - Secure code execution sandbox
13+
- **[AgentCore Browser](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/browser-tool.html)** - Cloud browser automation
14+
- **[AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html)** - API management and tool discovery
15+
- **[AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html)** - Monitoring, tracing, and debugging
16+
- **[AgentCore Policy](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy.html)** - Deterministic control and security boundaries for agent-tool interactions
17+
- **[AgentCore Evaluations](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations.html)** - Automated assessment and performance measurement for agents
18+
719
## Production Features
820

921
- **Persistent Memory**: Cross-session memory using Bedrock AgentCore Memory
22+
- **Short-term Memory**: Captures turn-by-turn interactions within a single session
23+
- **Long-term Memory**: Automatically extracts and stores key insights across multiple sessions
1024
- **Multimodal Analysis**: Process images, videos, and documents with built-in tools
1125
- **Travel Expertise**: Personalized recommendations based on user preferences
1226
- **Production Ready**: Secure, scalable deployment on AWS infrastructure
@@ -17,6 +31,7 @@ Deploy the multimodal travel assistant agent to production using [Amazon Bedrock
1731
- **Python 3.10+** installed
1832
- **AWS CLI configured** (`aws configure`)
1933
- **Model Access**: Enable `us.anthropic.claude-3-5-sonnet-20241022-v2:0` in Amazon Bedrock console
34+
- Basic understanding of [AI agents](https://aws.amazon.com/what-is/ai-agents/) and [AWS services](https://aws.amazon.com/what-is-aws/)
2035

2136
## Installation
2237

@@ -54,6 +69,20 @@ Or specify a different region:
5469
agentcore configure -e multimodal_agent.py -r us-east-1
5570
```
5671

72+
### Custom Header Configuration
73+
74+
Select YES in *Request Header Allow list*, and in *Request Header Allow* paste `X-Amzn-Bedrock-AgentCore-Runtime-Custom-Actor-Id`
75+
76+
This header allows passing a user identifier from your application to the agent. The agent extracts it from `context.request_headers` (normalized to lowercase: `x-amzn-bedrock-agentcore-runtime-custom-actor-id`) and uses it to namespace memory per user.
77+
78+
At the end `.bedrock_agentcore.yaml`, must look like this:
79+
80+
```yaml
81+
request_header_configuration:
82+
requestHeaderAllowlist:
83+
- X-Amzn-Bedrock-AgentCore-Runtime-Custom-Actor-Id
84+
```
85+
5786
This creates a `.bedrock_agentcore.yaml` configuration file.
5887

5988
**Note**: When you enable memory during configuration, the AgentCore CLI automatically creates the memory resource (if needed) and sets the `BEDROCK_AGENTCORE_MEMORY_ID` environment variable during deployment. Your agent code reads this variable automatically.
@@ -114,6 +143,8 @@ This script tests:
114143
- Cross-session memory recall
115144
- User-specific memory isolation
116145

146+
**Important:** Long-term memory extraction is an [asynchronous background process](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/long-term-saving-and-retrieving-insights.html#long-term-step-2-retrieve-extracted-insights) that can take a minute or more. The test waits 60 seconds between invocations for reliable memory retrieval.
147+
117148
**Generate test content (optional):**
118149

119150
If you need sample travel content for testing, use the travel content generator from the parent directory:
@@ -161,8 +192,10 @@ The notebook demonstrates:
161192

162193
**If you want to start using the agent by creating your own code, keep the following points in mind**:
163194
- Session IDs must be 33+ characters for proper session management
195+
- Use custom headers for user identification: `X-Amzn-Bedrock-AgentCore-Runtime-Custom-Actor-Id`
164196
- Same user ID enables cross-session memory
165197
- Different session IDs simulate different conversations
198+
- Headers are normalized to lowercase in the agent code
166199

167200

168201
## Locate AWS Resources After Deployment

0 commit comments

Comments
 (0)