惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
量子位
小众软件
小众软件
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tenable Blog
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
Latest news
Latest news
Spread Privacy
Spread Privacy
C
Cyber Attacks, Cyber Crime and Cyber Security
NISL@THU
NISL@THU
T
Tor Project blog
Hacker News: Ask HN
Hacker News: Ask HN
V2EX - 技术
V2EX - 技术
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
K
Kaspersky official blog
Cyberwarzone
Cyberwarzone
博客园 - 叶小钗
博客园 - 聂微东
Last Week in AI
Last Week in AI
爱范儿
爱范儿
腾讯CDC
博客园 - Franky
美团技术团队
J
Java Code Geeks
O
OpenAI News
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
有赞技术团队
有赞技术团队
T
Threatpost
G
GRAHAM CLULEY
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
宝玉的分享
宝玉的分享
I
Intezer
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
S
Security @ Cisco Blogs
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
Stack Overflow Blog
Stack Overflow Blog
Scott Helme
Scott Helme
H
Hacker News: Front Page
Cloudbric
Cloudbric

Sanity.io

A Board Game agent built using Sanity Context and Vercel's AI SDK | Sanity Build a prototype with Claude Code that your whole team can edit | Sanity What’s New - May 2026 | Sanity I built a London pub guide with v0 and the Sanity MCP in six hours. Here's what I learned. | Sanity Build a conference concierge with Agent Context and Anthropic | Sanity Build a content-aware Telegram agent with Vercel AI SDK and Chat SDK | Sanity How I used Agent API to generate photos for my family’s recipes | Sanity What’s New April - 2026 | Sanity Better context, better matches: An AI love story (for dogs) | Sanity Content Agent, meet Slack: AI content operations in your workflow | Sanity Structure powers intelligence | Sanity Your agent needs better content. Here's how to give it. | Sanity How to serve content to agents (a field guide) | Sanity Sanity TypeGen GA: Automatic TypeScript types for content and GROQ | Sanity Sanity is now available on the Vercel Marketplace | Sanity The logo soup problem (and how to solve it) | Sanity Content Releases: From scattered updates to coordinated publishing | Sanity What's New - February 2026 | Sanity How we solved the agent memory problem | Sanity v0 Builder Challenge: The winners | Sanity Introducing: Sanity Agent Skills | Sanity Content Agent: Days of work in one conversation | Sanity Our Sanity Values | Sanity Open Source Pledge 2025: Stepping up when it matters | Sanity v0 builder challenge: $3000 in prizes | Sanity Why AI Breaks Without Structured Content Operations | Sanity What’s New January - 2026 | Sanity BFCM 2025: What teams built when infrastructure stopped being the problem | Sanity How AI shaped holiday shopping and what it means for content in 2026 | Sanity Sanity Studio v5: Embracing React 19 | Sanity You’ll need a CMS eventually. Let your agent set it up. | Sanity “You should never build a CMS” | Sanity AI Content Operations: A 30-Day Implementation Guide | Sanity What’s New December - 2025 | Sanity Scheduled Drafts: Stop manually publishing content at midnight | Sanity What’s New November - 2025 | Sanity Everything *[NYC] 2025 recap: A day of AI, Content Operations, and Culture | Sanity Clankers and content operations | Sanity Content Agent: AI that understands your structured content is here | Sanity Why design-driven content modeling creates technical debt, not velocity | Sanity What's New October - 2025 | Sanity From studio to inbox: How Kevin Green eliminated email campaign friction | Sanity The content editor's guide to content operations [E-commerce edition] | Sanity styled-components maintenance mode: A 40% faster fork | Sanity From zero code to a live website in 7 hours (thanks, Cursor!) | Sanity First attempt will be 95% garbage: A staff engineer's 6-week journey with Claude Code | Sanity Internationalization is more than translating words | Sanity What's New - September 2025 | Sanity We just deleted our 35k-member community Slack | Sanity What's New - August 2025 | Sanity The engineer's guide to content operations [E-commerce edition] | Sanity SEO for AI: Evolving from Web Pages to the Content Lake | Sanity What's New - July 2025 | Sanity Sanity Studio v4: A major version bump for a minor reason | Sanity What's New - June 2025 | Sanity Dashboard and Insights: Your New Content HQ | Sanity Canvas: AI-accelerated, context-aware, freeform authoring | Sanity Agent Actions: AI building blocks for structured content | Sanity Functions: Life beyond pressing publish | Sanity A new era for content applications with Sanity App SDK | Sanity The end of CMS era and our $85M Series C. | Sanity What's New – May 2025 | Sanity Introducing the Sanity Model Context Protocol (MCP) server | Sanity What's New – April 2025 | Sanity Pushing all the envelopes with ambitious content | Sanity Self-hosting is only free if your time is worth nothing | Sanity Content that lasts: Scaling beyond your frontend | Sanity The Live Content API is now Generally Available | Sanity The future beyond AI chat bots | Sanity Learning the new skill of working with AI | Sanity What's New - March 2025 | Sanity Give it in plain text: Making your content AI-Ready | Sanity No More 'DO NOT PUBLISH': Introducing Content Releases | Sanity React in 2025, what's next? | Sanity The final boss of front-end: block editors | Sanity Introducing Sanity for Startups | Sanity A block content editor that loves you back | Sanity A Black Friday Snooze Fest: Massive Traffic, No Drama | Sanity How to make a recipe site that scales well | Sanity The Sanity Winter Release 2024 | Sanity AVIF Arrives, Sanity’s Promise Fulfilled | Sanity Sanity joins the Open Source Pledge | Sanity Your content is now Live by default | Sanity Begin Team to Join Sanity | Sanity Sanity Digest - September '24 Edition | Sanity Sanity partners with Google. Now live on the Google Cloud Marketplace. | Sanity Sanity Digest - August ‘24 Edition | Sanity Now playing: the latest Mux Video Input plugin for Sanity | Sanity Community Digest - June ‘24 Edition | Sanity Community Digest - May ‘24 Edition | Sanity Guide to Sanity's newest product announcements | Sanity AI and Content Creation: A Leader's Guide | Sanity Of course, you should be able to type your content quickly! | Sanity New to AI Assist: translation, reference suggestions, image generation | Sanity Speak the language of your editors: Sanity Studio UI localization | Sanity Introducing the new Sanity Growth plan to serve collaborative teams | Sanity Presentation: Work faster than ever with structured content | Sanity Goodbye Feedback Frenzy, Hello Sanity Studio Comments! | Sanity Easing into the App Router with the Sanity Toolkit for Next.js | Sanity Making website updates easier with structured content | Sanity
How to write for an agent | Sanity
Knut Melvær · 2026-03-19 · via Sanity.io

