AWS Builder Center

Weekend Agent Challenge: Mumu - Personal Daily Intelligence Agent

Mumu is a fully serverless personal agent that briefs me every morning, audits my spending every evening. All on its own, on a schedule, with no server to keep alive. It is written in Go, deployed with Terraform, and reasons with Amazon Nova Pro on Amazon Bedrock.

MTS @ Upmo AI, MSc. Student @ UvA
Mumu is a serverless personal agent that runs on AWS. It sends me a morning briefing at 07:00, a spending report at 22:00. Nobody starts it. EventBridge Scheduler triggers the scheduled runs, and a Telegram webhook triggers the chat. It is written in Go, deployed with Terraform, and uses Amazon Nova Pro on Amazon Bedrock for reasoning.

1. Vision and Purpose

The problem. Every morning I open my calendar, scan my inbox, and try to remember what the day looks like. Every evening I wonder what I spent money on. This is about fifteen minutes of manual work, twice a day. It is repetitive and it never goes away. That makes it a good job for an agent.
What the agent does on its own:
  • 07:00 Europe/Amsterdam: morning briefing. The agent reads today's Google Calendar events, looks ahead six days for trips, and scans recent unread email. It sends this data to Nova Pro, which writes a short briefing: schedule, emails that need attention, travel notes, and a few practical suggestions such as preparation time or conflicts. The result arrives as a formatted Telegram message.
  • 22:00: expense report. The agent searches Gmail for the day's receipts and invoices. Nova Pro extracts each expense with merchant, amount, and category. The agent compares the result with the past week stored in DynamoDB, flags anything unusual, and sends a daily total with a category breakdown and a weekly trend.
Trigger mechanism. Two EventBridge Scheduler cron schedules:  cron(0 7 * * ? *)  and  cron(0 22 * * ? *) , both with  schedule_expression_timezone = "Europe/Amsterdam" . AWS handles daylight saving time. The chat path is event driven through the Function URL.
Reporting. All output goes to the Telegram Bot API with Markdown formatting. If Telegram rejects the formatting, the agent retries in plain text. Errors are never silent. A failed run sends its own error message to Telegram, the scheduler retries twice, and exhausted events land in an SQS dead-letter queue.

2. Development Process

Structured output through forced tool use. Model output that feeds code must be valid JSON. Each scheduled agent calls the Bedrock Converse API with a single tool,  morning_briefing  or  expense_report , and sets  toolChoice  to  any . With one tool defined, this forces the model to call it, so the response always matches the JSON schema. Go code renders the final Telegram message. The model provides content and the code controls formatting.
Challenge: the model ignores schema types. The first real evening run crashed. Nova returned  "by_category": {"travel": "209.90"}  with the amount as a string, even though the schema declares a number. I added a tolerant decoder at the JSON boundary. It accepts numbers, numeric strings, currency symbols, and both  1,234.56  and  1.234,56 . The rule is simple: whichever of the two separators appears last is the decimal separator. The lesson: treat model output as untrusted input.
Challenge: account quotas. The first  terraform apply  failed on  reserved_concurrent_executions = 2 . A new account has a minimum unreserved concurrency of 10, so no reservation was possible. I removed the setting. An agent that runs twice a day does not need reserved concurrency.
Secrets stay out of Terraform state. Terraform creates empty Secrets Manager secrets. A small setup CLI fills them. It reads a local  .env  file, runs the Google OAuth consent flow on a localhost listener, and writes the refresh token directly to Secrets Manager. No secret value ever appears in Terraform state or on disk.
Sensitive content filter. The agent reads my inbox, so it could see one-time passwords and verification codes. A regex filter removes these emails before any content reaches the model. The filter applies to the scheduled runs and to every chat tool result. Each system prompt also forbids repeating authentication codes. A code the model never sees is a code it cannot leak.
Securing the webhook. A public Function URL gets scanned quickly. Three layers protect it: the Telegram secret token header checked with a constant-time compare, a chat ID allowlist because the agent serves one user, and deduplication of Telegram update IDs through a conditional DynamoDB write with a TTL. Telegram retries deliveries, so the handler must be idempotent.
Two smaller findings. The  provided.al2023  runtime ships without timezone data, so the binary imports  time/tzdata . Nova Lite acts as an automatic fallback when Nova Pro returns an error, so a throttled request does not cancel a briefing.

3. AWS Services and Architecture

+------------------------- AWS (us-east-1) -------------------------+
07:00 / 22:00 | |
Europe/Amsterdam ---> | EventBridge Scheduler --(retry x2)--> SQS DLQ |
| | {"agent":"morning"|"evening"} |
| v |
Telegram user ------> | Lambda Function URL --> Lambda (Go, arm64) |
(chat webhook) | | | | |
| v v v |
| Secrets Manager DynamoDB Amazon Bedrock |
| (Google OAuth, (memory, (Nova Pro, |
| Telegram) trends, Nova Lite |
| dedup) fallback) |
+--------------------------------|----------------------------------+
v
Google Calendar and Gmail APIs (read-only)
|
v
Telegram Bot API (delivery)
  • AWS Lambda: one Go binary on  provided.al2023  (arm64, 256 MB) serves all three agents. The event shape decides the route: scheduled run or webhook call.
  • Amazon EventBridge Scheduler: timezone-aware cron with a retry policy and a DLQ target.
  • Amazon Bedrock: Nova Pro as the primary model and Nova Lite as fallback. The Converse API with tool use covers both structured output and the chat loop.
  • Amazon DynamoDB: one table for user preferences, daily expense records, and webhook deduplication markers with TTL.
  • AWS Secrets Manager: Google OAuth credentials and the Telegram bot token with the webhook secret.
  • Amazon SQS: dead-letter queue for failed scheduled runs.
  • Amazon CloudWatch Logs: structured JSON logs with 14-day retention.
  • Terraform: the whole stack. The IAM role is scoped to two secrets, one table, two model ARNs, and one log group.
The monthly cost is a few cents: two short Lambda invocations per day plus Nova token usage. Everything else stays inside the free tier.

4. Learning Outcomes

  1. Forced tool use guarantees the shape of the output, not the types inside it. Add a tolerant decoding layer and test it with real model output.
  1. Native timezone support in EventBridge Scheduler removes a whole class of bugs. There is no UTC conversion and no daylight saving logic in the code.
  1. An agent that reads a mailbox needs a content policy in code. Filtering sensitive emails before they reach the model is stronger than prompt instructions. Use both.
  1. Always-on is a design property. Retries, a DLQ, a fallback model, error reports to the user, and idempotent webhook handling are each a few lines of code. Together they make the agent fail loudly and recover on its own.
  1. One binary for all agents keeps the build, the IAM policy, and cold starts simple.

5. Code and Demo

  • Evidence of autonomous runs: screenshots of the morning briefing, the evening expense report, a chat answer, and the EventBridge Scheduler console with both schedules enabled.
Evening Brief

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