
Assistant - AI Agent for the Weekend Builder Challenge
A cool small project done this weekend!
Weekend Agent Challenge: Assistant

Challenge completed!
I built Assistant, an always-on AWS agent that plans my day before I wake up. Every morning at 6:00 AM, it reads my Google Calendar, figures out where my free time actually is, and schedules breakfast, lunch, dinner, and gym around whatever is already booked. By the time my alarm goes off at 7, the day is laid out.
VISION & WHAT THE AGENT DOES
The problem is embarrassingly simple and I have it every single week. I plan my classes, my research meetings, and my project blocks. I do not plan when I eat or when I lift. So I skip lunch because a meeting ran long, and I skip the gym because by the time I look up it is 10 PM. The calendar is full of obligations and empty of the things that keep me functioning.
Assistant fixes that by treating meals and training as first-class calendar events instead of things I will "get to."
Amazon EventBridge Scheduler triggers it at 6:00 AM America/New_York. The agent reads today's events from the Google Calendar API, sends them to Amazon Bedrock for classification, calculates the free windows around everything that is already there, scores candidate start times against my preferred times, validates the whole proposal, and writes the surviving events back to my calendar tagged "[AI Scheduler]". Then it goes back to sleep. I never open an app or press a button. The report is the calendar itself, plus a full trace in CloudWatch if I want to see why it made a call.
The core design rule I committed to early: the LLM never picks a timestamp. It answers semantic questions only, like "does this event named 'Lunch with Alex' already count as lunch?" All the actual time arithmetic, conflict detection, and calendar writing is deterministic Python. I did not want an LLM having uncontrolled authority over my calendar, and honestly I did not want to debug one either.
HOW I BUILT IT
The first wall I hit had nothing to do with AWS. Setting up Google Calendar API access pushed me into an OAuth consent screen asking for an app homepage, a privacy policy, and authorized domains. I do not have a website. I have a Lambda function. The fix was to stop using user OAuth entirely and use a Google service account instead, then share my calendar with the service account's email address with "Make changes to events" permission. No consent screen, no browser flow, no refresh tokens that expire in seven days and silently break the agent on day eight.
The second wall was Bedrock model access. My first choice returned a 403 that said the model was "not available for this account," which sounds like a permissions problem. It was not. Calling GetFoundationModelAvailability showed region, authorization, and entitlement were all green and only the model agreement was missing, and the model was also inference-profile-only rather than on-demand. Rather than wait on a use-case form, I switched to DeepSeek V3.2, which was on-demand with all gates already open. The whole thing took twenty minutes to diagnose and two lines to fix, and I would never have found it by reading the error message.
Packaging for Lambda from a Windows machine was the third wall. A normal pip install pulls Windows wheels that fail to import on Lambda's Linux runtime, with an error that looks like a corrupt package rather than a wrong one. The fix is installing with --platform manylinux2014_x86_64 --only-binary=:all:. That produced a 135 MB package, which turned out to be google-api-python-client bundling a discovery document for all 586 Google APIs. I need one. Deleting the other 585 took it to 27 MB, or 7.5 MB zipped.
Smaller things that cost me real time: the Lambda default timeout is 3 seconds and the default memory is 128 MB, and Lambda scales CPU with memory, so the first invocation timed out before it finished importing. All-day Google Calendar events return a "date" field instead of "dateTime", which crashes any parser that assumes otherwise. And I gave the handler a dry_run flag so my first cloud invocation could verify packaging, secrets, IAM, and Bedrock all at once without touching my real calendar.
The part I am most happy with is the confidence threshold. The model returns a confidence score with every classification, and anything below 0.80 is rejected and scheduled anyway. When I tested "Lunch & Learn: Q3 Roadmap" it came back as lunch satisfied at 0.70, which is a reasonable guess and completely wrong. It is a work meeting. The threshold overruled it and scheduled me a real lunch. Deterministic code catching a plausible-but-wrong LLM answer is exactly the behavior I designed for, and watching it actually happen was the best moment of the build.
AWS SERVICES USED / ARCHITECTURE OVERVIEW
Amazon EventBridge Scheduler - triggers the agent daily at 6:00 AM America/New_York using a named timezone so it survives daylight saving.
AWS Lambda - runs the Python 3.13 agent, handler agent.lambda_handler.
Amazon Bedrock (DeepSeek V3.2) - classifies existing calendar events using a forced tool call for schema-guaranteed JSON.
AWS Secrets Manager - stores the Google service account key so it never sits in an environment variable.
AWS IAM - scoped execution role with GetSecretValue on one secret ARN and InvokeModel on one model.
Amazon CloudWatch Logs - full trace of every morning's plan.
Flow:
EventBridge 6:00 AM
-> Lambda
-> Secrets Manager (fetch Google credentials)
-> Google Calendar API (read today)
-> Bedrock (classify existing events)
-> availability engine (merge busy intervals, find free windows)
-> scheduler (score candidates, place activities)
-> validator (reject any overlap, wrong duration, or out-of-range event)
-> Google Calendar API (write)
If the Bedrock call fails for any reason, the agent falls back to scheduling all four activities and logs a warning. The LLM improves the scheduler; it is never allowed to stop it. I tested this by running with no AWS credentials at all and the agent still produced a valid, validated plan.
WHAT I LEARNED
The biggest shift was learning to read AWS diagnostics instead of AWS error messages. "Not available for this account" told me almost nothing. GetFoundationModelAvailability told me exactly which of four gates was closed. Same with the Lambda timeout, where the REPORT line showed both the timeout and the memory ceiling I had not touched.
I also learned how much of building an agent is deciding what the model is not allowed to do. My first instinct was to let the LLM propose times. Splitting it into "LLM understands human context, Python controls the calendar" made the whole thing testable. I ended up with 31 unit tests that run in 0.05 seconds and need no network, because the scheduler is pure interval arithmetic.
Least privilege stopped being an abstract idea. I started with an admin key on my laptop, replaced it with a scoped user that can invoke exactly one model and read exactly one secret, and found out immediately when it could not create Lambda functions. That is the policy working, not breaking.
And time zones deserve the paranoia. Lambda runs in UTC, my schedule is Eastern, and daylight saving moves the offset twice a year. Every datetime in the project is timezone-aware from the moment it is constructed, tzdata is bundled in the deployment package, and EventBridge uses the named zone rather than a fixed UTC offset. Otherwise the agent would work perfectly until the first Sunday in November and then quietly fire an hour late.
WORKING LINKS
#agents #AWS #AWSBuilderCenter #AWSLambda #EventBridge #AmazonBedrock #AWSSecretsManager #AWSIAM #CloudWatch #Serverless #Python #GoogleCalendarAPI #DeepSeek #GenerativeAI #CloudComputing #StudentsBuildOn
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article