Agent Implementation:
src/agents/agent_runtime.py- FastAPI server with basic agent functionalitysrc/agents/agent_native_memory.py- Agent with native memory integration using AgentCoreMemorySessionManagersrc/agents/agent_with_built_in_tools.py- Flask app with built-in code interpreter toolsrc/docker/Dockerfile.runtime- Docker configuration for runtime agentsrc/docker/Dockerfile.native- Docker configuration for native memory agentsrc/docker/pyproject.toml- Python dependencies
Build & Deploy:
scripts/build_and_push.sh- Build and push Docker image to ECR- Usage:
sh scripts/build_and_push.sh runtime- Deploy basic agentsh scripts/build_and_push.sh native- Deploy memory agent
Testing:
tests/test_agent_runtime.py- Test script for deployed agenttest_memory_primitive.py- Test script for memory functionalitytests/test_code_interpreter.py- Test script for code interpreter functionality- Usage:
python tests/test_agent_runtime.py
-
Build and deploy:
sh scripts/build_and_push.sh runtime
-
Update Bedrock AgentCore with new image URI
-
Test the deployed agent:
python tests/test_agent_runtime.py
-
Build and deploy:
sh scripts/build_and_push.sh native
-
Update Bedrock AgentCore with new image URI
-
Test memory functionality:
python test_memory_primitive.py
-
Run locally:
cd src/agents python agent_with_built_in_tools.py -
Test code interpreter functionality:
python tests/test_code_interpreter.py # Use http://localhost:8080 when prompted for endpoint
The native memory agent uses AgentCoreMemorySessionManager which:
- Automatically saves conversation history to AgentCore Memory
- Retrieves relevant context for each interaction
- Provides transparent memory management without manual tool calls
The code interpreter agent uses CodeInterpreter from bedrock_agentcore.tools which:
- Executes Python code in a secure sandbox environment
- Handles portfolio calculations and data analysis
- Maintains separate code execution sessions per user
- ECR Repository:
998846730471.dkr.ecr.us-east-1.amazonaws.com/agentcore-test - Agent ARN:
arn:aws:bedrock-agentcore:us-east-1:998846730471:runtime/first_testing_agent-qt0qXTEqu4 - Memory ID:
TestMemory_20250926064545-57A2248i7b