# Why AI agents need a publish primitive · Stacktree

Source: https://stacktr.ee/blog/why-agents-need-a-publish-primitive

[Skip to content](#main) [Stacktree](/)[Developers](/developers)[Agents](/agents)[Docs](/docs)[Use cases](/use-cases)[Pricing](/pricing)[Blog](/blog)[Dashboard](https://app.stacktr.ee)[Sign in →](https://app.stacktr.ee)      By [ Steve Smith ](/about) · Founder, Stacktree  ·  Last updated May 14, 2026          blog · concepts

#  Why AI agents need a publish primitive.

   Agents now write HTML at the rate humans write commits. Treating each artifact as a deploy is the wrong granularity. The publish step deserves its own verb — a primitive — and that's why agent-output infrastructure looks different from product hosting.

  [ Get started free ](https://app.stacktr.ee/?join=1&from=seo_blog_why_agents_need_a_publish_primitive)   install npx stacktree-install
Copy
     No card · 3 pages free · about a minute

##  What is a publish primitive?

A publish primitive is a single API call that takes a finished artifact and gives it a URL. It deliberately omits a project model, a build pipeline, and a deploy ceremony. The whole verb is "file in, URL out." Stacktree's `publish_html` is one. Pastebin (in spirit) is one. Tiiny Host's drag-and-drop is one. None of those are the right shape for an AI agent, which needs the verb to be a tool call rather than a browser action.

## On this page

  -   01  [ The granularity mismatch ](#granularity-mismatch)
-   02  [ Where AI agents make the gap acute ](#where-agents-make-the-gap-acute)
-   03  [ What a publish primitive looks like ](#what-a-publish-primitive-looks-like)
-   04  [ Why this can't just be 'a feature' of an existing host ](#why-not-a-feature)
-   05  [ What changes when the primitive is right ](#what-changes-when-the-primitive-is-right)
-   06  [ Where the primitive isn't the right answer ](#where-the-primitive-is-not-the-answer)
-   07  [ The bet ](#the-bet)

## The granularity mismatch

 The hosting tools engineers reach for today were built for products: long-lived, versioned, deployable. Vercel, Netlify, GitHub Pages, Cloudflare Pages — each starts with a project, ties it to a Git remote, builds it through CI, exposes it at a stable URL. That model works beautifully when the unit of work is "a thing my team maintains for a year."

 It works terribly when the unit of work is "a thing an agent wrote five minutes ago and you want to send to one person." The setup cost — project + Git + DNS + CI — is larger than the artifact's entire lifecycle.

## Where AI agents make the gap acute

 Three forces compound:

  - Volume. A single Claude Code or Codex session can emit a dozen HTML files: a spec, a perf report, a tiny editor, a diff viewer, a request-shape inspector. None warrants a project. All warrant a URL.
 - Iteration. Agents revise. The same artifact gets eight versions in an afternoon. If each version is a new URL, your teammate's bookmark is stale before they open it.
 - Privacy. Agent output frequently embeds real data — API responses, customer rows, prompt context, sometimes [the credential that fetched the data](/blog/do-ai-agents-leak-secrets). Public-by-default is no longer a defensible baseline, and a verb with its own defaults can scan and block at the boundary.

## What a publish primitive looks like

 Concretely, the primitive needs four properties:

  - One call. No project to create, no build to run, no DNS to point. The agent calls a tool; the URL exists.
 - Replace-in-place. The same URL across every revision of the same artifact. Bookmark survives.
 - Private by default. Unguessable URL as the baseline; optional password or email-domain gate per link.
 - Deletable. Auto-expire by default; agent can also delete on demand. Short-lived artifacts shouldn't clutter forever.

## Why this can't just be "a feature" of an existing host

 It could be — and a few hosts are starting to bolt it on. But the project model isn't a feature you remove, it's an architectural decision. A host built around projects will keep nudging artifacts toward project-shaped behaviour (folders, dashboards, branch previews, environment variables) because that's where the rest of the product expects them to live.

 A primitive built for one-off artifacts can stay small. A dozen verbs is enough. Anything more is a workflow you didn't need.

## What changes when the primitive is right

 The agent loop tightens. Specifically:

  - The agent calls a tool the same way it'd write a file. No procedural switch.
 - The URL is a stable handle the agent can hand back into the next message context.
 - The team bookmarks once and treats Stacktree links like Notion links — they auto-update.
 - Privacy gates live at the link layer, not the org layer, so a developer can prove value before involving IT.

## Where the primitive isn't the right answer

 Some artifacts deserve the project model: anything you ship to customers, anything that must be archived forever, anything that needs A/B testing or branch previews. The publish primitive isn't a replacement for those — it's a complement for the long tail of agent output that doesn't need any of it.

## The bet

 If agents continue to emit HTML at the rate they currently do, the publish primitive becomes as load-bearing as the file-write primitive was for IDEs. We're betting it does. Stacktree is the bet.

     See it in one call, no account

```
`curl -X POST https://api.stacktr.ee/sites -F file=@index.html
# &rarr; a private URL, live for 24h. Claim it free to keep it.`
```

If your agents emit HTML, they need a durable publish target: publish once, then
`update_site`
on every revision keeps the same URL forever. MCP, REST, and skills all speak it:
        the map is at [agent.txt](https://stacktr.ee/agent.txt).

[
Get an API key free
](https://app.stacktr.ee/?join=1&from=bridge_blog_why_agents_need_a_publish_primitive)
FAQ

## Frequent questions

     What is a publish primitive? +  A publish primitive is a single API call that takes a finished artifact and gives it a URL. It deliberately does not bundle a project model, a build pipeline, or a deploy ceremony. It is the smallest possible verb that turns "I have a file" into "I have a link."   Why is this different from a static-site host? +  A static-site host (Vercel, Netlify, GitHub Pages) is built around the "project" abstraction: you create a project, configure it, point it at source, deploy. A publish primitive is built around the "artifact" abstraction: you have one file, you call one verb, you get one URL.   Doesn't every static host already do this? +  Technically yes — but the project model overwhelms the artifact model. When an agent emits twenty HTML files in a session, twenty projects is the wrong unit. A primitive is the right unit.
Keep reading

## Related guides

   -  [ Agent-loop hosting The technical contract behind replace-in-place URLs. ](/agent-loop-hosting)
-  [ MCP servers explained How the primitive reaches the agent. ](/blog/mcp-servers-explained-for-developers)
-  [ Private-by-default hosting Why the privacy axis changed in 2026. ](/blog/private-by-default-html-hosting)
-  [ The MCP publish tool Stacktree's implementation of the primitive. ](/mcp-publish-html)

References

## Sources and further reading

   -  [ Karpathy — agents output HTML ↗ The thread that names the trend this post argues from. ](https://x.com/karpathy/status/2053872850101285137)
-  [ Thariq — HTML effectiveness gallery ↗ A live catalogue of what agents actually produce when asked to "show, not tell." ](https://thariqs.github.io/html-effectiveness/)
-  [ Model Context Protocol — tools spec ↗ How a "publish primitive" reaches the agent as a tool call. ](https://modelcontextprotocol.io/specification/2025-11-25/server/tools)

##  Try the primitive.

 Install the MCP server. Watch how much friction disappears.

 [ Sign up free → ](https://app.stacktr.ee/?join=1&from=cta_blog_why_agents_need_a_publish_primitive)   install npx stacktree-install
Copy
       Private hosting for the HTML your agents make.

[](https://betalist.com/startups/stacktree?utm_campaign=badge-stacktree&utm_medium=badge&utm_source=badge-featured)[Featured on](https://devhunt.org/tool/stacktree)[](https://buildlist.io)[Get started free](https://app.stacktr.ee/?join=1)

## Product

- [Page video](/page-video)
- [Ask this page](/ask-this-page)
- [Client spaces](/client-spaces)
- [Templates](/templates)
- [Example deliverables](/examples)
- [Custom domains](/custom-domains)
- [Client feedback](/client-feedback-loop)
- [One-time links](/one-time-view-links)
- [See how pages get read](/page-engagement)
- [Made with Stacktree](/made-with)
- [Security](/security)
- [Watch the demo](/demo)

## Agents

- [All integrations](/agents)
- [Claude Code](/claude-code)
- [OpenAI Codex](/codex)
- [Cursor](/cursor)
- [Claude.ai connector](/claude-ai-connector)
- [Claude Cowork](/what-is-claude-cowork)
- [Meta Muse](/muse)
- [MCP server](/mcp-publish-html)
- [Deploy from Claude Code](/deploy-html-from-claude-code)
- [Skills](/skills)
- [Slack app](/slack)
- [n8n node](/n8n)
- [Agent payments (x402)](/x402)

## Alternatives

- [All comparisons](/alternatives)
- [Head-to-head comparisons](/compare)
- [Tiiny Host](/tiiny-host-alternative)
- [GitHub Pages (private)](/github-pages-private-alternative)
- [Vercel](/vercel-alternative-for-agents)
- [ngrok](/ngrok-alternative-for-html)
- [Display.dev](/display-dev-alternative)
- [Static.app](/static-app-alternative)
- [OpenAI Codex Sites](/openai-codex-sites-alternative)
- [here.now](/here-now-alternative)
- [Shippage](/shippage-ai-alternative)
- [Best private hosting](/best-private-html-hosting)

## Use cases

- [All use cases](/use-cases)
- [Share with clients](/share-with-clients)
- [Send a file to a client](/share-html-file-with-client)
- [Share Claude artifacts](/share-claude-artifacts)
- [Share Jupyter notebooks](/share-jupyter-notebook-html)
- [Host Storybook privately](/host-storybook-privately)
- [Architecture diagrams](/share-architecture-diagrams)
- [AI-generated reports](/host-ai-reports)
- [Internal HTML tools](/internal-tool-hosting)
- [Private HTML hosting](/private-html-hosting)
- [Vibe-coded page hosting](/vibe-coding-hosting)
- [Leave a website builder](/website-builder-migration)

## Learn

- [Blog](/blog)
- [Glossary](/glossary)
- [FAQ](/faq)
- [Where AI output should live](/where-ai-output-lives)
- [Agent-loop hosting](/agent-loop-hosting)
- [Why agents need a publish primitive](/blog/why-agents-need-a-publish-primitive)
- [MCP servers explained](/blog/mcp-servers-explained-for-developers)
- [What changed in the 2026-07 MCP spec](/blog/mcp-2026-spec-changes)
- [Sites in Codex explained](/blog/sites-in-codex-explained)
- [Private-by-default hosting](/blog/private-by-default-html-hosting)
- [An agent paid us $1 (x402)](/blog/agent-paid-to-provision-itself)
- [When a loop hits a paywall](/blog/loop-engineering-paywall)
- [Pricing](/pricing)
- [Self-host (new)](/self-host)
- [Changelog](/changelog)
- [Docs](https://stacktr.ee/docs)
- [About](/about)
© 2026 Stacktree · stacktr.ee

[Privacy](/privacy)[Terms](/terms)[Security](/security)[Dashboard](https://app.stacktr.ee)[npm](https://www.npmjs.com/package/stacktree-mcp)[Sitemap](/sitemap.xml)[llms.txt](/llms.txt)[API spec](/openapi.json)

---
Full markdown summary of the Stacktree marketing surface: https://stacktr.ee/llms-full.txt
