create-agent-with-sanity-context

Build AI agents with schema-aware access to Sanity content via Agent Context.

1|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/sanity-labs/pup-finder-demo --skill create-agent-with-sanity-context-sanity-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-agent-with-sanity-context
Source: https://github.com/sanity-labs/pup-finder-demo/tree/main/.agents/skills/create-agent-with-sanity-context
Command: npx skills add https://github.com/sanity-labs/pup-finder-demo --skill create-agent-with-sanity-context-sanity-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Setting up AI agents that can read and reason over structured Sanity content is difficult without schema‑aware access, leading to vague results and extra engineering work.

Core Features & Use Cases

  • Schema‑aware access: Agents query Sanity using real fields and relationships instead of plain text similarity.
  • Tool integration: Automatic discovery of Agent Context MCP tools like initial_context, groq_query, and schema_explorer.
  • Flexible deployment: Works with Next.js, SvelteKit, Express, Python, or any LLM that supports tool calling.
  • Use Cases: Build a chatbot that answers product questions, create a documentation assistant, or enable semantic search over Sanity data.

Quick Start

Create an Agent Context document in Sanity Studio, configure the MCP URL and tokens, and hit the API route to launch your AI agent.

Frequently Asked Questions about create-agent-with-sanity-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an AI chatbot that queries structured Sanity content?

To build an AI chatbot with structured Sanity content, use Agent Context to provide schema-aware access, allowing your LLM to query real fields and relationships instead of relying on plain text similarity. Configure an Agent Context document in Sanity Studio with your credentials and MCP URL.

How does schema-aware access improve AI agent results in a headless CMS?

Schema-aware access improves AI agent results by letting the model query Sanity using actual fields and relationships. This prevents vague responses and reduces the extra engineering work typically required when AI lacks structured context from your headless CMS.

Can I integrate a Sanity AI assistant with Next.js or Python?

You can integrate a Sanity AI assistant with Next.js, SvelteKit, Express, or Python. The Agent Context setup works with any LLM provider that supports tool calling, automatically discovering MCP tools like groq_query and schema_explorer for flexible deployment.

What do I need to set up an AI agent with Sanity Agent Context?

To set up an AI agent with Sanity Agent Context, you need a deployed Sanity Studio, an Agent Context document configured with proper credentials, an MCP URL, and an LLM provider API key to enable tool calling and semantic search over your data.

What Sanity MCP tools are available for AI agent integration?

Available Sanity MCP tools for AI agent integration include initial_context for setup, groq_query for executing structured queries, and schema_explorer for navigating your content structure. These tools are automatically discovered when you configure the Agent Context document.

Why does my AI agent return vague results from Sanity data?

AI agents return vague results from Sanity data when they lack schema-aware access and rely on plain text similarity. By integrating Agent Context, your agent queries actual fields and relationships, eliminating vague outputs and reducing manual engineering work.