ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

Amazon Bedrock AgentCore erstellt Praesentationen vollautomatisch

Ein AI-Agentensystem mit Amazon Bedrock AgentCore erzeugt PowerPoint-Praesentationen direkt aus Unternehmensdokumenten. Ein Supervisor-Agent kombiniert Retrieval Augmented Generation und Amazon Bedrock Guardrails und liefert in unter 90 Sekunden quellenbasierte Folien.

AWS ML BlogMittwoch 15:58 · 14.10.DE8 Min. Lesezeit
Bild: AWS ML Blog

A financial services team spends significant time each week manually creating client PowerPoint presentations from quarterly reports, compliance documents, and market analyses. Each presentation requires reading hundreds of pages, extracting key data points, structuring slides, and generating supporting visuals. This post walks you through building an AI agent system using Amazon Bedrock AgentCore that automates this workflow, completing in under 90 seconds in our internal testing.

This approach reduces presentation creation time while grounding content in source documents. The solution deploys a supervisor agent on AgentCore runtime, a capability of Amazon Bedrock AgentCore, using the Strands Agents framework to orchestrate document generation and summarization tools. Anthropic Claude Sonnet 4.6 (available on Amazon Bedrock) handles content creation, Amazon Titan Text Embeddings v2 powers vector search, and Stability AI Stable Image Inpaint (available on Amazon Bedrock) generates slide images.

This post includes a public repository with the code assets.

The solution deploys a single supervisor agent on Amazon Bedrock AgentCore runtime that selects between document generation and summarization tools based on user requests. A Retrieval Augmented Generation (RAG) pipeline uses Amazon OpenSearch Serverless for vector storage and semantic search across multimodal content.

The solution includes a REST API built with.NET 8 minimal APIs, so you can integrate with existing enterprise applications through standard HTTP calls. AWS Lambda offers serverless compute, including containerized functions for PowerPoint generation. The solution secures the implementation with Amazon Virtual Private Cloud (Amazon VPC) isolation, AWS Key Management Service (AWS KMS) encryption, and AWS Identity and Access Management (IAM) least-privilege access control.

This section covers AgentCore runtime, RAG, and content safety guardrails as they apply to this solution.

A single AI agent generating documents from large knowledge bases must retrieve content, structure outlines, generate text, create images, and assemble files. Rather than implementing these competing responsibilities in a monolithic function, the solution uses a tool-based architecture where a supervisor agent routes requests to specialized tools.

Amazon Bedrock AgentCore runtime provides a platform to build, connect, and optimize agents at scale, with any framework or model. The agent code runs in an isolated container with session management, built-in identity, and observability. The solution uses the Strands Agents framework (an open source SDK for building AI agents) to implement the supervisor logic.

The agent determines whether a request requires document generation, content summarization, or both, then invokes the appropriate tool. You can add new capabilities by defining new tools in the agent code without modifying existing ones.

RAG addresses a fundamental challenge in AI systems: delivering accurate, up-to-date information grounded in enterprise data rather than relying solely on the model’s training data. The implementation uses Amazon Bedrock Knowledge Bases, which combine vector search with large language models (LLMs) to retrieve relevant context before generating responses.

This approach is designed to help reduce hallucinated content by grounding generated documents in source information from the enterprise knowledge base.

Note: The Amazon OpenSearch Serverless collection data plane must remain publicly accessible because Amazon Bedrock Knowledge Bases accesses Amazon OpenSearch Serverless from AWS-managed infrastructure, not through customer VPC endpoints. IAM data access policies protect the collection, and VPC-only access restricts the Amazon OpenSearch Serverless dashboard.

Enterprise AI applications require content moderation to meet organizational standards and compliance requirements. Amazon Bedrock Guardrails offers built-in content filtering and safety mechanisms integrated throughout the document generation pipeline.

The implementation creates custom guardrails through AWS Cloud Development Kit (AWS CDK), configured with specific policies tailored to enterprise document creation. The agent applies guardrails at the model invocation level, providing consistent content safety without requiring manual configuration for each deployment.

The following diagram illustrates the agent-based document generation system.

Figure 1: Architecture of the Amazon Bedrock AgentCore RAG presentation generation system

The data flow begins with user requests arriving through Amazon API Gateway, which routes them to a.NET-based Chat API running on AWS Lambda. The API maintains conversation state in Amazon DynamoDB. It then invokes the supervisor agent hosted on Amazon Bedrock AgentCore runtime.

The supervisor agent analyzes the request and selects the appropriate tool. For document generation, it invokes the PPTX Generator Lambda (a containerized Python function). For summarization, the supervisor invokes the Summary Generator Lambda, which queries the knowledge base through the retrieve_and_generate API.

The system processes, chunks, and embeds documents stored in Amazon S3 using Amazon Titan Text Embeddings v2. Amazon OpenSearch Serverless indexes the embeddings for fast semantic search. When tools query the knowledge base, Amazon OpenSearch Serverless retrieves relevant chunks, which are then supplied as context to Anthropic Claude Sonnet 4.6 (on Amazon Bedrock) for generating grounded responses.

The system stores generated documents in Amazon S3 and returns presigned URLs for secure download. Security measures include:

Before deploying, you need the following tools and access configured in your environment:

The setup process includes configuring deployment parameters and initializing the AWS CDK environment.

git clone https://github.com/aws-samples/sample-generating-powerpoint-presentations-with-amazon-bedrock.git Create the configuration file pipeline-params.ini at the repository root: environment=dev awscliprofile= ContainerRegistry=lambda-pptx-gen AgentContainerRegistry=agentcore-supervisor BucketDev=<amzn-s3-demo-bucket> VpcId=<your-vpc-id> ParsingInferenceProfileId=us.anthropic.claude-haiku-4-5-20251001-v1:0 AgentInferenceProfileId=us.anthropic.claude-sonnet-4-6 EmbeddingModelId=amazon.titan-embed-text-v2:0 ImageGenerationModelId=stability.stable-image-inpaint-v1:0 PPTXGenImageTag=latest AgentImageTag=latest Set awscliprofile to your AWS CLI profile name, or leave empty to use environment variable credentials.

