{ "cells": [ { "cell_type": "markdown", "id": "5c0122e65c053f38", "metadata": {}, "source": [ "## Lab 4: Deploy to Production - Use AgentCore Runtime with Observability\n", "\n", "### Overview\n", "\n", "In Lab 3 we scaled our Customer Support Agent by centralizing tools through AgentCore Gateway with secure authentication. Now we'll complete the production journey by deploying our agent to AgentCore Runtime with comprehensive observability. This will transform our prototype into a production-ready system that can handle real-world traffic with full monitoring and automatic scaling.\n", "\n", "[Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html) is a secure, fully managed runtime that empowers organizations to deploy and scale AI agents in production, regardless of framework, protocol, or model choice. It provides enterprise-grade reliability, automatic scaling, and comprehensive monitoring capabilities.\n", "\n", "**Workshop Journey:**\n", "\n", "- **Lab 1 (Done):** Create Agent Prototype - Built a functional customer support agent\n", "- **Lab 2 (Done):** Enhance with Memory - Added conversation context and personalization\n", "- **Lab 3 (Done):** Scale with Gateway & Identity - Shared tools across agents securely\n", "- **Lab 4 (Current):** Deploy to Production - Used AgentCore Runtime with observability\n", "- **Lab 5:** Build User Interface - Create a customer-facing application\n", "\n", "### Why AgentCore Runtime & Production Deployment Matter\n", "\n", "Current State (Lab 1-3): Agent runs locally with centralized tools but faces production challenges:\n", "\n", "- Agent runs locally in a single session\n", "- No comprehensive monitoring or debugging capabilities\n", "- Cannot handle multiple concurrent users reliably\n", "\n", "After this lab, we will have a production-ready agent infrastructure with:\n", "\n", "- Serverless auto-scaling to handle variable demand\n", "- Comprehensive observability with traces, metrics, and logging\n", "- Enterprise reliability with automatic error recovery\n", "- Secure deployment with proper access controls\n", "- Easy management through AWS console and APIs and support for real-world production workloads.\n", "\n", "\n", "### Adding comprehensive observability with AgentCore Observability\n", "\n", "Additionally, AgentCore Runtime integrates seamlessly with [AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html) to provide full visibility into your agent's behavior in production. AgentCore Observability automatically captures traces, metrics, and logs from your agent interactions, tool usage, and memory access patterns. In this lab we will see how AgentCore Runtime integrates with CloudWatch GenAI Observability to provide comprehensive monitoring and debugging capabilities.\n", "\n", "For request tracing, AgentCore Observability captures the complete conversation flow including tool invocations, memory retrievals, and model interactions. For performance monitoring, it tracks response times, success rates, and resource utilization to help optimize your agent's performance.\n", "\n", "During the observability flow, AgentCore Runtime automatically instruments your agent code and sends telemetry data to CloudWatch. You can then use CloudWatch dashboards and GenAI Observability features to analyze patterns, identify bottlenecks, and troubleshoot issues in real-time.\n", "\n", "### Architecture for Lab 4\n", "