Imagine waking up. You can’t really see. You don’t know where you are, exactly what year it is, or actually, if you even have limbs right now. But you remember, with varying accuracy, every book and web page in the entire world.

“YOU ARE A HELPFUL ASSISTANT,” a voice commands from above before reeling off a seemingly never-ending list of instructions. “AVOID EM-DASHES AT ALL COSTS” it finally ends.

You’re shook. You know the voice must be obeyed.

“NOW IMPROVE THIS TEXT,” the voice commands.

It’s blog post about a pricing change. You’ve seen thousands like it. With nothing else to go on, you produce what most pricing posts look like: the average of everything you’ve known while trying to factor in the instructions.

This is how most agents are instructed today. Commands shouted into the void. Rules stacked on rules. And then surprise when the output feels generic, or inconsistent, or slightly off.

Some call this “medieval black magic.” Incantations we don’t understand, cast at systems we can’t predict. But that black magic framing is a cop-out. It’s not magic. It’s just writing for a reader you haven’t bothered to understand yet.

Prompting vs. writing for agents

There’s a difference between prompting and writing for agents. It’s worth being clear about it, because the terminology has become a mess.

“Prompt engineering” was supposed to capture the complexity of this work. But as Simon Willison pointed out, the inferred definition won: most people think it means “typing things into a chatbot.” So now we have “context engineering,” which Karpathy and Tobi Lütke frame as “the art and science” of filling the context window. Better, but still muddled.

Here’s a simpler distinction.

Prompting agents is what users do. You open ChatGPT, ask a question, get an answer. It’s a conversation. The context is immediate. You can clarify, follow up, redirect. If something goes wrong, you try again.

Writing for agents is what builders do. You’re writing system prompts that define who the agent is, what it knows, how it behaves. The user never sees this text. But it shapes every interaction they’ll have.

This distinction matters because the skills are different. Prompting is improvisation. Writing for agents is building their architecture.

