Background and Problem Definition: Bottlenecks in Financial Presentation Creation
The financial services team has been manually creating client PowerPoint presentations by reading hundreds of pages of documents such as quarterly reports, compliance documents, and market analysis materials each week, extracting key data points, structuring slides, and creating supporting visuals. This process consumes significant time and carries risks of human error and lack of consistency. This post, published on the AWS Machine Learning blog, details an end-to-end solution that automates this workflow using an AI agent system based on Amazon Bedrock AgentCore, completing it within 90 seconds according to internal testing standards.
Architecture Overview: Supervisor Agent Based on AgentCore Runtime
The core of the solution is that a single supervisor agent runs on the Amazon Bedrock AgentCore runtime, adopting a tool-based architecture that analyzes user requests and selects and invokes appropriate tools. The AgentCore runtime provides a platform to build, connect, and optimize agents at scale using any framework or model, and the agent code runs in isolated containers with session management, built-in identity, and observability. The implementation of the supervisor logic uses the open-source SDK, Strands Agents framework.
Architecture Data Flow Summary
1. User Request → Amazon API Gateway
2. .NET 8 Minimal API (AWS Lambda, conversation state stored in Amazon DynamoDB)
3. Supervisor Agent (AgentCore Runtime) → Analyzes request and selects tools
4-a. Document Generation: Calls PPTX Generator Lambda (containerized Python function)
4-b. Summary Generation: Summary Generator Lambda → Queries knowledge base via retrieve_and_generate API
5. Document stored in Amazon S3 → Chunking, parsing, embedding (Amazon Titan Text Embeddings v2) → Indexing in Amazon OpenSearch Serverless
6. When calling tools, relevant chunks are searched in OpenSearch Serverless → Context supplied to LLM → Grounded response generated
Tool-Based Orchestration: generate_pptx and generate_summary
The supervisor agent exposes two dedicated tools, calling one or both sequentially or in parallel depending on the nature of the request. It is structured according to the open-closed principle, allowing for capability expansion by simply adding new tools without changing existing functionality.
| Tool Name | Main Role | Call Target | Core Processing Flow | --- | --- | --- | --- | generate_pptx | Complete generation of PowerPoint documents | PPTX Generator Lambda (containerized Python) | Content retrieval from knowledge base → Slide outline generation → AI image generation → Final PPTX assembly | generate_summary | Knowledge base-based summarization and synthesis | Summary Generator Lambda | RAG query via retrieve_and_generate API → Returns grounded summary |
|---|
Key Features
- Anthropic Claude Sonnet 4.6 (provided by Amazon Bedrock): Responsible for content generation
- Stability AI Stable Image Inpaint (provided by Amazon Bedrock): Responsible for slide image generation
- No dependencies between tools → Independent deployment and scaling possible
RAG Pipeline: Grounding with Enterprise Knowledge Base
To reduce the risk of hallucination and reflect the latest enterprise data, a RAG pipeline based on Amazon Bedrock Knowledge Bases has been established.
- Document Upload (S3)
- Chunking and Parsing (multimodal special processing)
- Embedding (Titan Text Embeddings v2)
- Vector Storage and Indexing (OpenSearch Serverless)
- Query Embedding and Similarity Search
- LLM Context Injection and Generation
Detailed Pipeline Steps
1. Document Collection: Upload enterprise documents to Amazon S3 2. Chunking and Parsing: Apply special processing to multimodal content such as tables, charts, and images 3. Embedding: Amazon Titan Text Embeddings v2 converts each chunk into high-dimensional vectors 4. Vector Storage: Amazon OpenSearch Serverless serves as the vector database 5. Query Time: User requests are embedded → Relevant chunks are searched through similarity search 6. Generation: The retrieved chunks are supplied as context to the LLM → Grounded responses generated based on source documents
Important Operational Constraints
The Amazon OpenSearch Serverless collection data plane must maintain public access. This is because Amazon Bedrock Knowledge Bases access OpenSearch Serverless from AWS-managed infrastructure and does not route through customer VPC endpoints. Security is protected by IAM data access policies, with dashboard access restricted to VPC only.
Content Safety: Application of Bedrock Guardrails Multi-Layer
Amazon Bedrock Guardrails are applied throughout the enterprise document generation pipeline to meet organizational standards and compliance requirements. The guardrails are custom-built using AWS CDK and are consistently applied at the model call level.
- Input Processing: Filtering user requests → Preemptively blocking injection and inappropriate content
- Output Generation: Monitoring model outputs → Verifying compliance with content policies
- PII Handling: Detecting personally identifiable information → Anonymization or blocking
Deployment, Integration, and Security: Enterprise-Ready Stack
- API Layer: .NET 8 Minimal API → Easy integration with existing enterprise apps via standard HTTP calls
- Compute: AWS Lambda (serverless) + Container Images (Python runtime for PPTX generation)
- Network Isolation: Amazon VPC isolated deployment
- Encryption: Data encrypted with AWS KMS managed keys
- Access Control: Application of IAM least privilege principle
- State Management: Conversation context stored in Amazon DynamoDB
- Code Assets: Public repository provided → Immediate prototyping and customization possible