Inspiration
Space science is full of ideas that are fascinating but difficult to experience. A light-year is an enormous distance. A signal can travel at the speed of light and still take 23 years to arrive. A spacecraft may have enough fuel to escape or enough time to transmit its discoveries, but not both.
A video popped up on my Youtube feed while I was on a walk and gave me the inspiration for the base idea. I wanted to make them something a person could investigate with an AI agent.
WORLDLINE began with a simple question: What if WebMCP could turn a webpage into a shared science lesson, where the agent investigates the evidence, the learner contributes their own thinking and the final decision remains human?
What WORLDLINE does
A probe near a black hole has recorded measurements showing how gravity bends space and changes light. Its computer has processed those measurements into two files.
The probe is 23 light-years away and has only 71 seconds of radio contact remaining. An early, powerful burn can help it escape, but turns its antenna away from Earth. A later, gentler burn can keep the antenna connected long enough to send both files, but cannot save the probe.
The browser agent receives the mission objective through WebMCP. It reads separate information about the files, radio connection, engine and maneuver limits. It forms hypotheses, predicts what each burn will do and uses a limited simulator to test possible worldlines.
A worldline is the path something takes through space and time. Each tested maneuver creates a different possible future.
The experience unfolds through three exchanges:
- The agent investigates the two clearest possibilities: saving the probe and sending the files.
- The learner calculates the transmission time and predicts why one burn may not achieve both goals. The agent reads that answer, tests a compromise and a counterexample, then explains what the evidence shows.
- The learner decides what to save. That decision creates one exact, temporary WebMCP action that the agent can execute once.
The central calculation is intentionally approachable:
$$ 18\text{ MB} + 12\text{ MB} = 30\text{ MB} $$
$$ 30\text{ MB} \div 1.2\text{ MB/s} = 25\text{ seconds} $$
The lesson then connects that calculation to the probe's remaining communication window, antenna alignment and escape requirements.
Why WebMCP matters
WebMCP is not an extra control attached to a fixed animation. It is the mechanism that makes the lesson responsive.
The page initially registers six tools using document.modelContext.registerTool(). These expose separate mission facts, scientific files, maneuver constraints, a bounded simulator and presentation checkpoints.
The agent must decide:
- Which evidence it needs
- Which possible burns are worth testing
- What each test is expected to prove
- Whether the learner's prediction matches the evidence
- Which outcome it recommends and why
The learner's calculation and prediction become part of the shared page state. The agent reads that work and chooses tests that examine it. The resulting explanation develops from the evidence and the learner's participation rather than following a prerecorded sequence.
When the learner makes the final choice, the page registers a seventh tool. This tool takes no arguments and is locked to the exact tested maneuver the learner selected. It can run only once. After execution, all planning and action tools disappear, leaving two read-only tools that verify the final state and transmission receipt.
The visible lifecycle is:
$$ 6 \rightarrow 7 \rightarrow 2\text{ tools} $$
The agent investigates. The learner decides. The page controls the resulting action.
How we built it
WORLDLINE is built with WebMCP, TypeScript, React and Vite, and is deployed on Vercel. It was coded using Codex.
A revisioned TypeScript state machine is shared by the visible experience and the WebMCP tools. It records the mission evidence, simulation budget, tested worldlines, learner calculation, learner prediction, recommendation, human choice and final receipt.
Tool schemas are closed and reject unexpected properties. Revision checks prevent stale operations. The simulator permits no more than five tests. The final execution tool closes over the selected maneuver, so the agent cannot change its timing, speed or payload after approval.
Every visible path, result, calculation, animation and final receipt is derived from this shared state.
Challenges we faced
The hardest challenge was making the agent's intelligence visible. Agents can call several tools quickly, but a learner needs time to understand why each test matters. We redesigned the experience so results remain on screen until the learner chooses to continue.
We also had to make the difference between agent mode and ordinary page interaction unmistakable. WORLDLINE does not secretly replace a missing agent with a scripted imitation. If WebMCP is unavailable, the page clearly explains what is required.
Another challenge was keeping the science understandable without pretending this is a precision spacecraft simulator. The mission is fictional, but its lesson uses clear relationships between file size, transmission speed, communication time, burn timing and speed change.
Finally, we needed to preserve human authority without reducing the learner to an approval button. The learner performs the calculation, proposes an explanation and makes the value decision that physics cannot answer.
What we learned
We learned that WebMCP can support more than task automation. It can give an AI agent access to the structure of an educational experience while allowing the webpage to remain the shared visual workspace.
We also learned that a useful educational agent should not simply reveal an answer. It should test competing possibilities, respond to the learner's thinking, explain why an idea succeeds or fails and stop when the remaining question is a human judgment.
WORLDLINE is an interactive science lesson about black holes, light-years, spacecraft communication and possible futures. It lets people investigate those ideas with an AI agent instead of merely watching them.
Built With
- agents
- ai
- css3
- education
- html5
- interactive
- javascript
- learning
- react
- typescript
- vercel
- vite
- webmcp
Log in or sign up for Devpost to join the conversation.