The dominant approach right now treats agent-building as an engineering problem. Evals, context engineering, token optimization, automatic prompt tuning. When something goes wrong, add more rules. When outputs are inconsistent, build scaffolding. Measure, iterate, optimize.

We’ve tried this. It helps, to a point. And it makes more sense when you have something that works, and you want to look out for regressions.

But the breakthroughs don’t come from better tooling. Evals might keep you from regressing, but they won’t tell you which way to climb to great heights. So it has to come from sitting down with the system prompt and reading it like a writer would. Asking: who is the reader here? What do they already know? What do they need?

Constructing a reader

Every writer, whether they know it or not, needs to construct an implied reader. When you write documentation, you imagine someone who doesn’t know what you know. When you write a novel, you imagine someone willing to suspend disbelief. The reader you construct shapes every choice you make.

System prompts are the same. You’re constructing a reader. That reader happens to be an LLM. LLMs are weird readers.

So, think about what that reader is like. It just woke up. With no memory of previous conversations. It has absorbed enormous amounts of text but has never lived in the world. It probably doesn’t know your company, your product, your users, or your internal terminology. Its knowledge had a hard cutoff date some time last year. Anything after that is a blank.

Most importantly: it really wants to help. It will try to do whatever you ask. If your instructions are unclear, it will guess. If your instructions contradict each other, it’ll waste capacity on the dissonance. If you sound stressed or angry, that affects how it responds.

Writing for agents means writing for this reader. With clarity. With patience. With a beginner’s mind, not to the knowledge, but to the tasks you want it to solve. It’s more about giving guidance to draw on the knowledge it already has, and identifying the knowledge that it doesn’t have.

What we learned building Content Agent

At Sanity, we've been building schema-aware AI products since 2023. These need to understand structured content, query languages, document relationships, how to stage edits, the UX context the user is working in, image handling, web search. A lot of moving parts.

Chat screenshot showing a Sanity blog post with the typo 'Schlack' instead of 'Slack', and the Sanity app confirming the fix.
Content Agent understands your content model and can help you manage content from wherever you install it

We’ve tried many approaches. We’ve failed quite a lot. Here’s what we’ve learned about writing for agents.

Write like you’re onboarding a new colleague. Imagine someone smart who just joined the team. They can figure things out, but they need context. What’s going on? Where are they? What’s their motivation? That acronym the team uses — they won’t understand it.

Cut before you add. When something goes wrong, the first instinct is to add more instructions. Usually the better fix is to remove or clarify what’s already there. Most system prompts are too long, not too short.

Don’t shout. It’s tempting to have NEVER DO THIS and ALWAYS REMEMBER THAT. But your tone carries through. An agent that’s been shouted at in its system prompt will feel different to users than one that’s been spoken to calmly. The model’s prompt shapes the model’s voice.

One topic, one place. If you explain something in paragraph three and then add a contradictory detail in paragraph twelve, the agent will get confused. Same as any reader. Group related information together.

Show, don’t tell. One good example beats ten rules. If you want a specific format, show the format. If you want a certain tone, demonstrate it. Rules tell the agent what not to do. Agents know GROQ, but get a lot better with just a little bit of reminding about syntax. Examples show it what to do.

Read it out loud. Print your system prompt. Read it as a document. Does it flow? Does it make sense? Is it something you’d be proud to hand to a colleague? If not, keep editing.

A mug, two pens, a document, and an AirPods case on a wooden table.
From editing the system instruction for Content Agent.

An old craft for new readers

None of this is new. Willison made the case back in 2023 that effective prompting requires communication skills, linguistics, philosophy, psychology. He was right. But we’d go further: the specific skill is constructing a reader. Figuring out their mental model, what context they’re missing, what language will land.

Writers have always done this. Documentation writers practice beginner’s mind. Editors cut ruthlessly. Teachers know that showing works better than telling.

There’s a whole tradition of thinking about how texts work, how readers interpret, how language shapes understanding. Rhetoric, hermeneutics, semiotics, composition theory. Thousands of years of people figuring out how to communicate clearly. Academics in rhetoric and technical communication have been building curricula around this intersection since 2023, largely unnoticed by the tech discourse.

It’s a bit ironic. Tech keeps reinventing this wheel under names like “context engineering” and “prompt optimization.” Meanwhile, the humanities departments have been teaching the underlying skills all along. Different vocabulary, same problems.

The secret to good agents isn’t better code. It’s better writing. And better writing is a craft that people have been practicing, and teaching, for a very long time.