A parent describes the story they want to tell: the child's age, their interests, the moral they want, the length, and the fears to avoid. They can also simply say it out loud: the platform accepts a voice message as input. It produces a complete story, split into chapters, with an illustration and an audio narration for each one.
The audience sets a particular requirement: a text meant for a child must never go out unchecked. The architecture is built around that constraint.
Overall architecture
The web application handles accounts, roles and pages. When a parent starts a creation, it launches the multi-agent system as a background task and responds right away; the page then follows the progress. Once finished, the story and its chapters are saved in the database, ready to be read again, translated or listened to.
Wide diagram: scroll it to the right.
Multi-agent system with LangGraph
Creation is a multi-agent system orchestrated by LangGraph. Each agent is a node in the graph: it reads the story's shared state, adds its part, and conditional transitions decide the next step. If the parent left a voice message, a first node transcribes it before planning.
PlannerTurns the request into a structured plan: title, chapters, characters, moral and things to avoid. The number of chapters follows from the chosen length.
Writer and moderator agentThe writer writes one chapter at a time, from the plan. The moderator reviews it against the child's age and fears before anything else happens.
Illustrator and voice narratorAn approved chapter gets an illustration and an audio narration, then it is saved and the graph moves on to the next one.
The graph loops over the chapters until the last one. An invalid plan, a moderator refusal or an error stops everything cleanly, without ever delivering a partial or unchecked story.
Wide diagram: scroll it to the right.
Guardrails
Safety does not rest on a single check but on several successive layers.
Input isolation. What the parent types is cleaned, then wrapped in dedicated tags: an agent treats it as data, never as an instruction. An attempt to hijack the model has no effect.
Hardened instructions per agent. Each agent has its own instructions, kept in files separate from the code and reviewed like the rest of the project.
Structured outputs. The plan is requested in a strict format and checked by the program before it is used.
Moderation closed by default. If the check fails or does not answer, the chapter is refused. The parent gets an understandable message, with no technical detail.
Wide diagram: scroll it to the right.
After creation
Translation on demand into several languages, as a background task, then saved so it is not done twice.
Narration in the chosen language, generated chapter by chapter with progress tracking.
Carbon footprint: every AI operation is measured. Each user has a dashboard that turns their emissions into concrete everyday equivalents.
Administration: account and role management, story moderation, system logs and usage statistics.
Technical choices
LangGraph rather than a fixed chain: loops and conditional stops are explicit, and each step can be tested on its own.
One chapter at a time: moderation covers a short, precise text, and a problem is caught before images and audio are produced.
Background tasks: generation takes time, so the interface stays responsive and shows progress.
Measured restraint: the environmental impact of AI is made visible to the user, not just estimated.
Automated tests on authentication, security, data models, graph state and carbon tracking.