Week 10 · Build the Clone

Artifacts, Preview & Sandbox

See it run, safely

⏱ ~6 hours, hands-on🐍 Python / 🔷 TypeScript🛠 You ship: Live previews from a locked-down sandbox
What this week is

Your agent can build things — now let it show them, and run untrusted code without risking your machine.

This week you add artifact rendering and a live-preview server so a generated page or chart appears in your browser and refreshes as the agent tweaks it; a background-task runner for long jobs; and a real secure sandbox — OS-enforced limits, a scrubbed environment, a directory jail.

The sandbox is the week's real lesson: model-written code is untrusted code, and the only durable answer is enforcement by the operating system, not by a prompt.

The walkthrough

Each part adds one capability to the same growing codebase, and each is a runnable checkpoint.

  1. 01ArtifactsRender what the agent produces instead of printing it.
  2. 02The preview serverLive reload so you watch the agent iterate in real time.
  3. 03The sandboxOS-enforced limits, a scrubbed environment, and a directory jail.
  4. 04Background tasksLong jobs that run without blocking the conversation.

After this week you can

  • Render agent output as live, previewable artifacts
  • Sandbox untrusted code with real OS enforcement
  • Run long tasks without freezing the interface