Portable Text is a spec for block content as structured JSON.
It's also an editor for authoring it. In production since 2017. Open spec.
The docs at portabletext.org just got a major overhaul β
Posts by Sanity
Ken built a dog adoption app where you skip the filters & toggles and just type "fluffy, will love the stray kittens, won't destroy my small apartment." Sanity Agent Context does the rest.
www.sanity.io/blog/better-...
I'm having so much fun with the @sanity.io Content Agent API.
Building a "conference management system" - imagine being able to just update your conference rig via chat?
A month ago I was bemoaning the state of @sanity.io - I was wrong.
Iβve just spent the past couple of days setting up a new site & getting to grips with all the new features. Sanity havenβt spread themselves thin. Theyβve made an epic platform to buildβ¦ ANYTHING! π₯° π€ π§βπ»
Sanity is now available as a Loveable connector
Sanity is available as a connector in Loveable. Your agent creates schemas, content, LD-JSON, landing pages at scale. When you're ready, deploy a Studio so your client manages content themselves.
Add it now: lovable.dev/settings?tab...
Sanity is now available on the Cursor marketplace.
Cursor can now create, update, and manage your content.
The Sanity plugin is on the Cursor Marketplace. Write content, generate images, query documents, publish. All within your content model.
Enter `/add-plugin sanity` to install.
cursor.com/marketplace/...
A mug, two pens, a document, and an AirPods case on a wooden table.
The secret to good agents isn't better code. It's better writing.
Six lessons from building Content Agent. Short version: cut before you add, don't shout, and read your system prompt out loud.
sanity.io/blog/how-to-write-for-an-agent
Content Agent now works in Slack.
It reads the thread, looks at screenshots, understands what your team decided, and does the work. Fixes the typo buried three components deep, translates your launch page, catches the SEO fields you forgot. Saves edits as drafts.
www.sanity.io/blog/content...
"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.