About the project
We built this project to explore a simple question: what if a story did not come from a single all-knowing narrator, but instead emerged from the limited knowledge, motives, and choices of its characters? That idea led us to a children's bedtime story generator where each character acts from their own private point of view, and the final story is compiled from what actually happened in the simulation.
The inspiration came from two places. First, we wanted to make AI storytelling feel less scripted and more alive. Many generators produce polished prose, but the events can feel predetermined. Second, we were interested in multi-agent systems, especially the way information asymmetry creates tension, surprise, and believable conflict. If one character knows where the key is and another does not, the story naturally becomes more interesting. That became the core design principle of the project.
How we built it
- User input defines the theme and the characters.
- Amazon Nova Lite generates the initial world, including setting details, locations, and objects.
- A simulation loop runs for several turns.
- Each character receives only their own local knowledge and chooses an action.
- A deterministic resolver updates the world state based on those actions.
- After the simulation ends, Amazon Nova Pro turns the event log into polished story pages.
- Nova generates illustration prompts, and the UI presents everything as a storybook.
The key technical decision was separating simulation from narration. The simulation decides what happens. The narration only explains it beautifully afterward. That gave us a stronger sense of causality, because the prose is grounded in a real sequence of events rather than invented on the spot.
You can think of the system as:
[ \text{Story} = \text{NarrativeCompiler}(\text{EventLog}) ]
where the event log itself comes from repeated character decisions:
[ W_{t+1} = R\big(W_t, A_1, A_2, \dots, A_n\big) ]
Here, (W_t) is the world state at turn (t), each (A_i) is a character action, and (R) is the deterministic resolver that updates the world.
What we learned
We learned that storytelling quality is not only about using a stronger model. Structure matters just as much. Giving characters partial information made the output feel more surprising and believable than simply asking for a story in one prompt.
We also learned how useful it is to combine probabilistic and deterministic systems. The models are excellent at imagination, tone, and character voice, but deterministic logic is better for enforcing consistency, object movement, and state transitions. That hybrid design made the system more stable and easier to reason about.
On the product side, we learned that presentation matters. Wrapping the output in a storybook-style interface made the experience feel much more complete than a raw text demo.
Challenges we faced
The hardest challenge was preserving coherence across many agent turns. Once multiple characters act independently, small inconsistencies can quickly compound. We had to carefully control what each character could see, know, and respond to.
Another challenge was prompt design. The prompts needed to be specific enough to produce structured actions, but open-ended enough to allow creativity. Too much freedom caused chaotic behavior; too much constraint made the story feel mechanical.
We also had to manage the tradeoff between speed and quality. Character decisions happen many times per run, so they needed to be fast and inexpensive. But the final story still had to feel rich and polished. That pushed us toward using lighter models for simulation and a stronger model for narrative compilation.
Finally, we had to make the UX work for a live demo. A great backend is not enough if the user just waits on a blank screen. Streaming simulation progress and then revealing the finished storybook helped turn the system into something people could immediately understand.
Why we are proud of it
What makes this project special is that the story is not merely generated, it is emergent. The same starting setup can produce completely different outcomes because the characters drive the plot through their own choices. That gave us a project that is technically interesting, visually engaging, and genuinely fun to run more than once.
Built With
- amazon
- bedrock
- boto3
- canvas
- css
- fastapi
- html
- javascript
- lite
- nova
- pro
- pydantic
- python
- uvicorn
- websockets

Log in or sign up for Devpost to join the conversation.