Inspiration
There is a joke that comes back every year in a new format. Someone posts a photo captioned "another day went by and I still did not need the Pythagorean theorem". Thousands of likes, everyone laughs, it moves on.
It stopped being funny to me when I noticed how precise it is. Students do learn the procedure. They solve for x, they apply the formula, they pass the exam. What they walk away without is the moment to use it. The joke is about a connection that was supposed to happen in class and got skipped.
The gap is measurable. Around seventy percent of students say they feel confident solving equations, and fewer than half say the same about problems that come from real life. The knowledge is there. The bridge to the world is missing.
Simulations are the best bridge we have. Watching a projectile arc across a screen while you change the launch angle teaches something a paragraph cannot. The trouble is that the simulations available today are finished objects. A teacher in a coastal town, a teacher in the Andes and a teacher in a European capital all get the same generic scene, and the student who most needs the connection to their own life is the one least likely to find it there. Building a new one means writing code, so it rarely happens.
I wanted to find out what changes when the simulation itself becomes something a teacher can make, adapt and hand to the class in front of them.
What it does
Kawsa is a platform for building and running simulations, and it has two faces.
A teacher describes the lesson they want in plain language, say how the length of a pendulum changes its period, and about a minute later a working simulation opens in the editor. Everything is editable from there. You place elements on the canvas, decide which variables the student can move, attach motion to them, set the conditions that end the run, and write the question the student has to answer. If you need an image that exists nowhere, you ask for it and it gets drawn with a transparent background, ready to drop into the scene. Publishing freezes the lesson, so colleagues can take it as a starting point while your original keeps working exactly as it did.
The student meets a question first. Nothing moves until they start it. They write down what they think will happen, in their own words, then change a value and run the simulation. When it finishes, what actually happened appears beside what they said would happen, and that distance is the lesson.
A voice tutor is there the whole time. It works Socratically: it asks, it listens to the reasoning, and it pushes back. Ask it something like "what if the car had been going at thirty" and it recalculates the model and gives the real result, so the conversation stays anchored to the simulation you are both looking at. A short quiz built from the lesson's own formulas closes the session.
The teacher gets the class back as evidence. Every session records what the student predicted, what the simulation measured, the distance between the two, the conversation with the tutor and the quiz answers, which turns a lesson into a map of where the misconceptions actually live.
And then there is the part I care about most.
The same model, a different story
A simulation in Kawsa keeps its behaviour and its story in separate layers. The variables and the relationships between them are one thing. The imagery and the wording are another.
So a published lesson can be reskinned without touching the model. The relative motion lab that ships with the project asks when one vehicle finishes overtaking another. Swap the vehicles for two canoes and it belongs to a community that lives by a river. Swap them for a llama and a truck on a mountain road and it belongs to a school in the highlands. Swap them for two trains and it matches the textbook a different country actually uses.
The mathematics holds in every case. What changes is whether the student is reasoning about something they have seen with their own eyes. A teacher can adapt a colleague's lesson to their own classroom in about five minutes, and the science stays as sound as the day it was published.
Where the name comes from
I am Peruvian, and I wanted a name that carried the promise in a language that belongs to the classrooms I had in mind.
In Quechua, kawsay means to live, and its causative form kawsachiy means to bring something to life. I shortened it to Kawsa. It describes the product better than anything I could have invented: a relationship that lived on a blackboard becomes something a student can move, break and put back together.
How we built it
I built Kawsa with Codex running GPT-5.6, and treated it as a thinking partner across the whole project.
The first work was finding the idea. I came in with a direction that needed scoping, and the first proposals came back too abstract and too close to what already exists, so I said so. Codex went and did the competitive research properly, and returned with the gap that became the thesis: simulations are finished artefacts, and a teacher cannot author one for the class in front of them.
Then came finding the shape, and this is the part I would repeat on any project. Before committing to a framework, I had Codex build throwaway HTML prototypes so I could judge the concept by using it. The first was correct and lifeless: honest physics, honest sliders, an empty chart. It already had the prediction step, which told me the pedagogy was sound. The second turned the same physics into a mission, deliver medicine before the community centre closes, and put the scenario and the vehicle behind dropdowns. The moment the context became a choice, the real question arrived. The third prototype answered it, and Codex summarised its own work in a single line above the simulation: the scene switches between a coastal city and an Andean valley, and between a bicycle and a bus, while the model stays fixed at time equals distance over speed. That throwaway file is where the product came from, and everything since has been built to support it.
Technology choices went the same way. I asked Codex to re-implement my prototypes against several rendering libraries and show me the difference, which is how PixiJS was chosen. The same conversation settled on a single application holding both the streaming text and the streaming audio, and on a real database over a file.
From there it built the platform: the simulation format, the engine that runs it, the studio, the player, the generation pipeline, the image service, the voice tutor and the tests. It also handled the failures that only show up once software is real.
One exchange is worth telling on its own, because it turned a teaching question into a feature. I rejected the first overtaking simulation for being too simple and asked for two vehicles, so a student could reason about where one catches the other. Then I pushed further: could the system account for the length of each vehicle, so the pass counts as complete only once they have fully cleared each other. I asked what capabilities that would require and let Codex answer, and the result was a genuine extension of the engine. Any formula can now reference the front, the rear or the centre of an element. A question about one lesson became something the whole platform can do.
Challenges we ran into
The tutor was the hardest thing in the project, and it took two passes to get right.
Early versions talked like a help desk. They answered whatever was asked, dropped the thread between turns, and let the student drift past the moment where they were supposed to commit to something. Getting Socratic behaviour meant giving the tutor a view of where the learner actually is: it now works from a description of the session that tracks the stage, keeps the derived values out of reach while a prediction is still open, and treats a question asked before the run differently from the same question asked after it. What it can do at that point is ask.
The second pass was about grounding. A tutor that discusses a simulation while inventing plausible numbers sounds convincing, which makes it worse than one that says nothing at all. Every figure it speaks now comes from evaluating the actual model, hypotheticals included: when a student asks what happens at a different speed, it substitutes the value, recomputes everything downstream of it, and answers with the real result.
Images were another challenge. The model returns a rectangle, and a simulation needs elements with clean edges that sit on top of a background. The answer was to generate against a solid chroma colour and cut it out on the server, with a pass that removes the colour bleeding into the edges. It took several rounds before a red car turning blue kept its wheels.
The deepest design problem was letting AI edit a lesson without letting it break one. A model writing application state directly will eventually write something that looks fine and behaves wrong. What works is making the model propose and letting code decide: it produces a high-level plan or a targeted edit, the application resolves it into the real document, and the whole thing is validated before anything is saved. A bad suggestion becomes a rejection, and the lesson stays intact.
Accomplishments that we're proud of
- A tutor that can be trusted with numbers. It holds a real conversation, it refuses to hand over the answer, and everything quantitative it says is computed from the same model the student is watching.
- A lesson that travels and stays correct. The reskin is genuine: the imagery and the model are separate layers, and a teacher really can take a colleague's lesson and make it belong to their classroom.
- Seven complete simulations built on the platform: overtaking, projectile motion, orbits, gear ratios, a supermarket receipt, balancing an equation and a taxi fare. Each one has its own prediction question, a working model, a quiz derived from its formulas and a place in the shared library.
Mostly, though, I am proud that the loop closes. A teacher describes a lesson and publishes it, a student runs it and argues with the tutor, and the teacher sees what that student believed before they found out. That is a whole product, and it exists.
What we learned
Determinism is what makes the AI parts usable. Because the runtime advances on a fixed timestep and computes state analytically, evaluating the model with a substituted value is exact and cheap. That single property is what lets the tutor answer a hypothetical with a real number and lets the quiz compute its own correct answer, so the model only has to write the prose around it.
Structured output plus a compiler beats free-form generation. Asking the model for a high-level plan under a strict schema, then resolving that plan into the document in code, moves every failure to a place where it can be caught. The model picks assets, layout slots and motion families. Coordinates, wiring and validation belong to the compiler. A bad plan gets rejected, and a broken simulation never reaches a teacher.
Editing works the same way in reverse. Patches against a typed document, filtered through a path allowlist and revalidated as a whole, are what make AI editing safe enough to hand to someone who did not write the schema.
On the process side, two things were worth more than the rest. Throwaway prototypes settled arguments that discussion could not: the product thesis came out of a prototype I deleted. And asking Codex what a feature would require, before describing the code I imagined, produced a better engine than my own specification would have.
What's next for Kawsa
Chemistry and biology are the obvious next subjects, reached by adding motion families, catalogue assets and guidance for the assistant while the engine stays as it is.
Beyond that, the roadmap points at the classroom more than the canvas:
- Every element a teacher generates joining the shared library, so adapting a lesson to a local context gets faster as more teachers publish.
- Assigning a lesson to a group and following a cohort across several sessions.
- Comparing a student's reasoning across attempts, so a teacher can watch a mental model change and not only see an answer get corrected.
The goal underneath all of it is that a teacher opening Kawsa for the first time already finds a lesson close to what they need, and gets it the rest of the way in minutes. Every published lesson makes the next classroom easier to reach, and that is the point at which the bridge stops being something each teacher has to build alone.
Built With
- codex
- gpt-5.6
- next.js
- postgresql
Log in or sign up for Devpost to join the conversation.