"The model wasn't broken. The context was."
Our CEO Magnus Hillestad on why AI agents need structured content, not bigger context windows.
Structure powers intelligence.
sanity.io/blog/structure-powers-intelligence
"The model wasn't broken. The context was."
Our CEO Magnus Hillestad on why AI agents need structured content, not bigger context windows.
Structure powers intelligence.
sanity.io/blog/structure-powers-intelligence
π
Gave a talk at AI DevWorld about serving content to AI agents. Wrote up the longer version as a field guide.
The "AI-ready content" conversation keeps mixing up three different things. Most teams are investing in the wrong one.
sanity.io/blog/how-to-serve-content-to-agents-a-field-guide
// app/blog/page.tsx import { defineQuery } from 'groq' const postsQuery = defineQuery(` *[_type == "post"]{ title, "authorName": author->name, "commentCount": count(comments), "excerpt": pt::text(body)[0..200] } `) // Generated in sanity.types.ts: // // type PostsQueryResult = Array<{ // title: string | null // authorName: string | null // β dereferenced join // commentCount: number // β always a number // excerpt: string | null // β GROQ function result // }>
import type { Get, FilterByType } from 'sanity' import type { Page, PageBuilder } from './sanity.types' // Before: extracting nested page builder types type Hero = NonNullable< NonNullable<Page['sections']>[number] >['hero'] // After: with TypeGen's utility types type Hero = Get<Page, 'sections[number].hero'> type HeroBlock = FilterByType<PageBuilder, 'hero'> // ^? { _type: "hero"; heading: string; image: ... }
import { defineQuery } from 'groq' const postQuery = defineQuery(` *[_type == "post"]{ title, "authorName": author->name, "commentCount": count(comments) } `) // Generated type: type PostQueryResult = Array<{ title: string authorName: string commentCount: number }>
Sanity TypeGen is now GA!
It types your GROQ results, computed fields, inline joins, and projections.
β Automatic typegen in Studio, --watch for frontend repos
β Utilities for nested schemas
β @svelte.dev, @vuejs.org, @astro.build file support
www.sanity.io/blog/sanity-...
One of my favourite things about working at @sanity.io is taking some time to contribute back to OpenSource projects like github.com/module-feder...
π
Perf deep dive into the science of rendering logos nicely.
This is a bloody fascinating way to build up agent memory that sounds so much more useful than "compaction" and keeping old plans around.
www.sanity.io/blog/how-we-...
fun css tip from yesterday's react-logo-soup post:
if you render logos as inline-block, the browser treats them like words. which means css text-wrap: balance just works. it distributes logos evenly across lines instead of leaving one sad orphan on the last row
'use cache' is FAST π₯ π₯π₯π₯π₯π₯ It's even faster LIVE β¨ We've been cooking at @sanity.io , give it a try: github.com/sanity-io/ne...
<LogoSoup logos={["/logo1.svg", "/logo2.svg"]} baseSize={48} gap={16} scaleFactor={0.5} densityAware={true} densityFactor={0.5} alignBy="bounds" | "visual-center" | "visual-center-x" | "visual-center-y" cropToContent={false} // Custom image renderer (e.g. Next.js Image) renderImage={(props) => (<CustomImageComponent ...props /> />
We bet you've spent more hours than you'd admit getting a row of partner logos to look right.
Our colleague @rosti.no automated it. Pixel density analysis, aspect ratio normalization. Just maths (not AI).
npm install react-logo-soup
π§ͺ sanity.io/blog/the-logo-soup-problem
It's also mildly mind boggling that this video is made from a conversation between the first Nuum agent and another that was tasked to visualize it (and add the sounds with the resound mcp they made too).
π€©
Got feedback that our TypeGen lesson on @sanity.io Learn was out of date. Instead of manually hunting through lessons, I just pointed Content Agent at it.
Found 2 lessons. Updated the instructions. Added notes where video differs from text. Ready to publish. Took only a few minutes.
Excellent! Thanks for this π
Last week in the @vercel.community...
* Vercel agent can auto detect and apply your coding guidelines
* You can use Claude Code through Vercel AI Gateway
* @v0.dev Γ @sanity.io builder challenge kicked off
* Secure compute is now self-serve for Enterprise teams
π―
We built this so content teams don't have to wait on developers for every query and developers don't have to context-switch to help.
Both sides win.
Try Content Agent: www.sanity.io/blog/content...
Every change is a proposal.
Review what's about to happen. Remove what you don't want. Bundle into a scheduled release or update a draft.
No "oops, that went live."
It combines web research with your content.
"What's trending in our industry and have we covered it?"
β researches external sources
β cross-references your published articles
β identifies gaps
One conversation, not 5 browser tabs.
Real example: One team needed to update pricing references across 200+ pages after a rate change.
Old way: spreadsheet export, find/replace, pray nothing breaks.
New way: one conversation, 227 edits staged for review. Morning Brew did something similar with topic updates.
Real example: One team needed to update pricing references across 200+ pages after a rate change.
Old way: spreadsheet export, find/replace, pray nothing breaks.
New way: one conversation, 227 edits staged for review.
@morningbrew.bsky.social did something similar with topic updates.
Most "AI for content" = paste text, get text back.
Content Agent reads your actual schema, like content types, field descriptions, references.
Ask "find products without meta descriptions" and it queries 4,000 SKUs. No queries or exports required. While you're having coffee.
Your CMS knows which products are missing descriptions.
It just can't tell you.
Until now. π§΅
ππ»
We are overdue with our @opensourcepledge.com for 2025, but hearing the news from @tailwindcss.com made us turn around and get it doneβ’
We're now processing $146,000 to open source projects that we use and like at Sanity HQ.
www.sanity.io/blog/open-so...
Everything you need to know about Sanity in ~1 hour ππ»
Some learnings from building the @sanity.io MCP Server and Agent Toolkit that we shipped as GA today (π§΅)
You vibe-coded a site. Content lives in markdown. It works.
Then your client asks for a login.
The Sanity MCP Server lets your agent set up and manage a real content backend in the same conversation you used to build everything else.
www.sanity.io/blog/sanity-...