cdk bootstrap This creates the AWS CloudFormation CDKToolkit stack required for AWS CDK deployments.

chmod +x./pipeline-build.sh chmod +x./pipeline-deploy.sh chmod +x./deploy-agentcore.sh Build and deploy The deployment consists of three phases: building artifacts, deploying infrastructure, and deploying the AgentCore runtime agent.

The build phase compiles application code and packages deployment artifacts. Run the build script:

./pipeline-build.sh This compiles the.NET projects (Chat API) and packages them as Lambda deployment packages. It builds the PPTX Generator container image using Docker or Finch and authenticates with Amazon Elastic Container Registry (Amazon ECR). It then pushes the container image and stores build artifacts in the asset-output directory.

The infrastructure deployment creates AWS resources and configures service integrations. Run the deployment script:

./pipeline-deploy.sh The deployment creates four AWS CloudFormation stacks in dependency order:

After the infrastructure stacks are deployed, deploy the supervisor agent to AgentCore runtime:

./deploy-agentcore.sh This script builds the supervisor agent container (ARM64), pushes it to Amazon ECR, creates the AgentCore runtime and endpoint, and updates the Systems Manager parameter with the endpoint Amazon Resource Name (ARN). The Chat API references this endpoint ARN to route requests to the agent.

After deployment, AWS CloudFormation outputs include the Amazon API Gateway endpoint URL and resource identifiers.

The solution offers several configuration points:

Edit agent/app.py to modify the supervisor agent’s system prompt and behavior. The agent uses Strands Agents with two tools defined in agent/tools.py:

In pipeline-params.ini, adjust model identifiers:

With inference profiles instead of direct model IDs, requests draw on a broader multi-Region capacity pool, which increases throughput and helps maintain consistent performance under load.

Adjust compute resources in the stack files:

In internal testing with a 90-page Amazon 2024 Annual Report PDF, the solution produced the following performance metrics:

The following figures show example slides from a generated presentation.

Figure 2: Generated title slide with customizable branding

Figure 3: Generated content slide with bullet points

Figure 4: Generated slide combining text with an AI-generated image

Figure 5: Generated content slide summarizing profitability metrics

Figure 6: Generated image-only slide with an AI-generated visual

Summary outputs provided to the knowledge base include:

Generated content undergoes Amazon Bedrock Guardrails validation to verify compliance with content policies before delivery.

To avoid ongoing charges, delete the deployed resources:

aws bedrock-agentcore-control delete-agent-runtime-endpoint \ --agent-runtime-id <runtime-id> \ --agent-runtime-endpoint-id <endpoint-id> aws bedrock-agentcore-control delete-agent-runtime \ --agent-runtime-id <runtime-id> Turn off Amazon DynamoDB deletion protection (required before stack deletion): aws dynamodb update-table --table-name chat-sessions-dev --no-deletion-protection-enabled aws dynamodb update-table --table-name tenant-table-dev --no-deletion-protection-enabled Delete AWS CloudFormation stacks in reverse dependency order: aws cloudformation delete-stack --stack-name ChatApiStack aws cloudformation delete-stack --stack-name AgentCoreStack aws cloudformation delete-stack --stack-name OpensearchStack aws cloudformation delete-stack --stack-name VPCEndpointsStack Empty Amazon S3 buckets before deletion (AWS CloudFormation cannot delete non-empty buckets): aws s3 rm s3://amzn-s3-demo-bucket --recursive Delete Amazon ECR repositories containing container images: aws ecr delete-repository --repository-name lambda-pptx-gen --force aws ecr delete-repository --repository-name agentcore-supervisor --force Delete tenant knowledge base sub-stacks (created by the tenant provisioner): aws cloudformation delete-stack --stack-name bedrock-kb-<tenant-id> Security considerations This solution uses Lambda environment variables for configuration values such as model IDs, Amazon S3 bucket names, and guardrail IDs. These are resource identifiers, not secrets. For production deployments, use AWS Secrets Manager for sensitive configuration values such as API keys and database credentials.

The AgentCore runtime agent runs in an isolated container with session-level isolation. Each user session operates in a dedicated environment, helping to prevent cross-session data contamination.

In this post, you built an AI agent system with Amazon Bedrock AgentCore that automates enterprise document generation. The supervisor agent deployed on AgentCore runtime routes requests to specialized tools for document creation and summarization, reducing presentation creation to about 90 seconds in an internal test.

The RAG pipeline grounds generated content in source documents, and Amazon Bedrock Guardrails verifies content compliance. You can adapt this architecture for automated report generation in financial services, technical documentation for engineering teams, or proposal creation for sales organizations.

To get started, clone the GitHub repository and follow the setup instructions. For more information about the services used, refer to the Amazon Bedrock AgentCore documentation, Strands Agents SDK, and AWS CDK Developer Guide.

Ian is an Aerospace AI/ML Engineer at AWS Professional Services. He integrates cloud services into aerospace applications and systems. Ian focuses on building AI/ML solutions using AWS services.

Neil is a Senior Delivery Consultant AWS Data/AI services at AWS Professional Services. He develops AWS infrastructure.

Stephen is a Delivery Consultant at AWS Professional Services. He develops AWS infrastructure.

Originaltitel: Generate presentations with Amazon Bedrock AgentCoreQuelle: AWS ML Blog (AWS ML Blog). Original öffnen