AWS Builder Center
Engineering GOPA: Orchestrating a Multi-Agent AI Story Engine on AWS

Engineering GOPA: Orchestrating a Multi-Agent AI Story Engine on AWS

A technical case study on building a personalized generative AI story platform for the Amazon Nova AI Hackathon 2026. This project leverages a serverless AWS stack (Amplify, Lambda, Bedrock) and a multi-agent pipeline to transform a single user photo into a custom 3D-styled narrative featuring Little Krishna, using LiveKit as a real-time agent orchestration playground.

The Vision
GOPA ("Cowherd Friend") is a generative AI platform built for the Amazon Nova AI Hackathon 2026. It transforms a single user-uploaded photo into a personalized, high-fidelity digital storybook featuring Bal Krishna. The project moves beyond basic LLMs to create a "Visual-Story-as-a-Service" model where users see themselves integrated into a divine narrative.
  1. The Architectural Blueprint: Multi-Agent Logic
    To build a cohesive narrative, I engineered a multi-agent pipeline using Amazon Bedrock's Nova models. As the builder, I focused on the "handshake" between agents to ensure data integrity across the story arc.
Agent 1: The Chronicler (Nova 2 Lite)
Role: Narrative Director.
Task: It ingests a selected value (e.g., Bravery) and generates a structured JSON screenplay. This includes rhythmic prose for the story and specific visual metadata for the next agent.
Agent 2: The Visionary (Nova Canvas)
Role: Lead Illustrator.
Task: This agent handles Image-to-Image synthesis. It takes the user’s photo and the Chronicler’s metadata to generate 3D Pixar-style illustrations.
  1. Technical Rigor: Prompt Engineering & Iterative Design
    Since I approached this as a builder rather than a professional UX designer, the "visual polish" was achieved through rigorous backend logic and iterative prompt refinement.
Prompt Fine-Tuning: I performed extensive manual testing across hundreds of image outputs to identify where the model struggled with Krishna’s iconography vs. the child’s likeness. The final prompt was "baked" into the backend after fine-tuning instructions for lighting, depth of field, and stylistic consistency.
Consistency Logic: To prevent character drift between scenes, I implemented Seed Pinning and reference-based prompting. By passing the latent representation of the first generated image back into subsequent prompts, I ensured the "3D Avatar" remained recognizable throughout the story.
Safety & Quality: I used Negative Prompting within the API calls to ensure the output remained "preschool-friendly" and avoided uncanny-valley artifacts.
  1. Serverless Hosting: Built for Scalability
    I prioritized Developer Velocity, choosing a serverless-first stack to handle bursty AI workloads without managing infrastructure.
Frontend: AWS Amplify
Why: Amplify managed the CI/CD pipeline and global content delivery (CDN) automatically. This allowed me to focus on the AI logic rather than deployment scripts or server configuration.
Backend: AWS Lambda + DynamoDB
Why: Image generation is an event-driven task. Lambda triggers Bedrock invocations on demand. I implemented an Asynchronous Pattern: Lambda initiates the generation, stores the state in DynamoDB, and the frontend polls for the final S3 image assets.
  1. The "Agent Playground": Real-Time Logic via LiveKit
    I leveraged LiveKit as a real-time "Command and Control" center for the backend agents.
The Problem: Traditional REST APIs make it difficult to track the "thoughts" of multiple agents in real-time during the generation process.
The Solution: LiveKit provides a persistent WebRTC "room" where the Chronicler and Visionary broadcast status updates via Data Channels.
Future-Proofing: While I am not using voice streaming yet, the LiveKit integration ensures the app is ready for Nova Sonic narration. Currently, it serves as a high-speed playground to monitor agent interactions and state changes live.
  1. Summary for Builders
    GOPA demonstrates how a single developer can build a sophisticated personalized media engine. By orchestrating Multi-Agent Systems on Amazon Bedrock and leveraging the Amplify/Lambda stack, I built a scalable platform that turns a single photo into a divine adventure.
Scaling: 100% Serverless. No GPUs to manage.
Precision: Rigorous prompt engineering replaced the need for manual design.
Orchestration: LiveKit provides the real-time heartbeat for the AI agents.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article