Sanity's Avatar

Sanity

@sanity.io

A fully customizable all-code backend for AI, automations, and applications to author and render content. Get started for free πŸ‘‰ https://www.sanity.io

1,051
Followers
0
Following
162
Posts
22.10.2024
Joined
Posts Following

Latest posts by Sanity @sanity.io

Preview
Structure Powers Intelligence | Sanity AI agents need structured content, not scattered docs. Learn why content infrastructure is the foundation for reliable AIβ€”and how to build it right.

"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

03.03.2026 16:55 πŸ‘ 12 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0

πŸŽ‰

24.02.2026 18:57 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
How to serve content to agents (a field guide) | Sanity "AI-ready content" means at least three different things. This post pulls them apart so you can have better conversations about what's actually worth building.

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

20.02.2026 19:35 πŸ‘ 5 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0
// 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
// }>

// 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 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
}>

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-...

18.02.2026 20:21 πŸ‘ 8 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - module-federation/vite: Vite Plugin for Module Federation Vite Plugin for Module Federation . Contribute to module-federation/vite development by creating an account on GitHub.

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...

13.02.2026 14:46 πŸ‘ 9 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

πŸŽ‰

12.02.2026 02:41 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Perf deep dive into the science of rendering logos nicely.

07.02.2026 17:10 πŸ‘ 2 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0
Preview
How we solved the agent memory problem | Sanity Being able to rely on agents for their experience feels … odd.

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-...

06.02.2026 23:24 πŸ‘ 5 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0
Post image

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

06.02.2026 15:27 πŸ‘ 6 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

'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...

06.02.2026 15:12 πŸ‘ 2 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
<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 />
/>

<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

05.02.2026 18:49 πŸ‘ 24 πŸ” 2 πŸ’¬ 3 πŸ“Œ 2
Video thumbnail

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).

30.01.2026 18:45 πŸ‘ 2 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

🀩

15.01.2026 18:51 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

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.

15.01.2026 18:48 πŸ‘ 4 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

Excellent! Thanks for this πŸ™‡

15.01.2026 15:50 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

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

14.01.2026 18:28 πŸ‘ 5 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

πŸ’―

13.01.2026 19:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Content Agent: Days of work in one conversation | Sanity Schema-aware agent for content audits, bulk edits, and web research. Now Generally Available.

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...

13.01.2026 17:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

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."

13.01.2026 17:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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.

13.01.2026 17:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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.

13.01.2026 17:28 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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.

13.01.2026 17:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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.

13.01.2026 17:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Your CMS knows which products are missing descriptions.

It just can't tell you.

Until now. 🧡

13.01.2026 17:28 πŸ‘ 3 πŸ” 1 πŸ’¬ 1 πŸ“Œ 1

πŸ™ŒπŸ»

12.01.2026 10:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Open Source Pledge 2025: Stepping up when it matters | Sanity For our 2025 Open Source Pledge, we're committing $146,000 to the projects and people behind the tools we use every day.

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...

08.01.2026 23:41 πŸ‘ 30 πŸ” 3 πŸ’¬ 0 πŸ“Œ 2
Preview
Sanity 101 - YouTube A quick series covering key areas of Sanity to get you up to speed.

Check it out: www.youtube.com/playlist?lis...

17.12.2025 13:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

Everything you need to know about Sanity in ~1 hour πŸ‘‡πŸ»

17.12.2025 13:38 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Some learnings from building the @sanity.io MCP Server and Agent Toolkit that we shipped as GA today (🧡)

16.12.2025 11:43 πŸ‘ 2 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0
Preview
You’ll need a CMS eventually. Let your agent set it up. | Sanity With the Sanity MCP server, your AI agent can now create schemas, content, and editorial interfaces from prompts.

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-...

15.12.2025 18:17 πŸ‘ 7 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0