One URL. Every revision. That's agent-loop hosting.
When an agent iterates 30× in a session, you don't want 30 URLs. Agent-loop hosting is a publishing model where the URL is stable, the content swaps underneath, and the viewer's bookmark always shows the latest version.
What is agent-loop hosting?
Agent-loop hosting is a static-HTML publishing model designed around the way AI agents actually work: by revising the same artifact many times in a single session. The hosting service guarantees that the URL stays stable across revisions, so the link a human bookmarked at minute 1 still shows the latest version at minute 30. Stacktree exposes this as one MCP tool call: update_site.
The loop, by the numbers
- ~200 ms time from update_site request to the new content being live at the edge. Source: Cloudflare R2 latency ↗
- 12–30 typical artifact revisions per Claude Code or Codex session of moderate length. Source: Karpathy on agent HTML output ↗
- 1 stable URL across every revision — the whole reason this primitive exists. Source: MCP tools spec ↗
- 1.8× more AI citations for pages with a visible "last updated" timestamp — replace-in-place pages keep it fresh automatically. Source: AirOps 2026 citation study ↗
The problem in three lines
- An AI agent writes a 600-line HTML report.
- The agent revises that report 12 times in the next 30 minutes — adding sections, fixing numbers, restyling.
- Twelve new URLs is twelve broken bookmarks for the teammate you're sharing it with.
The "send the latest link in Slack" workaround is what teams do today, and it's exactly the kind of friction that should be a primitive instead of a habit. The right answer is: one URL, all twelve revisions, viewer refreshes when they want the latest.
Why every other host gets this wrong
- Tiiny Host, Pastebin, ngrok shares. Each upload is a new URL. Replace-in-place is paid or impossible.
- GitHub Pages. The URL is stable, but the rebuild lag (30 s – 5 min) breaks the iteration cadence, and the unit of update is a commit.
- Vercel preview URLs. Brilliant for CI, but every deploy is a distinct preview URL by design. The "production" alias is stable, but it's a heavy primitive for a five-minute artifact.
- Notion / Linear / GDocs. URL is stable, but the content has to be expressed in their flavour of rich text. Agent-emitted HTML rarely survives the round-trip.
What Stacktree does
Stacktree exposes update_site as a first-class verb in its MCP server and HTTP API. The agent calls:
PUT /sites/{slug}
Content-Type: text/html
<!doctype html>… The R2 object is replaced atomically, the edge cache is purged, and the same URL serves the new content on the next request. No new slug, no new token, no new "see V3" message in Slack.
The viewer-side contract
The deal with the viewer is: this URL always points to the latest version. They bookmark once. They refresh when they want the current state. If the artifact has been deleted or expired, they see a clean 404 — never a stale cached page silently. That's the contract that makes agent-loop hosting actually trustworthy.
When you shouldn't use it
- Compliance-archived artifacts. If you need to prove what V7 looked like in March, you want an immutable URL per revision. Stacktree can do this too — just call
publish_htmlfor each new revision instead ofupdate_site. - Public marketing pages. Real CDN, real DNS, real cache-control headers. Stacktree handles small-to-medium static loads fine, but a viral homepage is not its job.
Frequent questions
What is agent-loop hosting? +
update_site) every time it revises the artifact. The viewer's bookmark always shows the latest version.Why does this matter? +
How is this different from a normal static host? +
Does the agent need write access to keep the URL stable? +
~/.stacktree/credentials and binds the slug to the account on first publish.How does this play with caching and CDN? +
update_site call. End users see the new version on the next request; there's no manual cache-bust step.Can multiple agents update the same site? +
Related guides
Sources and further reading
- Karpathy — agents output HTML ↗ The thread that crystallised the "agents emit HTML" thesis behind this page.
- Model Context Protocol — tools ↗ How MCP exposes verbs like publish_html / update_site to agents.
- Cloudflare Workers — atomic R2 writes ↗ The primitive that lets update_site swap content under a stable URL atomically.
- HTTP caching (MDN) ↗ Why replace-in-place hosting must handle cache invalidation carefully.