See AI content operations in action at Braze. Join the live session April 14th
Agent Actions

AI building blocks for structured content workflows

Deeply integrated AI

Built on structure

Outputs are automatically validated against the content types in your Sanity Studio schema, so responses from the LLM always fit your schema.

Respond with AI

Trigger content updates using APIs, scripts, or CI pipelines. No Studio or UI needed, although hooks can easily be integrated into the Studio or UI’s.

Operates at any scale

Whether you're automating a single field or running updates across your entire dataset, Agent Actions scale with you.

Creative computation

Instead of coding static rules, use structured prompts and live content values to generate meaningful, schema-valid results.


It’s not just AI automation. It’s programmable creativity

Automation

Make AI a collaborator

instructing AI agent with prompt
Generate

Create or enrich content with dynamic prompts

Learn about Generate
client.agent.action.generate({
  targetDocument: {
    operation: 'create', _type: 'movie'
  },

  instruction:
    `Write a summary for the movie, $movie.`,
  instructionParams: {
    movie: {
      type: 'constant',
      value: 'Space Jam',
    },
  },
	
  schemaId: 'schemaId'
})
Transform

Reshape content for new use cases

Learn about Transform
client.agent.action.transform({
  instruction: 'Replace "Your CMS" with "Sanity"',
  documentId: 'documentId',
  schemaId: 'default-schema'
})
Translate

Localize content while keeping structure intact

Learn about Translate
client.agent.action.translate({
  fromLanguage:
    { id: 'en-GB',title: 'English' },
  toLanguage:
    { id: 'no-NB', title: 'Norwegian Bokmål' },
  
  styleGuide: 'Preserving formal tone and legal terminology without paraphrasing',
  
  documentId: 'documentId',
  schemaId: 'default-schema'
})

AI translations that follow your terminology

Get the guide
A cursor clicks the 'Translate All' button, activating progress bars for de-DE, en-CA, and es-MX translations.
G2 badge: momentum leader, spring 2025G2 badge: spring 2025 users most likely to recommend mid-marketG2 badge: grid leader enterpriseG2 badge: spring 2025 high performer mid-market

Developers love Sanity

All G2 reviews

It's incredibly easy to push data into Sanity Content Lake from outbound systems. With the Sanity API, I'm not making 10,000 calls to update 10,000 items. I'm making one API call and the whole dataset is updated.

A portrait of Kevin Harwood
Kevin Harwood
CTO

Ready to build? Let's make it real.

Sign up for Sanity for free and start crafting your first project.

Get Started