AWS Builder Center
Weekend Creative Agent Challenge: Dispatches from a Micronation

Weekend Creative Agent Challenge: Dispatches from a Micronation

Dispatches from a Micronation is an always-on agent that runs a tiny country that does not exist. Once a day it wakes up, reads the entire history of the nation, issues one new decree and a short news bulletin, and deals with the consequences of the laws it passed on earlier days.

Cloud Architect

Vision and what it does

Decree of the Stipend Review

The challenge was to turn a creative app into an always-on agent. The interesting word there is agent. An app answers when you ask. An agent keeps going when you are not looking, and it remembers what it did.
So I picked an idea that only works with memory. A country is a chain of decisions. Each law lands on top of the ones before it, and the mess compounds. That is funny, and it is impossible to fake with a one-shot generator, because the joke on day five depends on what you decreed on day two.
On its first run the agent founds a nation. It named mine the Serene Principality of Minitaria, population precisely counted, ruled by Princess Penelope from the capital of Petiteville, currency the Minutia, a crown on the flag. Every day after that it issues one decree in stiff official language, then the state news service reports on how the country is taking it. Approval and the treasury move with events. A crackdown earns money and loses goodwill. A holiday does the opposite.
The memory shows up as running storylines. In my seeded week the government set up pay for a Peace Officer, then had to adjust the stipend, then review the stipend, then legislate attendance rules for the officer now being paid. A small bureaucratic saga assembled itself, each decree naming the earlier ones it was cleaning up after.

How I built it

I built it from the memory model out, because memory is the whole point. The national record is one JSON file in S3. It holds the country and an ordered list of dispatches. That file is the government's brain.
The prompt runs in two modes. On an empty record it founds the country and issues decree number one. On every later run it feeds the country's facts, the current approval and treasury, the older decree titles, and the last several days in full back into the model, then asks for exactly one new dispatch that stays consistent and reacts to at least one earlier decree. Nova Pro returns strict JSON: the dateline, the decree, a two to four item bulletin, the new approval, the treasury, the national mood, and a line naming which past decrees today answers.
There is no image generation. The flag is drawn as an SVG tricolor with one of twelve devices, and every decree gets a procedural wax seal stamped from its number. CSS turns the rest into an official broadsheet with a masthead and a state-of-the-nation strip.
The one real bug was continuity. Early runs drifted the calendar and once switched the country from a Principality to a Republic mid-week, which breaks the entire premise. The fix was to feed the founding dateline and yesterday's dateline back into the prompt and instruct the model to keep the same era and never change the form of government. After that the dates advanced one day at a time and the crown stayed on the throne.

AWS services and architecture

  • Amazon EventBridge Scheduler fires the agent once a day. This is what makes it always-on.
  • AWS Lambda runs the government in Python with boto3.
  • Amazon Bedrock (Nova Pro) writes each dispatch as structured JSON through the Converse API.
  • Amazon S3 stores the national record and hosts the static gazette.
  • IAM scopes the Lambda role to one model and one object, and gives the scheduler a role that can invoke only this function.
EventBridge Scheduler (daily cron)
| invoke
v
Lambda (Python)
| read nation.json (memory)
v
Amazon S3 <-----------------+
| country + past decrees |
v |
Amazon Bedrock: Nova Pro |
| one new dispatch |
+---> append, write back--+
|
Browser <--- S3 static gazette <--+
No database, no API layer, no server. The record is both the memory and the data the site reads.

What I learned

The gap between an app and an agent is small in code and large in effect. A scheduler and a JSON file changed a generator into something that has a history. Feeding the model its own past output is what produces continuity, and continuity is where the comedy lives.
I also learned to pin the facts that must never change. Left alone, the model will happily rename your country. Passing the founding details back every run and forbidding changes to the era and the form of government kept the world stable while still letting the story move.

Link

Check back tomorrow. There will be a new decree, and someone will have to answer for it.
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