Tutorial
QuickStart / Cursor · Codex · Claude Code · OpenCode
Build a data app and API with your agent.
Your agent adapts an event budget while you watch, and every result can show how it was calculated. Then it can give the budget an API and put it online. Which route fits?
1. Open this workspace and connect your agent
A small relay on your computer lets your coding agent edit and run the example you see here.
Keep this tab open on the same computer as your agent. You need Node.js 20 or newer. Add the relay to your client:
2. Give your agent this prompt
The starting budget leaves out booking fees. This prompt asks your agent to add one as a control you can slide.
Build me an event-budget data app in the Yichus QuickStart browser tab. Use the browser's WebMCP compiler and feedback tools; keep the visible source and running result in sync. Connect first: use webmcp_list_sources to find /start/quickstart.html, then webmcp_list_tools. Match each tool’s sources to that tab and use its returned public name in webmcp_call_tool, with an arguments object. Names can gain a tab suffix when several pages are open; rediscover them if needed. Read yichus_example_guide and yichus_example_read for exampleId "event_budget". If the tab is missing, tell me the connection step that failed before writing code. Read both Bosatsu files and the guide's language/package references. Add booking_fee as a fifth Int argument to calculate and a slider labeled "Booking fee ($)", range 0–500, step 10, default 50. Include it once in total_cost. Keep the other defaults, the balance chart, and generated Why buttons. Update the assumptions to say the fee is included. Use named intermediate calculations and <- for the configuration's continuation chains. Use yichus_example_update with the revision you just read. Compile using yichus_example_run (action "run"). If running is true, poll yichus_example_feedback until running is false, check the revision still matches, and fix compiler errors from that feedback. Read yichus_example_feedback until previewReady is true; use yichus_example_preview with that revision, previewId, and current control IDs to test the actual controls. Never substitute a hand-written result or explanation. With ticket price 25, venue cost 600, and per-guest cost 5, check these cases: - 40 guests, booking fee 50: balance 150. - 60 guests, booking fee 50: balance 550. - 0 guests, booking fee 50: balance -650. - 40 guests, booking fee 100: balance 100. Open Why for Amount left over, follow total_cost, and confirm booking_fee appears in the generated calculation. Check that the balance chart renders and feedback reports no runtime errors. Restore 40 guests and fee 50 for me to inspect. Call the relay’s yichus_save_calculator directly. Set exportToolName to this tab’s public yichus_example_export name from discovery, exampleId to event_budget, expectedRevision to the tested revision, and outputDirectory to an absolute path for a new event-budget folder under my current project. The tool saves both Bosatsu files and event-budget.html and returns their paths without sending the full generated HTML into our chat. The export uses configured defaults and carries its own scripts and styles. Add a README with the model assumptions, tested inputs/results, and local run instructions. Serve that folder on localhost with a static server, check that its data app loads, and give me the local URL and file paths. Report what you actually checked and any step you could not complete.
Your shared data app workspace The agent opens this drawer; you can also edit and run it yourself
Edits stay in this tab until you or your agent save them.
3. Check what changed
With 40 guests and a $50 booking fee, the balance should be $150. Open Why? beside Amount left over and the fee shows up in the calculation. Yichus builds that explanation from the program your agent wrote, not from its summary.
Compiling and these runs check the program and particular results. Neither shows the budget includes every real-world cost.
4. Keep going
Ask your agent for the next step. It has the prompts and checks for each one.
- Save a copy that runs on your computer.
- Add an API that uses the same calculation, so another program can ask for a budget.
- Save budgets for two test users, have your agent break the rule that keeps them apart, and watch the check catch it. Alice and Bob are test identities: anyone can switch between them.
- Put the data app and API online with Render, or the data app alone with GitHub Pages.
Your API source & diagram The agent adds booking_fee here when you add the API
For a different problem, repair a program with the lenses or build a service.
Ask your agent about anything here; it has the detail.
Where this fits
What this is about: Ask any function why