Skip to content
Data McFly.
Back to writing

writing

Why We Build on Astro + Directus for AI-Heavy Sites

Jul 14, 2026· 3 min read· Roger Stringer

Every project has a stack decision early on, and for anything that leans on AI and automation, that decision matters more than it looks. The wrong stack doesn't announce itself. It just slowly becomes the thing you fight every time you want to add an agent, expose some data, or ship a change. For AI-heavy sites, the stack we keep coming back to is Astro on the front and Directus underneath. Here's the reasoning, including where it isn't the right call.

What Astro brings

Astro is built for content-driven sites that need to be fast. It renders on the server, ships almost no JavaScript by default, and only hydrates the interactive bits you actually need. For a marketing site, a blog, a docs site, anything where the content is the product, that means pages that load quickly and rank well without a pile of client-side weight.

The practical upshot: you get a modern, fast site without paying the performance tax that heavier app frameworks impose when you didn't need an app in the first place.

What Directus brings

Directus sits on a real database and gives you three things at once: a clean admin UI for editing content, an automatically generated REST and GraphQL API over your data, and proper roles and permissions. You model your data the way it actually is, and you get an API for it without writing one.

That last part is the quiet superpower. Your content and data live in a structured store with an API, not trapped in a proprietary format or scattered across files.

Why the combination suits AI-heavy work

Here's where it connects to everything else. AI work lives or dies on the context layer: getting the right structured data in front of the model at the right moment. A setup like this gives you exactly that.

Your data is already structured and already has an API, so an agent can read it and write back to it cleanly, instead of scraping a rendered page or parsing a mess. The same store that feeds your website feeds your automation. When your AI has a data problem, not a model problem, having your data in a clean, queryable, permissioned store is a large part of the solution, sitting right there as a side effect of how you built the site. And because the front end is fast and decoupled, you can iterate on the AI features without touching the presentation layer.

You also own your data. It's in your database, under your control, which matters a great deal once agents are reading and writing it.

When not to reach for it

This isn't a universal answer, and pretending it is would be the kind of hype we avoid. If you're building a heavily interactive web application, a real-time dashboard, a collaborative tool, something that's an app first and content second, a different front-end approach probably fits better. Astro shines on content-led sites, not app-led ones. And if your data genuinely doesn't need structure or an API, Directus is more than you need.

The point isn't that this stack is always right. It's that for a site that leans on AI and automation, having structured, API-accessible, owned data feeding a fast front end removes a whole category of problems before they start. That's the same principle as the 70/30 Method: get the unglamorous foundation right and the impressive parts get much easier.

If you're choosing a stack for something that'll lean on AI, that architecture decision is exactly the kind of thing I help clients get right early. Let's talk.