AWS Builder Center
Weekend Creative Agent Challenge: Code Coffee

Weekend Creative Agent Challenge: Code Coffee

Code Coffee is an AI-powered developer morning companion built with Amazon Bedrock Nova 2 Lite, AWS Lambda, API Gateway, Amazon Bedrock AgentCore, Docker, and Amazon ECR. It generates a fresh programming joke, practical technical tip, developer greeting, and motivational quote to help developers start their day. This project explores how a simple creative AI application can evolve into an always-on agent that proactively prepares useful content for developers.

AWS and Devops practices

☕ The Idea Behind Code Coffee

What if a developer could start every morning with a fresh dose of technical knowledge, a programming joke, and a little motivation without having to search for it?
That idea led me to build Code Coffee, an AI-powered developer morning companion designed to make the start of a developer's day more engaging and useful.
Code Coffee generates four things:
  • A short developer-focused greeting
  • A programming or DevOps-related joke
  • A practical technical tip
  • A short motivational quote
The goal was not to build another generic chatbot. I wanted to create something small, focused, and useful that could eventually work as an always-on creative agent.

🏗️ What I Built

The application started as a simple Python application that communicates with Amazon Bedrock.
The AI generation uses Amazon Bedrock Nova 2 Lite through the Bedrock Converse API. I created a structured prompt that tells the model exactly what Code Coffee should generate.
The prompt includes rules to keep the generated content relevant to software development. Jokes must be related to areas such as programming, Docker, AWS, DevOps, Kubernetes, Git, APIs, databases, Linux, debugging, or developer life.
The technical tip must be useful and technically accurate, while the quote must be short and motivating without inventing or falsely attributing quotes to famous people.
The model returns structured JSON containing the four generated fields.

🐳 Containerizing the Agent

After building the application locally, I packaged the runtime using Docker.
The Docker image contains the Python application and its dependencies and provides a consistent environment for running the agent.
The container image is stored in Amazon Elastic Container Registry (Amazon ECR).
From there, the container is deployed as an Amazon Bedrock AgentCore Runtime.
This was one of the most valuable parts of the project because it moved the application from simply running locally to having a dedicated cloud-based runtime.

☁️ AWS Architecture

The application uses several AWS services working together:
User
|
v
Vercel Frontend
|
v
Amazon API Gateway
|
v
AWS Lambda
|
v
Amazon Bedrock AgentCore
|
v
Docker Container
|
v
Amazon ECR
|
v
Amazon Bedrock
Nova 2 Lite
The frontend is deployed through Vercel and communicates with the backend through an API Gateway endpoint.
API Gateway receives the request and invokes the Lambda integration.
Lambda handles the API layer and communicates with the AgentCore runtime.
AgentCore runs the containerized Python application, which sends the prompt to Amazon Bedrock.
Nova 2 Lite generates the Code Coffee content and the response travels back through the same architecture to the frontend.
IAM roles are used for AWS service permissions rather than hardcoding AWS credentials into the application.

🔧 Challenges During Development

The project involved much more debugging than I initially expected.
One challenge was deploying the Docker container correctly to AgentCore. I had to work through container architecture, ECR image configuration, runtime versions, and IAM permissions.
Another issue involved the AWS CLI configuration files. At one point, an invisible UTF-8 byte-order mark in a JSON file caused the AWS CLI to reject the configuration.
I also encountered character encoding problems when emojis and Unicode characters travelled between Python, PowerShell, AWS services, and the browser.
I addressed this by explicitly returning UTF-8 encoded JSON from the Python server and setting:
Content-Type: application/json; charset=utf-8
I also used UTF-8 serialization when creating the response body.
These problems taught me that cloud engineering involves much more than application logic. Deployment configuration, IAM, networking, containers, encoding, APIs, and observability all become important when an application moves into the cloud.

🤖 Making Code Coffee an Always-On Agent

The next important step is turning Code Coffee from a request-driven application into a truly proactive agent.
The idea is for Code Coffee to automatically generate the day's coffee without waiting for a developer to open the application.
The planned architecture is:
Scheduled Event
|
v
AWS Lambda
|
v
AgentCore Runtime
|
v
Amazon Bedrock Nova 2 Lite
|
v
Daily Code Coffee
|
v
Persistent Storage
|
v
Developer
With this architecture, the agent can create the daily content automatically and have it ready when the developer returns.
This changes the application from:
"Click a button to generate content."
to:
"Your developer coffee is already waiting for you."
That is the direction I want to take Code Coffee as an always-on creative agent.

📚 What I Learned

This project gave me hands-on experience with:
  • Amazon Bedrock and Nova models
  • Bedrock Converse API
  • Amazon Bedrock AgentCore
  • Docker
  • Amazon ECR
  • AWS Lambda
  • Amazon API Gateway
  • IAM roles and permissions
  • REST APIs
  • CORS
  • JSON and UTF-8 encoding
  • AWS CLI
  • Cloud deployment
  • Git and GitHub
  • Vercel deployment
More importantly, I learned how these individual technologies can be connected into one working application.
Building the application locally was only the beginning. Making it deployable and reliable required understanding the entire path from the browser to the API, Lambda, AgentCore, container, and AI model.

🚀 What I Want to Improve Next

There are several improvements I want to make to Code Coffee.
The first is completing the automatic daily generation workflow so the agent can proactively prepare a new brew.
I also want to add persistent daily history so developers can look back at previous tips and jokes.
Another possible improvement is personalization, allowing developers to select topics such as Docker, AWS, Kubernetes, Java, Python, or DevOps.
Eventually, Code Coffee could also adapt the content based on the developer's interests and previous interactions.

🌐 Try the Project

Live Application

GitHub Repository

☕ Final Thoughts

Code Coffee started with a simple idea: make a developer's morning a little better.
It turned into a hands-on project exploring Generative AI, Amazon Bedrock, Nova 2 Lite, AgentCore, Docker, ECR, Lambda, API Gateway, IAM, and cloud deployment.
The most important lesson for me was that building an AI application is only one part of the challenge.
The real engineering work begins when you make that application containerized, deployable, connected to multiple cloud services, and capable of working automatically.
Code Coffee is still evolving, but this weekend challenge gave me the opportunity to push it from a simple AI application toward a more proactive cloud-based agent.
Build. Deploy. Automate. Keep improving. ☕
#agents #AWS #AmazonBedrock #Nova #AgentCore #Docker #DevOps #CloudComputing #GenerativeAI
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