Welcome to Fragmentor v4. Still working in v3?Switch to v3

Is Astro + Sanity Still the Right Stack for AI-Built Sites?

Agencies are dropping website builders for AI-built static sites, then adding a CMS so their clients can edit them. It works, but it creates an uncomfortable split between your code and your content. Here's how we got there, and what's next.

You open Claude Code and ask it to update the prices on the home page. It digs through your site files, and comes back with: "The prices live in your CMS. You can change them there, or connect its MCP so I can do it." A simple edit just turned into a detour. Your AI only knew about half of your website.

If that sounds familiar, you're not alone!

What is the Astro + Sanity stack?

Astro + Sanity is a way of building websites where Astro turns your code into fast static files, and Sanity gives your team a place to edit the content. Developers write the design in Astro, while clients edit text, images and products in Sanity Studio without touching any code.

Over the past year it has become a popular choice among agencies and freelancers building marketing sites. To understand why, we have to go back a little.

Website builders are getting out of date.

For years, WordPress, Webflow and Framer were the obvious choice for marketing sites. You could click your way to a decent website without writing code. It was a game changer when it first came out.

Then AI happened. Designers and developers discovered that prompting gets you to the same result, but often much quicker. Describe a section, get a section. Don't like it? Ask for changes. What used to take an afternoon of dragging boxes around, now takes a couple of minutes.

Website builders were made for a world where you had to build everything by hand. That world is fading.

Why static sites took over.

Most marketing agencies build simple sites: a home page, a couple of service pages, a blog and a contact form. Those sites don't need server-side code, a database or a login system. They just need to be fast and look good.

That's where static sites come in. A static site is simply a folder of HTML, CSS and JavaScript files, meaning:

  • You can host them anywhere (often for free)
  • There are no security issues (nothing to hack)
  • There are no plugins to maintain (ugh, WordPress)
  • They load incredibly fast, which Google loves

On top of that, AI agents work very well with them. A static site is just text, and AI loves text. Especially text it was heavily trained on, i.e. HTML, CSS and JS.

This is why Astro became so popular. Unlike Next.js, Astro outputs static files by default, so there's no server rendering pages on every visit. It got so popular that Cloudflare acquired the Astro team in January 2026.

"How do I edit my site?"

However, static sites come with an old problem. You hand over a beautiful Astro site to your client, and the first thing they ask is: "How do I change the text on the home page?"

They obviously can't write code. Most don't even have an AI subscription to assist them. And even if they did, would you really want your client prompting changes into your codebase? If you've ever worked with customers, you know how easy it is for them to mess up the phenomenal job you've done. They just don't get it sometimes.

Every change now goes through you. Fixing a typo becomes a support ticket.

Introducing Sanity.

Agencies needed an editing layer their clients could use. So they did what seemed like the next logical step: add a Content Management System, or CMS for short. Fair enough! They have existed for many years. Today, Sanity became one of the most popular. It has an official Astro integration, a polished editor (Sanity Studio) and a generous free tier. In many cases, this solution is sufficient, but there is a real problem few people talk about.

Your content now lives in two places.

Your website's content is now scattered over two locations. Some of it lives in the code (e.g. the components, the hardcoded copy, the schemas). The rest lives inside Sanity's database somewhere in the cloud.

Diagram comparing where content lives in Astro + Sanity versus Fragmentor

Remember, we moved to static sites because AI works so well with plain text. Now we've moved half of that text out of reach again. It knows some of the content lives in the code, but for everything else it has to query a database somewhere else.

In short, we solved the editing problem by bringing back the exact problem static sites were meant to get rid of. There must be a better way!

There is a better way.

Git-based CMSs like Decap, TinaCMS and Keystatic took a different route. Instead of moving your content into a database, they keep it in files inside your repository, right next to your code. The editor reads and writes those same files, so there's no API to query and no second source of truth.

Fragmentor takes the same approach with its own open-source (MIT) framework. Like Astro, it turns your project into a static site, built around four folders: components for the design, schemas for the structure, documents for the content and assets for files like images. Pages and posts are Markdown, structured data like products or settings is JSON or YAML, and every page is converted into plain HTML at build time.

When it's time to hand the site over, upload your project to Fragmentor and you get:

  • A visual editor generated from your schemas
  • Live collaboration between users and agents
  • Free hosting, with no seats to pay for
  • No lock-in, your site stays plain HTML, CSS and JavaScript

Your content stays in readable files, not a proprietary format, and you get visual editing and collaboration on top of it for free.

Conclusion

Website builders are making way for AI, static sites are taking over, and Astro + Sanity became the popular answer to "how do clients edit this?". It works, but it splits your site in two, and your agents pay the price.

I don't believe your content needs a proprietary format. Agents are at their best editing what they know deeply: HTML, Markdown, JSON and YAML. On the other hand, humans want to click on a heading and change it. Neither should have to compromise, and both should be able to work on the same site, together.

Building the best editing experience for agents, combined with the best editing experience for humans.