<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="https://developer.salesforce.com/blogs/wp-content/themes/dfctheme/includes/feed_styles.xsl" ?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:podcast="https://podcastindex.org/namespace/1.0"
xmlns:rawvoice="https://blubrry.com/developer/rawvoice-rss/"
xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:dscblog="https://developer.salesforce.com/blog/dscblog/"
>


<channel>
	<title>Salesforce Developers Blog</title>
	<atom:link href="https://developer.salesforce.com/blogs/feed" rel="self" type="application/rss+xml" />
	<link>https://developer.salesforce.com/blogs</link>
	<description>Elevating developer skills and connecting with the Salesforce Developers community</description>
	<lastBuildDate>Thu, 03 Dec 2026 16:01:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<atom:link rel="hub" href="https://pubsubhubbub.appspot.com/" />
	<itunes:author>Salesforce Developers Blog</itunes:author>
	<itunes:explicit>false</itunes:explicit>
	<itunes:image href="https://developer.salesforce.com/blogs/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:owner>
		<itunes:name>Salesforce Developers Blog</itunes:name>
	</itunes:owner>
	<podcast:medium>podcast</podcast:medium>
	<image>
		<title>Salesforce Developers Blog</title>
		<url>https://developer.salesforce.com/blogs/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>https://developer.salesforce.com/blogs</link>
	</image>
	<podcast:podping usesPodping="true" />
<site xmlns="com-wordpress:feed-additions:1">244780846</site>	<item>
		<title>Code Extensions: Call Generative Models from Scripts and Functions</title>
		<link>https://developer.salesforce.com/blogs/2026/12/code-extensions-call-generative-models-from-scripts-and-functions</link>
		<comments>https://developer.salesforce.com/blogs/2026/12/code-extensions-call-generative-models-from-scripts-and-functions#respond</comments>
		<pubDate>Thu, 03 Dec 2026 16:00:41 +0000</pubDate>
		<dc:creator><![CDATA[Deepti Rajagopal]]></dc:creator>
				<category><![CDATA[APIs and Integrations]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Data 360]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Code Extension]]></category>
		<category><![CDATA[Data Cloud]]></category>
		<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[LLM gateway]]></category>
		<category><![CDATA[PySpark]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Search Index]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207432</guid>
		<description><![CDATA[<p>Learn how to use generative model callouts in Data 360 code extension scripts and functions to enrich data, summarize support cases, and customize search index chunking.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/12/code-extensions-call-generative-models-from-scripts-and-functions">Code Extensions: Call Generative Models from Scripts and Functions</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><a href="https://help.salesforce.com/s/articleView?id=data.c360_a_code_extension.htm&amp;type=5"><span style="font-weight: 400">Code extension</span></a><span style="font-weight: 400"> lets you run your own Python inside Data 360. Python is great at rules, such as cleaning, parsing, and filtering. A generative model is great at judgment, such as summarizing a complaint or deciding where one idea ends and the next begins. Real data problems need both. Now your code extension scripts and functions can call the generative models </span><a href="https://developer.salesforce.com/docs/ai/agentforce/guide/models-api-names.html"><span style="font-weight: 400">configured in your Salesforce org</span></a><span style="font-weight: 400">, using generative model callouts.</span></p>
<p><span style="font-weight: 400">This post covers why we paired code extension with generative model callouts, then walks through one business scenario for a code extension script and one for a code extension function. For setup steps and the full API, see the developer docs for </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-script.html"><span style="font-weight: 400">generative model callouts in scripts</span></a><span style="font-weight: 400"> and in </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-function.html"><span style="font-weight: 400">functions</span></a><span style="font-weight: 400">.</span></p>
<h2><b>Why pair code extension with generative models?</b></h2>
<p><span style="font-weight: 400">You can call a model on a single field in many ways. That alone is not why you would reach for code extension. The real value is what happens around the model call.</span></p>
<p><span style="font-weight: 400">Think about what a model needs to do its best work. It needs clean input. It should not see HTML tags, stray phone numbers, or the same text a thousand times. It also needs a predictable amount of text, because every call has a cost. Writing that preparation logic takes custom code. Rules like &#8220;strip the markup, mask the contact details, skip near-empty rows, and call the model once per unique text&#8221; are specific to your data.</span></p>
<p><span style="font-weight: 400">Code extension is where that logic lives. You write the logic in Python, and it runs next to your data in Data 360, so you do not export anything to another system. Then the same code hands the cleaned data to a model for the part rules cannot do. You get both halves in one job: precise code for what is predictable, and a model for what is not.</span></p>
<p><span style="font-weight: 400">Generative model callouts from code extension go through the Salesforce LLM gateway, the same managed gateway behind Salesforce generative AI features.</span></p>
<p><span style="font-weight: 400">Code extension has two forms, and the generative model callouts work in both:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">A</span><b> code extension script</b><span style="font-weight: 400"> runs batch data transformations today. You read data lake objects (DLOs) or data model objects (DMOs), transform them with Spark, and write the results to another DLO or DMO.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">A </span><b>code extension function</b><span style="font-weight: 400"> plugs custom logic into a platform feature. Today, it’s available for search index chunking.</span></li>
</ul>
<p><span style="font-weight: 400">The examples below show one of each. Both use a model ID such as </span><code><span style="font-weight: 400">sfdc_ai__DefaultGPT4Omni</span></code><span style="font-weight: 400">. See the developer docs </span><a href="https://developer.salesforce.com/docs/ai/agentforce/guide/supported-models.html"><span style="font-weight: 400">for the models you can use</span></a><span style="font-weight: 400">.</span></p>
<h2><b>Script example: Turn raw support cases into clean, analysis-ready fields</b></h2>
<p><b>The scenario:</b><span style="font-weight: 400"> A support team stores thousands of cases in Data 360. The </span><code><span style="font-weight: 400">description__c</span></code><span style="font-weight: 400"> field holds long, messy text typed by customers and agents. Some of it has HTML from copy-paste. Some has email addresses and phone numbers. Some cases are one word, and some are exact copies of each other. The team wants a one-sentence summary and a sentiment label for each unique case description, so they can build segments and dashboards without reading every note.</span></p>
<p><span style="font-weight: 400">A script is a good fit. It runs in a batch over a whole DLO. In this script, plain Python and Spark come first. They strip HTML, mask emails and phone numbers, cap the length, drop near-empty cases, and remove duplicates. Only then does the model read each case. That keeps private details out of the prompt, avoids paying for model calls on text that adds nothing, and gives the model clean input.</span></p>
<p><span style="font-weight: 400">The </span><code><span style="font-weight: 400">llm_gateway_generate_text_col</span></code><span style="font-weight: 400"> helper turns a prompt into a new column. You fill the </span><span style="font-weight: 400">{<code>placeholders</code>}</span><span style="font-weight: 400"> from your columns, and the helper returns a result for each row.</span></p>
<p><span style="font-weight: 400">Each result is a struct with four fields: </span><code><span style="font-weight: 400">status</span></code><span style="font-weight: 400">, </span><code><span style="font-weight: 400">response</span></code><span style="font-weight: 400">, </span><code><span style="font-weight: 400">error_code</span></code><span style="font-weight: 400">, and </span><code><span style="font-weight: 400">error_message</span></code><span style="font-weight: 400">. If the model returns an error for a row, that row gets an error status and the job keeps going. The example keeps the summary call&#8217;s </span><span style="font-weight: 400">status</span><span style="font-weight: 400"> and </span><code><span style="font-weight: 400">error_message</span></code><span style="font-weight: 400"> in two extra columns, </span><code><span style="font-weight: 400">llm_status__c</span></code><span style="font-weight: 400"> and </span><code><span style="font-weight: 400">llm_error__c</span></code><span style="font-weight: 400">, so you can find rows that need a retry.</span></p>
<pre language="python">from pyspark.sql.functions import col, length, regexp_replace, substring, trim

from datacustomcode.client import Client, llm_gateway_generate_text_col
from datacustomcode.io.writer.base import WriteMode

MODEL_ID = "sfdc_ai__DefaultGPT4Omni"  # An AI model configured in your org
MIN_CHARS = 30  # Skip cases with too little text to be worth a model call
MAX_CHARS = 2000  # Keep prompts a predictable size


def clean_text(df):
    """Turn raw case text into a clean, safe-to-prompt string."""
    text = col("description__c")
    text = regexp_replace(text, r"&lt;[^&gt;]+&gt;", " ")  # strip HTML tags
    text = regexp_replace(text, r"[\w.+-]+@[\w-]+\.[\w.]+", "[EMAIL]")
    text = regexp_replace(text, r"\+?\d[\d\s().-]{8,}\d", "[PHONE]")
    text = trim(regexp_replace(text, r"\s+", " "))  # collapse whitespace
    return df.withColumn("clean_description__c", substring(text, 1, MAX_CHARS))


def main():
    client = Client()

    cases = client.read_dlo("Support_Case__dll").select(
        "case_id__c", "description__c"
    )

    # Step 1: plain Python/Spark does the work that rules do best.
    prepared = (
        clean_text(cases)
        .filter(length("clean_description__c") &gt;= MIN_CHARS)
        .dropDuplicates(["clean_description__c"])  # one model call per unique text
        .drop("description__c")
    )

    # Step 2: the model does the part rules can't: read and judge the text.
    # Each helper returns a struct per row:
    # {status, response, error_code, error_message}
    summary = llm_gateway_generate_text_col(
        "Summarize this support case in one short sentence: {text}",
        {"text": col("clean_description__c")},
        model_id=MODEL_ID,
    )
    sentiment = llm_gateway_generate_text_col(
        "Reply with one word, Positive, Neutral, or Negative, "
        "for the customer's tone in this case: {text}",
        {"text": col("clean_description__c")},
        model_id=MODEL_ID,
    )

    enriched = (
        prepared.withColumn("summary_result", summary)
        .withColumn("sentiment_result", sentiment)
        .withColumn("case_summary__c", col("summary_result")["response"])
        .withColumn("case_sentiment__c", col("sentiment_result")["response"])
        .withColumn("llm_status__c", col("summary_result")["status"])
        .withColumn("llm_error__c", col("summary_result")["error_message"])
        .drop("summary_result", "sentiment_result")
    )

    client.write_to_dlo("Support_Case_Insights__dll", enriched, WriteMode.APPEND)


if __name__ == "__main__":
    main()
</pre>
<p><span style="font-weight: 400">Want just one answer instead of a column? </span><code><span style="font-weight: 400">client.llm_gateway_generate_text(prompt, model_id)</span></code><span style="font-weight: 400"> makes a single call as shown in the </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-script.html"><span style="font-weight: 400">developer docs</span></a><span style="font-weight: 400">. It works well for things like building a prompt from a lookup table.</span></p>
<h2><span style="font-weight: 400">Function example: Clause-aware document chunking for search</span></h2>
<p><span style="font-weight: 400">The scenario: A legal team wants to search thousands of contracts in Data 360. The default chunking splits text by size, so it often cuts a clause in half. A question like &#8220;What is the termination notice period?&#8221; then pulls back half an answer.</span></p>
<p><span style="font-weight: 400">A function is the right tool to fix this issue. A code extension function lets you replace the splitting logic with your own code, so you can pair a model&#8217;s judgment about where clauses break with code to control the final chunk boundaries. Data 360 hands your function the documents. Your function returns the chunks. The search index does the rest.</span></p>
<p><span style="font-weight: 400">Here, the function calls a model configured in your org to split each contract at clause boundaries. It marks the breaks with </span><code><span style="font-weight: 400">---CHUNK---</span></code><span style="font-weight: 400"><code>,</code> then the code turns each piece into a chunk.</span></p>
<pre language="python">import logging

from datacustomcode.function.feature_types.chunking import (
    ChunkType,
    SearchIndexChunkingV1Output,
    SearchIndexChunkingV1Request,
    SearchIndexChunkingV1Response,
)
from datacustomcode.function.runtime import Runtime
from datacustomcode.llm_gateway.types.generate_text_request_builder import (
    GenerateTextRequestBuilder,
)

logger = logging.getLogger(__name__)

PROMPT = (
    "Split the contract below into sections, one per clause "
    "(for example: Term, Termination, Payment, Liability). "
    "Keep the original wording. Put the line ---CHUNK--- between sections.\n\n"
    "{text}"
)


def function(
    request: SearchIndexChunkingV1Request, runtime: Runtime
) -&gt; SearchIndexChunkingV1Response:
    chunks = []

    for doc in request.input:
        llm_request = (
            GenerateTextRequestBuilder()
            .set_model("sfdc_ai__DefaultGPT4Omni")
            .set_prompt(PROMPT.format(text=doc.text))
            .build()
        )
        response = runtime.llm_gateway.generate_text(llm_request)

        if not response.is_success:
            logger.error("Clause chunking failed: %s", response.error_code)    	
            raise RuntimeError(f"Clause chunking failed: {response.error_code}")

        sections = [s.strip() for s in response.text.split("---CHUNK---")]
        for section in filter(None, sections):
            chunks.append(
                SearchIndexChunkingV1Output(
                    text=section,
                    seq_no=len(chunks) + 1,
                    chunk_type=ChunkType.TEXT,
                    citations={},
                )
            )

    return SearchIndexChunkingV1Response(output=chunks)
</pre>
<p><span style="font-weight: 400">Notice that with a function, in contrast to scripts, you </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-function.html"><span style="font-weight: 400">access the generative model callouts</span></a><span style="font-weight: 400"> through the </span><code><span style="font-weight: 400">runtime</span></code><span style="font-weight: 400"> object that the platform passes in.</span></p>
<p><span style="font-weight: 400">Because each chunk is intended to hold a complete clause, retrieval is less likely to return fragments of an answer. The same idea works for other documents. You could split call transcripts by speaker turn or manuals by procedure.</span></p>
<h2><span style="font-weight: 400">Limits, cost, and scaling considerations</span></h2>
<p><span style="font-weight: 400">Every row or document you send is a model call, so think about volume before you scale up. Start with a small sample. Right now, take into account the limits described in the developer docs for </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-script.html"><span style="font-weight: 400">scripts</span></a><span style="font-weight: 400"> and </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-function.html"><span style="font-weight: 400">functions</span></a><span style="font-weight: 400">. You will also find tips in the scripts doc to increase throughput, like using the </span><code><span style="font-weight: 400">repartition()</span></code><span style="font-weight: 400"> method or a different compute type appropriate for your workload. Better scaling and batched calls are on the roadmap.</span></p>
<h2><span style="font-weight: 400">When to reach for code extension plus generative models</span></h2>
<p><span style="font-weight: 400">Code extension gives you full control over your data logic. The generative model callouts add a way to handle the messy, human parts of that data. Together, they let you enrich data in a script, or shape how search understands your documents in a function. </span></p>
<p><span style="font-weight: 400">You can adapt both examples: swap the prompt, the model, and the DLO names for your own.</span></p>
<h2><b>Resources</b></h2>
<ul>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-script.html"><span style="font-weight: 400">Use Generative Model Callouts in Custom Script</span></a><span style="font-weight: 400"> </span></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-llm-gateway-in-custom-function.html"><span style="font-weight: 400">Use Generative Model Callouts in Custom Function</span></a><span style="font-weight: 400"> </span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Python SDK: </span><a href="https://github.com/forcedotcom/datacloud-customcode-python-sdk"><span style="font-weight: 400">forcedotcom/datacloud-customcode-python-sdk</span></a><span style="font-weight: 400">  </span><a href="https://pypi.org/project/salesforce-data-customcode/"><span style="font-weight: 400">PyPI</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Salesforce CLI plugin: </span><a href="https://github.com/salesforcecli/plugin-data-code-extension"><span style="font-weight: 400">salesforcecli/plugin-data-code-extension</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Developer guide: </span><a href="https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-custom-code.html"><span style="font-weight: 400">Data 360 Code Extension</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">YouTube: </span><a href="https://www.youtube.com/playlist?list=PLACV3VmGs318"><span style="font-weight: 400">Extend Data 360 with Code Extension</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Blog: </span><a href="https://developer.salesforce.com/blogs/2026/09/build-deploy-run-and-troubleshoot-complex-transformations-with-python-and-pyspark-while-keeping-execution-governed-by-data-360"><span style="font-weight: 400">Run Complex Data Transformations in Data 360 with Code Extension</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Blog: </span><a href="https://developer.salesforce.com/blogs/2026/09/pro-code-chunking-of-data-360-search-indexes-for-agentforce"><span style="font-weight: 400">Pro-Code Chunking of Data 360 Search Indexes for Agentforce</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Blog: </span><a href="https://developer.salesforce.com/blogs/2026/09/build-deploy-run-and-troubleshoot-complex-transformations-with-python-and-pyspark-while-keeping-execution-governed-by-data-360"><span style="font-weight: 400">Advanced Code Extension PySpark Examples for Batch Data Transforms</span></a></li>
</ul>
<h2><b>About the author</b></h2>
<p><span style="font-weight: 400"><strong>Deepti Rajagopal</strong> is a Senior Software Engineer at Salesforce working on Code Extension in Data 360. You can find her on </span><a href="https://www.linkedin.com/in/deepti-rajagopal-39240a144/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/12/code-extensions-call-generative-models-from-scripts-and-functions">Code Extensions: Call Generative Models from Scripts and Functions</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/12/code-extensions-call-generative-models-from-scripts-and-functions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207432</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261203070559/Generic-C-10-e1796310371501.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261203070559/Generic-C-10-e1796310371501.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Bring Salesforce Developer Docs into Your AI Tools</title>
		<link>https://developer.salesforce.com/blogs/2026/11/bring-salesforce-developer-docs-into-your-ai-tools</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/bring-salesforce-developer-docs-into-your-ai-tools#respond</comments>
		<pubDate>Tue, 24 Nov 2026 16:00:44 +0000</pubDate>
		<dc:creator><![CDATA[Kyle Jackson]]></dc:creator>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[Developer Tooling]]></category>
		<category><![CDATA[New Developments]]></category>
		<category><![CDATA[AI Agents]]></category>
		<category><![CDATA[ChatGPT]]></category>
		<category><![CDATA[Claude]]></category>
		<category><![CDATA[Developer Documentation]]></category>
		<category><![CDATA[developer tooling]]></category>
		<category><![CDATA[llms.txt]]></category>
		<category><![CDATA[Markdown]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207412</guid>
		<description><![CDATA[<p>Bring Salesforce Developer docs into your AI workflow with new page actions. Copy documentation as Markdown, open pages in ChatGPT or Claude, and use llms.txt to help AI agents find the right information.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/bring-salesforce-developer-docs-into-your-ai-tools">Bring Salesforce Developer Docs into Your AI Tools</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="font-weight: 400">If you use AI tools to write code, you probably rely on documentation to give them the context they need. But documentation on the web isn&#8217;t always AI-friendly. HTML pages are often bloated with navigation, styling, and other markup that wastes tokens, while client-rendered docs can return little more than an empty shell, leaving AI tools with nothing useful to read. The result? Documentation that&#8217;s easy for humans to browse isn&#8217;t necessarily easy for AI tools to consume.</span></p>
<p>Now every page in the newer docs on the Salesforce Developers website has a row of actions right below its title. With one click, you can copy a page as clean Markdown, open it in an AI assistant, or get a map of all our docs that AI tools can read. The first actions arrived in June 2026, with options to copy a page as Markdown, view its Markdown version, or copy a Markdown link to it. In October 2026, we expanded the toolbar with AI-focused options, including viewing the site&#8217;s <b><code>llms.txt</code></b> file and opening documentation directly in tools like ChatGPT, Perplexity, and Claude.</p>
<p>This post reviews how docs worked before, explains what each new action does, and shows how you can use the actions in your daily work.</p>
<h2><span style="font-weight: 400">The old way: Docs built only for browsers</span></h2>
<p><span style="font-weight: 400">For human readers, it doesn&#8217;t matter how the page is generated, how the underlying markup looks, or how much text it contains. They see and read the final rendered result.</span> <span style="font-weight: 400">AI tools need something different, because many receive only the underlying HTML, which may be little more than a shell if the page is client-rendered.</span></p>
<p><span style="font-weight: 400">To give a page to an AI assistant, you had two options. You could copy the text from the page. That often dropped the headings, mixed up lists, and pulled code samples out of their code blocks. Alternatively, you could share the page URL and hope the tool could read it. Depending on the tool, page layouts, navigation elements, and scripts could get in the way, leaving the AI with only part of the content.</span></p>
<p><span style="font-weight: 400">AI tools also had no simple way to find the right page. Our docs cover dozens of products and tens of thousands of pages. Without a map, a tool had to search the web and guess.</span></p>
<h2><span style="font-weight: 400">The new way: Actions at the top of the page</span></h2>
<p><span style="font-weight: 400">The actions sit in one row, right below the page title, so they are there as soon as you open a page.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207419" >
			    <img fetchpriority="high" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119105858/image2_21b71b-e1795114750819.png" class="postimages" width="1000" height="526" alt="A row of buttons below a doc page title: Copy as Markdown, View as Markdown, View llms.txt, and a More actions menu.]" />
			  </span>
			</p>
<p><span style="font-weight: 400">Three buttons are always in view: </span><b>Copy as Markdown</b><span style="font-weight: 400">, </span><b>View as Markdown</b><span style="font-weight: 400">, and </span><b>View </b><b>llms.txt</b><span style="font-weight: 400">. The More actions menu (⋯) provides access to the full set of actions, organized into two groups: This Page and All Documentation.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207423" >
			    <img decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119120435/image1_5aaf2b-e1795118695920.png" class="postimages" width="1000" height="591" alt="The More actions menu open, with a This Page group of Markdown and AI assistant actions and an All Documentation group of llms.txt actions." />
			  </span>
			</p>
<h3><span style="font-weight: 400">Get this page in Markdown </span></h3>
<p><span style="font-weight: 400">Every page in the newer docs now has a Markdown version. Markdown is a plain-text format that keeps headings, lists, links, and code blocks. It&#8217;s well suited to LLMs and often uses fewer tokens than the equivalent full web page.</span></p>
<p><span style="font-weight: 400">You can work with a page in three ways:</span></p>
<ul>
<li style="font-weight: 400"><b>Copy as Markdown</b><span style="font-weight: 400"> copies the whole page to your clipboard as Markdown. Paste it into a chat, a prompt, or your IDE&#8217;s AI agent, such as Agentforce Vibes. Code samples stay in code blocks, so the agent can tell code from prose.</span></li>
<li style="font-weight: 400"><b>View as Markdown</b><span style="font-weight: 400"> opens the Markdown in a new tab. Use it to scan the source text, save a copy, or check what your AI tool will see.</span></li>
<li style="font-weight: 400"><b>Copy URL to Markdown</b><span style="font-weight: 400"> copies a direct link to the Markdown version. Put it in a prompt, the command line, a project rules file, or a script, so your tools always get the current page.</span></li>
</ul>
<h3><span style="font-weight: 400">Give your tools a map of all our docs</span></h3>
<p>Finding the right page can be challenging when documentation spans dozens of products and tens of thousands of pages. That&#8217;s where <code>llms.txt</code> comes in. The <code>llms.txt</code> format is an <a href="https://llmstxt.org/"><u>open standard</u></a> that gives AI tools a short, readable index of a website. Our <a href="https://developer.salesforce.com/docs/llms.txt"><u>main <code>llms.txt</code><span> file</span></u></a><span> lists more than 40 products, from Lightning Web Components to Agentforce. Each product has its own </span><code>llms.txt</code> file that links to the Markdown version of each doc page. You can access these product llms.txt files from the page actions:</p>
<ul>
<li><b>View <span>llms.txt</span></b><span> opens the main index in a new tab.</span></li>
<li><b>Copy URL to <span>llms.txt</span></b><span> copies the link, so you can add it to your AI tool&#8217;s sources or your agent&#8217;s instructions.</span></li>
</ul>
<p>With the index, an agent can find the right page for your question on its own. It doesn&#8217;t need to search the web.</p>
<h3><span style="font-weight: 400">Ask an AI assistant about this page</span></h3>
<p><span style="font-weight: 400">Sometimes you want to ask questions about a page right away. Select </span><b>Open in ChatGPT</b><span style="font-weight: 400">, </span><b>Open in Claude</b><span style="font-weight: 400">, or </span><b>Open in Perplexity</b><span style="font-weight: 400"> from the </span><b>More actions</b><span style="font-weight: 400"> menu. The assistant opens in a new tab with a prompt already written for you:</span></p>
<pre language="text">I'm reading "Make a Component Aware of Its Context" at
https://developer.salesforce.com/docs/platform/lwc/guide/use-context.html.
Read this page so I can ask questions about it. For broader context,
see https://developer.salesforce.com/docs/llms.txt
</pre>
<p><span style="font-weight: 400">The prompt names the page and links to our docs map, so the assistant starts with the right source. You skip the copy-and-paste steps and go straight to your question.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207422" >
			    <img decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119120400/image3_75e796-e1795118653338.png" class="postimages" width="1000" height="632" alt="he More actions menu with the Open in ChatGPT, Open in Claude, and Open in Perplexity options." />
			  </span>
			</p>
<h2><span style="font-weight: 400">What to know before you start</span></h2>
<p><span style="font-weight: 400">A few things to know as you use the new actions:</span></p>
<ul>
<li style="font-weight: 400"><b>Where they appear:</b><span style="font-weight: 400"> The actions are on English pages in the newer Salesforce Developers docs. They aren&#8217;t on translated pages.</span></li>
<li style="font-weight: 400"><b>API reference pages:</b><span style="font-weight: 400"> Some API reference pages are built from a spec, not from Markdown. On those pages, the actions are not available. </span></li>
<li style="font-weight: 400"><b>AI assistants:</b><span style="font-weight: 400"> The </span><b>Open in</b><span style="font-weight: 400"> options pass links, not the page text. The assistant reads the links itself, so it needs web access turned on. Your own account and settings in that tool apply.</span></li>
</ul>
<h2><span style="font-weight: 400">Under the hood: How we built it</span></h2>
<p><span style="font-weight: 400">We wanted a way for AI tools to access our documentation without creating a separate version of the content. Instead of scraping published pages or converting HTML into Markdown, we built the capability directly into SFDocs, the framework behind our developer documentation.</span></p>
<p><span style="font-weight: 400">Here&#8217;s a quick look at how it works.</span></p>
<h3><span style="font-weight: 400">1. Generating Markdown from the original content</span></h3>
<p><span>Our docs are authored in Markdown. We extended the build process to publish a clean </span><code>.md</code><span> file alongside every </span><code>.html</code><span> page. Both versions are generated from the same source and share the same URL path, with different file extensions.</span></p>
<h3><span style="font-weight: 400">2. Generating <a href="https://developer.salesforce.com/docs/llms.txt"><u><code>llms.txt</code></u></a></span><span style="font-weight: 400"> files</span></h3>
<p><span>Every product build generates its own </span><a href="https://developer.salesforce.com/docs/llms-commerce-cloud.txt"><u><code>llms.txt</code></u></a><span> file, structured around the product&#8217;s table of contents. The file gives AI tools an overview of the product, along with links to the Markdown version of each page.</span></p>
<p><span>We also build the main </span><a href="https://developer.salesforce.com/docs/llms.txt"><u><code><span>llms.txt</span></code></u></a><span> file that brings together the individual product indexes. Because our documentation builds are incremental, each build contributes its updates without replacing entries from other products.</span></p>
<h3><span style="font-weight: 400">3. Connecting everything through the toolbar</span></h3>
<p><span style="font-weight: 400">The toolbar below the page title makes these capabilities accessible to readers. It locates the corresponding Markdown file and provides options to copy the content, view the file, or open it in an AI assistant.</span></p>
<p><span style="font-weight: 400">All of this is handled during the documentation build, so the Markdown files and llms.txt files are updated alongside the documentation itself.</span></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p>The new actions on every doc page help you bring trusted Salesforce docs into the AI tools you already use. Copy a page as clean Markdown, open it in an AI assistant in one click, or point your agent to our <code>llms.txt</code> map. Try the actions on a supported documentation page and see how they fit into your workflow. Have an idea for making them more useful? Use the <b>Share your feedback</b> button at the bottom of the page to let us know.</p>
<h2><span style="font-weight: 400">Resources</span></h2>
<ul>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/llms.txt"><span style="font-weight: 400">Salesforce Developers </span><span style="font-weight: 400">llms.txt</span></a></li>
<li style="font-weight: 400"><a href="https://llmstxt.org/"><span style="font-weight: 400">The </span><span style="font-weight: 400">llms.txt</span><span style="font-weight: 400"> standard</span></a></li>
</ul>
<h2><span style="font-weight: 400">About the authors</span></h2>
<p><b>Kyle Jackson</b><span style="font-weight: 400"> is a Lead UX Designer; Content Experience Technologies at Salesforce. With Salesforce for over a decade, Kyle is focused on delivering best-in-class content experiences to our customers through user centered design and modern agentic design-to-development systems and workflows. He is a deeply curious problem solver and loves to learn, explore and discuss new things. Connect with him on </span><a href="https://www.linkedin.com/in/kylejackson77/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">.</span></p>
<p><b>Madhura Hegde</b><span style="font-weight: 400"> is a Senior Software Engineer; Content Experience Technologies at Salesforce. She’s a full-stack engineer who enjoys building scalable systems, solving problems nobody asked for, and occasionally questioning architectural decisions made by my past self. Connect with her on </span><a href="https://www.linkedin.com/in/madhura-h-3345a0242/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/bring-salesforce-developer-docs-into-your-ai-tools">Bring Salesforce Developer Docs into Your AI Tools</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/bring-salesforce-developer-docs-into-your-ai-tools/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207412</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261119121043/Generic-B-9-e1795119054922.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261119121043/Generic-B-9-e1795119054922.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Headless Development with Metadata Visualizer and Live Preview</title>
		<link>https://developer.salesforce.com/blogs/2026/11/headless-development-with-metadata-visualizer-and-live-preview</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/headless-development-with-metadata-visualizer-and-live-preview#respond</comments>
		<pubDate>Thu, 19 Nov 2026 16:30:22 +0000</pubDate>
		<dc:creator><![CDATA[Philippe Ozil]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Developer Tooling]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Agent-Driven Development]]></category>
		<category><![CDATA[developer tooling]]></category>
		<category><![CDATA[Headless Development]]></category>
		<category><![CDATA[Headless Toolkit]]></category>
		<category><![CDATA[Live Preview]]></category>
		<category><![CDATA[Metadata Visualizer]]></category>
		<category><![CDATA[Salesforce Metadata]]></category>
		<category><![CDATA[VS Code]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207403</guid>
		<description><![CDATA[<p>Learn how to combine the Headless Toolkit with Metadata Visualizer and Live Preview in VS Code. Explore how to visualize Salesforce metadata, preview UI changes, and streamline agent-driven development.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/headless-development-with-metadata-visualizer-and-live-preview">Headless Development with Metadata Visualizer and Live Preview</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="font-weight: 400">Building with agents lets you skip most Setup clicks, but it also costs you the visual context that makes a flow or permission set easy to understand. Two VS Code extensions, </span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-metadata-visualizer-vscode"><span style="font-weight: 400">Metadata Visualizer</span></a><span style="font-weight: 400"> and </span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-ui-preview"><span style="font-weight: 400">Live Preview</span></a><span style="font-weight: 400">, bring that context back. This post covers how the </span><a href="https://developer.salesforce.com/docs/platform/headless-get-started/guide/headless-get-started.html"><span style="font-weight: 400">Headless Toolkit</span></a><span style="font-weight: 400"> speeds up your work, then how visualizers and live preview add the visuals back.</span></p>
<h2><span style="font-weight: 400">Increase your productivity with the Headless Toolkit</span></h2>
<p><span style="font-weight: 400">The Headless Toolkit combines three elements that help you work with Salesforce from any agentic surface: </span><a href="https://github.com/forcedotcom/sf-skills"><span style="font-weight: 400">agent skills</span></a><span style="font-weight: 400">, </span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/references/reference/servers-reference.html"><span style="font-weight: 400">hosted Model Context Protocol (MCP) servers</span></a><span style="font-weight: 400">, and the </span><a href="https://developer.salesforce.com/docs/platform/hxl/guide"><span style="font-weight: 400">Headless Experience Layer</span></a><span style="font-weight: 400"> (HXL). Among those, skills and MCP servers play a central role in modern development workflows. They allow developers to save time by automating code generation and skipping manual interactions in Salesforce Setup menus for most tasks.</span></p>
<p><span style="font-weight: 400">Salesforce skills teach agents how to perform development tasks. These include CRUD operations on metadata (Apex classes, Lightning web components, flows, permission sets), running tests, packaging, deployments, and more. Skills combined with Salesforce-hosted MCP servers, the </span><a href="https://developer.salesforce.com/tools/salesforcecli"><span style="font-weight: 400">Salesforce CLI</span></a><span style="font-weight: 400"> and APIs provide the ability to explore and act on both metadata and data.</span></p>
<p><span style="font-weight: 400">Let’s look at a practical example of the benefits of the Headless Toolkit with a common task: modifying a permission set.</span></p>
<p><span style="font-weight: 400">Before the toolkit, you retrieved the permission set from your org or your project repository. The result was a long XML file. You could run a text search in the file, but most of the time you had to navigate through Setup and complete the following steps:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Understand which permissions are granted</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Modify the permissions</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Retrieve the updated permission set metadata locally</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Add your changes to version control</span></li>
</ol>
<p><span style="font-weight: 400">The slightest change took minutes and tens of clicks.</span></p>
<p><span style="font-weight: 400">Nowadays, thanks to agents and the toolkit, you can query and modify permissions directly from the terminal and get results in seconds.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207406" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261118083540/image1_c6733a.png" class="postimages" width="932" height="648" alt="Screenshot of a Claude prompt and response that describes the content of a permission set." />
			  </span>
			</p>
<p><span style="font-weight: 400">You bypass the Salesforce Setup menus, so you save on clicks. You also modify the metadata locally, so you limit round trips because you no longer need to retrieve the metadata after making changes. Even better, you can do this at scale and run operations in parallel.</span></p>
<p><span style="font-weight: 400">Headless tools help you build and deliver value faster when working on the platform. The trend of bypassing the graphical user interface was initiated with the Salesforce CLI, and agents took it to the next level. However, agent interactions are text-driven and structured data can be hard to read due to the lack of depth and formatting. Working with metadata visualizers and live preview tools addresses this limitation.</span></p>
<h2><span style="font-weight: 400">Add visual context with the Metadata Visualizer and Live Preview extensions</span></h2>
<h3><span style="font-weight: 400">Explore metadata with Metadata Visualizer</span></h3>
<p><span style="font-weight: 400">The </span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-metadata-visualizer-vscode"><span style="font-weight: 400">Metadata Visualizer</span></a><span style="font-weight: 400"> extension for VS Code renders read-only visual representations of Salesforce metadata. This extension is part of the </span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode"><span style="font-weight: 400">Salesforce Extension Pack</span></a><span style="font-weight: 400"> for VS Code, so there’s a good chance that you already have it installed.</span></p>
<p><span style="font-weight: 400">Returning to the permission-set example, you can jump from an agent&#8217;s text answer to a visual view like the one below with a single click.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207414" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119081338/image5_8718bf-e1795104847409.png" class="postimages" width="1000" height="547" alt="Screenshot of the visualization for a permission set in VS Code." />
			  </span>
			</p>
<p><span style="font-weight: 400">Visualizations are read-only representations of the metadata. You can use them to analyze metadata in VS Code and call an agent (also in VS Code) to apply changes.</span></p>
<p><span style="font-weight: 400">And, if you use </span><a href="https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-overview.html"><span style="font-weight: 400">Agentforce Vibes</span></a><span style="font-weight: 400">, you can </span><a href="https://developer.salesforce.com/docs/platform/md-visualizer/guide/mdv-vibes-editing.html"><span style="font-weight: 400">have the agent edit the metadata</span></a><span style="font-weight: 400"> by selecting elements in the visualizer.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207409" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261118084522/image4_819348.png" class="postimages" width="926" height="726" alt="Screenshot showing how you can edit a field with an agent from a selection in the Metadata Visualizer." />
			  </span>
			</p>
<p><span style="font-weight: 400">With some exceptions, as a developer, you no longer need to open builders to work with metadata. Flows are a good example. Their metadata XML files are hard to read, and text descriptions from agent responses are a poor way to represent multiple branches. Instead of using Flow Builder or reading text descriptions, you can open the flow in a visualizer and use prompts to modify it.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207410" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261118084559/image2_5e0598-e1795020374249.png" class="postimages" width="1000" height="598" alt="Screenshot of the visualization for a flow in VS Code.]" />
			  </span>
			</p>
<p><span style="font-weight: 400">At the time of writing (November 2026), visualizers are available for the following metadata types and more are on the way:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Agents</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Flows</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Lightning pages (FlexiPage)</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Objects</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Permission sets</span></li>
</ul>
<p><span style="font-weight: 400">To access them, open a supported metadata file and click </span><b>Visualize</b><span style="font-weight: 400"> at the top right of the editor.</span></p>
<h3><span style="font-weight: 400">Preview UI changes with Live Preview</span></h3>
<p><span style="font-weight: 400">Visualizers cover some metadata, and you can use the </span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-ui-preview"><span style="font-weight: 400">Live Preview</span></a><span style="font-weight: 400"> extension for VS Code for UI-related metadata. This extension works with Lightning web components (LWC), Multi-Framework UI bundles, and HXL widgets. When previewed, LWC and Multi-Framework UI bundles use live data from your org and HXL widgets relies on sample data.</span></p>
<p><span style="font-weight: 400"></span><span style="font-weight: 400">Step-by-step instructions are available in the Live Preview guides for </span><a href="https://developer.salesforce.com/docs/platform/lwc/guide/get-started-test-components.html#live-preview-vs-code-extension"><span style="font-weight: 400">Lightning web components</span></a><span style="font-weight: 400"> and </span><a href="https://developer.salesforce.com/docs/platform/multiframework/guide/mfw-preview.html#preview-your-app-in-vs-code-with-live-preview"><span style="font-weight: 400">Multi-Framework UI bundles</span></a><span style="font-weight: 400">. To open a live preview for an HXL widget, select a widget metadata file, open the command palette (</span><b>Cmd+Shift+P</b><span style="font-weight: 400"> on Mac, </span><b>Ctrl+Shift+P</b><span style="font-weight: 400"> on Windows), and run </span><b>SFDX: Open in Widget Preview</b><span style="font-weight: 400">. When the view opens, you’re on the Preview tab by default and you can switch to the Data tab to customize the sample data as JSON.</span></p>
<p><span style="font-weight: 400">You can open an HXL widget defined as JSON and simulate how it renders in Agentforce, Slackbot, ChatGPT, or Claude.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207415" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119081617/image6-e1795105021426.png" class="postimages" width="1000" height="390" alt="Screenshot of the live preview of an HXL widget in VS Code." />
			  </span>
			</p>
<p><span style="font-weight: 400">The preview comes with automatically generated sample data. This default data is generic, but you can improve the experience and make it more realistic by using a prompt to generate data based on a real org record.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207416" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261119081727/image3_4d79a9.png" class="postimages" width="841" height="726" alt="Screenshot of how you can generate sample data based on a live record for an HXL widget." />
			  </span>
			</p>
<p><span style="font-weight: 400">As you modify the widget definition or the sample data, the preview automatically refreshes.</span></p>
<h2><b>Conclusion</b></h2>
<p><span style="font-weight: 400">Combining the Headless Toolkit with visualizers and live preview tools provides an effective way to build fast with agents while retaining some visual context.</span></p>
<p><span style="font-weight: 400">We’ve come a long way from working with Setup menus, builders, and XML files to automating tasks with agents, and we’ve reduced the need for context-switching. Install the VS Code extensions and give metadata visualizers and live preview a try as you build with agents.</span></p>
<p><span style="font-weight: 400">In my view (forward-looking statement), as the Salesforce tools and the </span><a href="https://modelcontextprotocol.io/extensions/apps/overview"><span style="font-weight: 400">MCP Apps</span></a><span style="font-weight: 400"> standard that supports HXL evolve, the VS Code extensions and builders could be replaced by interactive widgets representing metadata directly in agent responses.</span></p>
<h2><b>Resources</b></h2>
<ul>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/md-visualizer/overview"><span style="font-weight: 400">Metadata Visualizer extension docs</span></a></li>
<li style="font-weight: 400"><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-metadata-visualizer-vscode"><span style="font-weight: 400">Metadata Visualizer extension for VS Code</span></a></li>
<li style="font-weight: 400"><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-ui-preview"><span style="font-weight: 400">Live Preview extension for VS Code</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills"><span style="font-weight: 400">Salesforce skills repository</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide"><span style="font-weight: 400">Headless Experience Layer docs</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/references/reference/servers-reference.html"><span style="font-weight: 400">Hosted MCP servers reference</span></a></li>
</ul>
<h2><b>About the author</b></h2>
<p><b>Philippe Ozil</b><span style="font-weight: 400"> is a Principal Developer Advocate at Salesforce, where he focuses on the Salesforce Platform. He writes technical content and speaks frequently at conferences. He is a full-stack developer and enjoys working with APIs, DevOps, robotics, and VR projects. Follow him on </span><a href="https://x.com/PhilippeOzil"><span style="font-weight: 400">X</span></a><span style="font-weight: 400">, </span><a href="https://www.linkedin.com/in/philippeozil/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">, and </span><a href="https://bsky.app/profile/pozil.bsky.social"><span style="font-weight: 400">Bluesky</span></a><span style="font-weight: 400">, and check out his </span><a href="https://github.com/pozil"><span style="font-weight: 400">GitHub projects</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/headless-development-with-metadata-visualizer-and-live-preview">Headless Development with Metadata Visualizer and Live Preview</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/headless-development-with-metadata-visualizer-and-live-preview/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207403</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261118075858/SingleHeadshot-16-e1795017556230.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261118075858/SingleHeadshot-16-e1795017556230.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Expose HXL Widgets to Slackbot with a Custom MCP Server</title>
		<link>https://developer.salesforce.com/blogs/2026/11/expose-hxl-widgets-slackbot-custom-mcp-server</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/expose-hxl-widgets-slackbot-custom-mcp-server#respond</comments>
		<pubDate>Tue, 17 Nov 2026 16:00:14 +0000</pubDate>
		<dc:creator><![CDATA[Akshata Sawant]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[APIs and Integrations]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Custom Lightning Types]]></category>
		<category><![CDATA[Headless Experience Layer]]></category>
		<category><![CDATA[hxl]]></category>
		<category><![CDATA[MCP]]></category>
		<category><![CDATA[Model context protocol]]></category>
		<category><![CDATA[Slack]]></category>
		<category><![CDATA[Slackbot]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207373</guid>
		<description><![CDATA[<p>Configure Slackbot to render Headless Experience Layer (HXL) widgets from a custom Salesforce MCP server. Org connection setup, tool permissions, and fixes.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/expose-hxl-widgets-slackbot-custom-mcp-server">Expose HXL Widgets to Slackbot with a Custom MCP Server</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.salesforce.com/headless/agentic-experience-layer/"><span style="font-weight: 400">Headless Experience Layer </span></a><span style="font-weight: 400">(HXL), currently in beta, helps you build rich agentic UIs via widgets that can be rendered across multiple surfaces such as </span><a href="https://www.salesforce.com/agentforce/agentforce-for-employees/employee-agents/"><span style="font-weight: 400">Agentforce employee agents</span></a><span style="font-weight: 400">, Claude, Slackbot, and ChatGPT. If your HXL widget already renders in Claude or ChatGPT, it can render in Slackbot too. You don&#8217;t need to change the widget, the Apex action, or the Custom Lightning Types. </span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">What&#8217;s left is configuration on the Slack side. You decide how Slack connects to your Salesforce MCP server, who can use it, and which tools Slackbot may run. </span></p>
<p><span style="font-weight: 400">This post covers what your custom Salesforce Hosted MCP Server needs before you connect and how to connect Slackbot through the Salesforce org connection, as well as tool permissions, tool design for Slackbot, and how to troubleshoot a missing card.</span></p>
<p><span style="font-weight: 400">New to HXL? Read </span><a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl"><span style="font-weight: 400">Building Interactive UI with Headless Experience Layer</span></a><span style="font-weight: 400"> to build the widget, the Custom Lightning Types, and the MCP server definition. Then read </span><a href="https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients?utm_campaign=amer_sfld&amp;utm_content=Salesforce+Developers__sprout-1794501428&amp;utm_medium=organic_social&amp;utm_source=linkedin"><span style="font-weight: 400">How HXL Widgets Render in Agentforce and MCP Clients</span></a><span style="font-weight: 400"> to see what happens on the wire. This post picks up where those end.</span></p>
<p><b>What you need before you start:</b></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">HXL (Beta) turned on in Setup &gt; Headless Experience Layer Settings</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">An active custom MCP server with a working HXL widget</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">A Slack Org Owner, or an admin who can manage Salesforce organizations, and a Salesforce admin</span></li>
</ul>
<h2><span style="font-weight: 400">See Pronto storefront tools render in Slackbot</span></h2>
<p><span style="font-weight: 400">Slackbot renders an HXL widget the same way Claude and ChatGPT do: It follows the tool’s UI resource to the widget and draws it as an interactive block, using HTML styled to look like a Block Kit. A custom MCP server returns the widget as HTML, which is currently the only format it can return because it follows the MCP Apps standard. You don&#8217;t build any Block Kit for Slackbot.</span></p>
<p><span style="font-weight: 400">Tip: You can preview how widgets will look in Slackbot in the </span><a href="https://developer.salesforce.com/docs/platform/hxl/guide/playground.html"><span style="font-weight: 400">HXL Playground</span></a><span style="font-weight: 400">.</span></p>
<p><span>To see how this works, you can use </span><a href="https://github.com/trailheadapps/pronto"><b><u>Pronto</u></b></a><span>, the sample app for a fictional food-delivery platform. A Pronto employee prompts Slackbot, </span><i><span>&#8220;Tell me about The Green Fork.&#8221; </span></i><span>Slackbot calls the </span><code>getStorefrontFromName</code><span> tool on a custom MCP server named </span><b><span>Pronto Storefront Tools</span></b><span> and shows the storefront card. The card&#8217;s </span><b><span>View Menu</span></b><span> button posts a follow-up question, and Slackbot calls </span><code>getStorefrontMenu</code><span> to show the menu card.</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207392" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261116090758/image2_7ae576-e1794848898156.png" class="postimages" width="1000" height="662" alt="Slackbot answers &quot;Tell me about The Green Fork&quot; with a Pronto storefront card showing the Closed status, vegan cuisine, a 3.8 rating from 8 reviews, the address, the phone number, and View Menu and Check Hours buttons." />
			  </span>
			</p>
<p><span>Widget buttons don&#8217;t call your Apex action directly. The View Menu button uses the widget&#8217;s </span><code>sendMessage</code><span> action, so a click posts &#8220;Show me the menu for The Green Fork&#8221; as a new message. Slackbot treats it like any other question and picks a tool again. The menu card appears only if Slackbot picks the menu tool, which is why clear tool descriptions matter for follow-up cards too.</span></p>
<h2><span style="font-weight: 400">Check your MCP server before you connect Slackbot</span></h2>
<p><span style="font-weight: 400">If widgets don&#8217;t appear in Slackbot, or Slackbot answers in plain text instead, the cause is usually the MCP server definition, not Slack. </span></p>
<p><span style="font-weight: 400">Without a valid UI resource, the server returns no widgets. Check the five server settings in the table below for the most likely issues.</span></p>
<table>
<tbody>
<tr>
<td><b><span>Check</span></b></td>
<td><b><span>Why Slackbot needs it</span></b></td>
<td><b><span>How to verify</span></b></td>
</tr>
<tr>
<td><span>The server is </span><b><span>Active</span></b></td>
<td><span>Slack can&#8217;t list the tools of an inactive server</span></td>
<td><span>Setup &gt; </span><b><span>API Catalog</span></b><span> &gt; </span><b><span>MCP Servers</span></b><span> shows the server as Active, with the tool count you expect</span></td>
</tr>
<tr>
<td><span>Every </span><code>&lt;resources&gt;</code><span> entry has a </span><code>&lt;description&gt;</code></td>
<td><span>The server definition in the HXL guide&#8217;s Create a Custom MCP Server includes one for each resource. Without it, the tool can return text only, and Slackbot answers in text</span></td>
<td><span>Open the server definition and check each resource</span></td>
</tr>
<tr>
<td><span>Each tool&#8217;s </span><code>&lt;uiResource&gt;</code><span> matches a </span><code>resourceName</code></td>
<td><span>The tool&#8217;s </span><code>&lt;uiResource&gt;</code><span> value is how Slackbot finds its widget. If no </span><code>resourceName</code><span> matches, the tool returns text only</span></td>
<td><span>Compare the two values in the server definition</span></td>
</tr>
<tr>
<td><span>Read-only tools set </span><code>readOnly</code><span> to </span><code>true</code><span> and </span><code>destructive</code><span> to </span><code>false</code></td>
<td><span>These flags tell Slackbot whether a tool only reads data or can change it. Slackbot treats unclassified tools as write tools, which can add confirmation prompts</span></td>
<td><span>Review each tool&#8217;s flags</span></td>
</tr>
<tr>
<td><code>descriptionOverride</code><span> says exactly what the tool returns</span></td>
<td><span>Slackbot&#8217;s model reads it to decide which tool to call</span></td>
<td><span>Read it as if you were the model</span></td>
</tr>
</tbody>
</table>
<h2><span style="font-weight: 400">Connect Slackbot through the Salesforce org connection</span></h2>
<p><span style="font-weight: 400">Slackbot connects to a custom MCP server through the Salesforce org connection. The org connection links your Slack workspace to your Salesforce org once. Then you add any active MCP server from that org. You need to be a Slack Org Owner, or an admin who can manage Salesforce organizations, and a Salesforce admin. Perform the Slack admin steps in a browser rather than the desktop app.</span></p>
<ol>
<li style="font-weight: 400"><b>Map users.</b><span style="font-weight: 400"> On each Salesforce user, set </span><b>Federation ID</b><span style="font-weight: 400"> to the email address the person uses in Slack.</span></li>
<li style="font-weight: 400"><b>Request the connection.</b><span style="font-weight: 400"> In Slack, go to </span><b>Tools &amp; settings</b><span style="font-weight: 400"> &gt; </span><b>Manage Salesforce Organizations</b><span style="font-weight: 400">, and click </span><b>Connect Salesforce Org</b><span style="font-weight: 400">. Enter your org&#8217;s My Domain URL and click </span><b>Request Connection</b><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><b>Approve it in Salesforce.</b><span style="font-weight: 400"> In Setup, open </span><b>Manage Slack Connection</b><span style="font-weight: 400">. Set </span><b>Salesforce Mapping Field</b><span style="font-weight: 400"> to </span><b>SAML Federation ID</b><span style="font-weight: 400">, and approve the request. Back in Slack, refresh the Salesforce organizations page. A green banner shows your org; click View details and approve it.</span></li>
<li style="font-weight: 400"><b>Add the MCP server.</b><span style="font-weight: 400"> In Slack admin, open </span><b>Salesforce</b><span style="font-weight: 400"> &gt; </span><b>MCP servers</b><span style="font-weight: 400">, click </span><b>Add MCP server</b><span style="font-weight: 400">, and pick your server. Finish every screen, and choose who can use it.</span></li>
<li style="font-weight: 400"><b>Check the result.</b><span style="font-weight: 400"> Verify that the MCP servers list shows your server as </span><b>Connected</b><span style="font-weight: 400">, with a value in </span><b>Date added</b><span style="font-weight: 400">.</span></li>
</ol>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207393" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261116090857/image3_2f4f63-e1794848950893.png" class="postimages" width="1000" height="530" alt="The ProntoStorefrontTools details page in Slack admin, showing the server as Connected, with its organization, description, and builder." />
			  </span>
			</p>
<p><span style="font-weight: 400">Note: If the </span><b>Date added</b><span style="font-weight: 400"> is blank, the configuration isn’t complete, and Slackbot can&#8217;t see the server&#8217;s tools. Remove the server and add it again.</span></p>
<h2><span style="font-weight: 400">Turn on the server in Slackbot and set tool permissions</span></h2>
<p><span style="font-weight: 400">Each user turns on the server in Slackbot and signs in once.</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Open a direct message with </span><b>Slackbot</b><span style="font-weight: 400"> and open the apps menu below the message box.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Switch on your server. If Slack asks, sign in to Salesforce and allow access.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Send a prompt that one of your tools can answer, for example &#8220;Tell me about The Green Fork.&#8221;</span></li>
</ol>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207394" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261116091203/image1_39a74b.png" class="postimages" width="697" height="353" alt="The Slackbot apps menu with ProntoStorefrontTools switched on." />
			  </span>
			 
			  <span class="postimagessection_specify alignnone size-full wp-image-207395" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261116091220/image1_f0fea1.png" class="postimages" width="697" height="353" alt="" />
			  </span>
			</p>
<p><span>The first time Slackbot calls a tool, it asks the user to choose </span><b><span>Allow once</span></b><span>, </span><b><span>Always allow</span></b><span>, or </span><b><span>Deny</span></b><span>. This is per-tool trust, and it&#8217;s one more reason to keep read-only tools and write tools separate. In Pronto, lookup tools like </span><code>getStorefrontFromName</code><span> are safe to always allow. Pronto Employee Server also has tools like </span><code>createOrder</code><span> and </span><code>cancelOrder</code><span>, which are marked </span><code>destructive</code><span>, so users should approve each call.</span></p>
<p><span style="font-weight: 400">Two limits from the </span><a href="https://docs.slack.dev/ai/slackbot-mcp-client/"><span style="font-weight: 400">Slackbot MCP client documentation</span></a><span style="font-weight: 400"> shape your server design:</span></p>
<ul>
<li style="font-weight: 400"><b>Five active servers.</b><span style="font-weight: 400"> Each user can have up to five active MCP servers in Slackbot, so keep each server focused on one job.</span></li>
<li style="font-weight: 400"><b>60-second timeout.</b><span style="font-weight: 400"> A tool must respond within 60 seconds. MCP tool calls are stateless, so each call runs your invocable Apex action from the start. Keep that work small: avoid chained callouts and heavy aggregate SOQL queries, and return only the fields the widget needs.</span></li>
</ul>
<h2><span style="font-weight: 400">Help Slackbot pick the right MCP tool</span></h2>
<p><span style="font-weight: 400">Slackbot chooses among every tool it can reach. That includes the tools on all of the user&#8217;s active servers, and Slackbot&#8217;s own Salesforce search. If another tool can answer the question, Slackbot may pick it, and you get a plain table instead of your card.</span></p>
<p><span style="font-weight: 400">You can see this in Pronto. Pronto Employee Server and Pronto Storefront Tools both answer storefront questions. With both servers on, Slackbot sometimes calls </span><span style="font-weight: 400">searchStorefronts</span><span style="font-weight: 400"> and a menu lookup on the Employee Server, and builds its own table. To see which tools Slackbot ran, check the step line: the short summary of its work that Slackbot shows with each answer, such as &#8220;Queried Salesforce&#8221; or the name of a tool it called. Expand it to see each step. If it names Slackbot&#8217;s own Salesforce search or a tool from another server, see “</span><a href="#troubleshoot-hxl-widgets"><span style="font-weight: 400">Troubleshoot HXL widgets in Slackbot</span></a><span style="font-weight: 400">” below.</span></p>
<p><span>These practices help Slackbot pick the tool that has the widget:</span></p>
<ul>
<li><b><span>Avoid overlapping servers.</span></b><span> Don&#8217;t put two tools that answer the same question on two active servers. If you must, switch one server off while you test.</span></li>
<li><b><span>Write specific tool descriptions.</span></b><span> Name the object and the fields the tool returns, as the </span><code><span>descriptionOverride</span></code><span> below does.</span></li>
<li><b><span>Name records clearly in prompts.</span></b><span> &#8220;Tell me about The Green Fork&#8221; is easier to route than &#8220;that restaurant.&#8221;</span></li>
<li><b><span>Start a new direct message after a change.</span></b><span> A conversation can keep a tool list from before you added or removed a server.</span></li>
</ul>
<p><span><span>Here&#8217;s the Slack-relevant part of the </span></span><code>getStorefrontFromName</code><span><span> tool in Pronto Storefront Tools. The description names the object and the fields the tool returns, and the readOnly and destructive flags mark it as a lookup.</span></span></p>
<pre language="xml">&lt;tools&gt;
    &lt;descriptionOverride&gt;Look up a Pronto storefront by name: cuisine, status, rating, address, and phone. Read-only.&lt;/descriptionOverride&gt;
    &lt;destructive&gt;false&lt;/destructive&gt;
    &lt;readOnly&gt;true&lt;/readOnly&gt;
    &lt;toolName&gt;getStorefrontFromName&lt;/toolName&gt;
    &lt;toolTitle&gt;Get Storefront From Name&lt;/toolTitle&gt;
    &lt;uiResource&gt;getStorefrontFromName&lt;/uiResource&gt;
&lt;/tools&gt;
</pre>
<p><span>The full server definition, including </span><code>apiDefinition</code><span> and the </span><code>&lt;resources&gt;</code><span> block, is covered in </span><a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl">Building Interactive UI with Headless Experience Layer</a><span>.</span></p>
<h2 id="troubleshoot-hxl-widgets"><span style="font-weight: 400">Troubleshoot HXL widgets in Slackbot</span></h2>
<p><span style="font-weight: 400">A missing or incorrect HXL card in Slackbot usually traces back to one of six causes, and most fixes are straightforward. To troubleshoot, match what you see to a row in this table.</span></p>
<table>
<tbody>
<tr>
<td><b>What you see</b></td>
<td><b>Likely cause</b></td>
<td><b>Fix</b></td>
</tr>
<tr>
<td>A plain table, and the step line says Slackbot queried Salesforce or used another server</td>
<td>Slackbot picked a different tool</td>
<td>Switch off overlapping servers, start a new direct message, and name the record</td>
</tr>
<tr>
<td>Slackbot says a tool doesn&#8217;t exist, or keeps checking tool availability</td>
<td>The server add in Slack admin didn&#8217;t finish</td>
<td>Check <b>Date added</b>. If it&#8217;s blank, remove the server and add it again</td>
</tr>
<tr>
<td>Text only, from your tool</td>
<td>No UI resource: a <code>&lt;resources&gt;</code> entry is missing its <code>&lt;description&gt;</code>, or the outer type (the Custom Lightning Type that mirrors the tool-call envelope) has no renderer.json</td>
<td>Fix the <a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl"><u>server definition</u></a> or the type, and redeploy</td>
</tr>
<tr>
<td>Slackbot can&#8217;t load the tools</td>
<td>The OAuth session expired</td>
<td>Reconnect the server in the Slackbot apps menu</td>
</tr>
<tr>
<td>The card renders, but some values are blank</td>
<td>A renderer attribute name or output path doesn’t match the widget’s <code>schema.json</code> or the action output</td>
<td>Make the names and paths match exactly</td>
</tr>
<tr>
<td>A permission prompt on every call</td>
<td>The user chose <b>Allow once</b></td>
<td>Choose <b>Always allow</b> for read-only tools</td>
</tr>
</tbody>
</table>
<p><span style="font-weight: 400">Troubleshooting tip: To check the server without Slack, connect a debugging tool such as </span><a href="https://github.com/modelcontextprotocol/inspector"><span style="font-weight: 400">MCP Inspector</span></a><span style="font-weight: 400"> or </span><a href="https://github.com/MCPJam/inspector"><span style="font-weight: 400">MCPJam</span></a><span style="font-weight: 400"> to your server and call the tool. If the tool result has no UI resource there either, the fix is in your server definition, not in Slack.</span></p>
<p><span style="font-weight: 400">Test in the Slack desktop app or Slack in a browser. After you change a widget, the MCP client can take a while to pick up the new version, so allow time before you test again.</span></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p>Your HXL widget doesn&#8217;t need any Slack-specific code to appear in Slackbot. The work is in the setup: make sure the server is active, every resource has a description, and each tool&#8217;s <code>readOnly</code> and <code>destructive</code> flags are set correctly. Then connect it through the Salesforce org connection, set tool permissions, and write tool descriptions that help Slackbot pick the right tool. Do that, and the card your users see in Agentforce and Claude shows up in Slack too, where many of them already work.</p>
<p><span style="font-weight: 400">Try it with </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto Storefront Tools</span></a><span style="font-weight: 400">, then with your own server. You can ask questions in the new </span><a href="http://sforce.co/DevCommunity"><span style="font-weight: 400">Trailblazer Community</span></a> in Slack.</p>
<h2><span style="font-weight: 400">Resources</span></h2>
<ul>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide/hxl-mcp-channels.html"><span style="font-weight: 400">Use HXL Widgets on MCP Channels</span></a></li>
<li style="font-weight: 400"><a href="https://docs.slack.dev/ai/slackbot-mcp-client/"><span style="font-weight: 400">Slackbot as an MCP Client</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide/get-started.html"><span style="font-weight: 400">Headless Experience Layer: Get Started</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl"><span style="font-weight: 400">Blog: Building Interactive UI with Headless Experience Layer</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients"><span style="font-weight: 400">Blog: How HXL Widgets Render in Agentforce and MCP Clients</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto sample app on GitHub</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/workshops/aiforce-workshop/give-agents-ui-with-the-headless-experience-layer-hxl/overview"><span style="font-weight: 400">AIforce Workshop: Give Agents UI with the Headless Experience Layer (HXL)</span></a></li>
</ul>
<h2><span style="font-weight: 400">About the author</span></h2>
<p><span style="font-weight: 400"><strong>Akshata Sawant</strong> is a Lead Developer Advocate at Salesforce, focused on Agentforce and the Headless Experience Layer (HXL). For a more in-depth look at Akshata’s accomplishments, visit her <a href="https://www.linkedin.com/in/akshatasawant02/">LinkedIn</a> profile.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/expose-hxl-widgets-slackbot-custom-mcp-server">Expose HXL Widgets to Slackbot with a Custom MCP Server</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/expose-hxl-widgets-slackbot-custom-mcp-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207373</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261111122654/SingleHeadshot-15-e1794428825146.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261111122654/SingleHeadshot-15-e1794428825146.png?w=1000" medium="image" />
	</item>
		<item>
		<title>How HXL Widgets Render in Agentforce and MCP Clients</title>
		<link>https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients#respond</comments>
		<pubDate>Thu, 12 Nov 2026 16:00:43 +0000</pubDate>
		<dc:creator><![CDATA[Alba Rivas]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Headless 360]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Claude and ChatGPT]]></category>
		<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[hxl]]></category>
		<category><![CDATA[LLM Tool Calling]]></category>
		<category><![CDATA[Model Context Protocol (MCP)]]></category>
		<category><![CDATA[Pronto]]></category>
		<category><![CDATA[salesforce]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207367</guid>
		<description><![CDATA[<p>Learn how Headless Experience Layer (HXL) widgets render in Agentforce and MCP clients like Claude and ChatGPT. Explore both rendering workflows and discover how to troubleshoot when widgets don't appear.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients">How HXL Widgets Render in Agentforce and MCP Clients</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="font-weight: 400">The </span><a href="https://developer.salesforce.com/docs/platform/hxl/guide/get-started.html"><span style="font-weight: 400">Headless Experience Layer (HXL)</span></a><span style="font-weight: 400"> beta lets you define a widget once and show it as an interactive card in Agentforce, Slackbot, Claude, and ChatGPT. When a user asks a question, the widget reaches the screen in different ways, depending on which client the user is chatting in. </span></p>
<p><span style="font-weight: 400">Runtime behavior follows one of two routes:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Route 1 runs inside Agentforce. </span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Route 2 runs through the Model Context Protocol (MCP), the open standard that MCP clients such as Claude and ChatGPT use to call external tools. </span></li>
</ul>
<p><span style="font-weight: 400">Knowing which component does what in each route helps you design better actions, and tells you where to look when a card doesn&#8217;t show up. In this blog post, you’ll:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Walk through Route 1, from the user’s question to the card in Agentforce.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Walk through Route 2, first in a simplified view and then in full.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Learn how to troubleshoot each route when a card doesn’t show up.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Compare both routes side by side.</span></li>
</ul>
<p><span style="font-weight: 400">Note: An earlier blog post, </span><a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl"><span style="font-weight: 400">Building Interactive UI with Headless Experience Layer</span></a><span style="font-weight: 400">, introduces the topic and shows the code and metadata you need to create widgets. Make sure to read that post first.</span></p>
<h2><span style="font-weight: 400">Example widget: Get customer reviews in Pronto</span></h2>
<p>Both routes use the same example from <a href="https://github.com/trailheadapps/pronto"><u>Pronto</u></a>, a sample app for a fictional food delivery platform. A Pronto employee asks, &#8220;Show me the reviews for The Green Fork.&#8221; The agent calls the <a href="https://github.com/trailheadapps/pronto/blob/main/src-base/main/default/aiAuthoringBundles/Employee_Assistant/Employee_Assistant.agent#L252"><u><code>getCustomerReviews</code><span> action</span></u></a><span>, which runs the </span><a href="https://github.com/trailheadapps/pronto/blob/main/src-base/main/default/classes/actions/reviews/GetCustomerReviewsAction.cls"><u><code>GetCustomerReviewsAction</code><span> Apex class</span></u></a><span> and returns a </span><a href="https://github.com/trailheadapps/pronto/tree/main/src-base/main/default/uiWidgets/customerReviews"><u><code>customerReviews</code><span> widget</span></u></a><span>: a card with the average rating and the list of reviews. Pronto wires that same widget into both routes, so you can deploy the app and test it yourself.</span></p>
<h2><span style="font-weight: 400">Route 1: Render HXL widgets as Agentforce action output</span></h2>
<p><span style="font-weight: 400">In Route 1, the large language model (LLM) points at a stored action result, and the Agentforce Client builds the widget in the browser from JSON. Route 1 is described in the </span><a href="https://developer.salesforce.com/docs/platform/hxl/guide/agentforce-action-output.html"><span style="font-weight: 400">Agentforce action output guide</span></a><span style="font-weight: 400">. </span></p>
<p><span style="font-weight: 400">Here is the full sequence for it (HXL-specific messages are in orange):</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207382" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261111131518/image1_35fad9-e1794431729960.png" class="postimages" width="1000" height="563" alt="Sequence diagram of Route 1 with four lifelines (User, Agentforce Conversation Client, Agentforce Runtime, large language model) showing eight numbered messages, with HXL-specific messages in orange." />
			  </span>
			</p>
<p><span style="font-weight: 400">In the diagram, there are four actors: </span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The User that sends the prompt.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Agentforce Conversation Client, which is the chat panel that runs in Lightning Experience, within the browser.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Agentforce Runtime, which is the entity that runs the reasoning loop on Salesforce.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The LLM that the runtime calls at each step.</span></li>
</ul>

<h3 class="wp-block-heading">Steps 1 to 4: The agent calls the action</h3>



<ol class="wp-block-list">
<li>The user message travels from the client (browser) to the Agentforce runtime.</li>
<li>The runtime starts the reasoning loop.</li>
<li>The runtime sends the LLM the prompt plus the list of available actions.</li>
<li>The LLM decides the next step and calls <code>getCustomerReviews</code> with the storefront ID. In Pronto, the agent first turns the storefront name into a record ID with the standard Identify Record By Name action. The diagram skips that call to keep the flow short.</li>
</ol>



<p class="wp-block-paragraph">So far, this is a regular Agentforce action call. Nothing HXL-specific has happened yet.</p>

<h3 class="wp-block-heading">Steps 5 and 6: The LLM asks to show the result</h3>



<p class="wp-block-paragraph">This is where HXL comes in.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">5.  The runtime runs the action and stores its output under a short ID. When it returns the result to the LLM, it adds two extra fields:</p>

<pre language="json">{
  "reviews": { "reviewCount": 8, "averageRating": 4.125, "items": ["..."] },
  "__tool_idx__": "4bd08ecf",
  "__supports_result_display__": true
}</pre>

<ul class="wp-block-list">
<li><code>__supports_result_display__</code> tells the LLM that this result can be shown as a card. The runtime only sets it when the surface can render widgets and the action has an output marked <code>is_displayable: True</code> in your Agent Script.</li>
<li><code>__tool_idx__</code> is the ID of the stored result.</li>
</ul>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">6.  If the LLM wants the card, it calls a built-in action named <code>__show_tool_results__</code>, passing in the <code>__tool_idx__</code> value:</p>

<pre language="json">{
  "caption": "Here are the reviews for The Green Fork. You can view individual ratings, comments, and customer names. Let me know if you'd like to reply to any review or need more details.",
  "tool_ids": ["4bd08ecf"]
}</pre>

<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207383" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261111131602/image2_fe0664-e1794431775169.png" class="postimages" width="1000" height="616" alt="Agentforce Builder preview trace showing the LLM response calling __show_tool_results__ with a caption and one tool ID, next to the rendered customer review card" />
			  </span>
			</p>
<p>Rendering depends on the model choosing to call <code>__show_tool_results__</code>. The model can skip it, for example when a short text answer seems enough. To make the card more likely, ask for it in the agent&#8217;s instructions. Note that this call carries no data and no widget, only a caption and an ID. The LLM points at a result and the runtime does the rest.</p>

<h3 class="wp-block-heading">Steps 7 and 8: The runtime resolves the results and the client renders the widget</h3>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">7.  The runtime looks up the result by its ID and crafts a response. That response holds three things: the LLM response text (caption), the data returned by the Apex class, and the configured Custom Lightning Type (CLT) with its widget. In Pronto, that CLT is <code>customerReviewsOutput</code>, the type of the reviews output in the agent&#8217;s Agent Script.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">8.  The Agentforce Conversation Client then does the HXL work in the browser. It reads the It reads the CLT&#8217;s widget mapping to find the widget. Then it hydrates each <code>{!$attrs...}</code> placeholder with the matching value from the data. Finally, it draws the widget&#8217;s component tree as Lightning web components. No HTML travels over the wire in this route, only JSON.</p>
<h3><strong>Troubleshooting Route 1 in Agentforce</strong></h3>
<p><span style="font-weight: 400">If you get a wall of text instead of a card, check these steps in order. You can see the action calls in the trace in Agentforce Builder or Agentforce DX while you test, and in production through </span><a href="https://help.salesforce.com/s/articleView?id=ai.generative_ai_session_trace.htm&amp;type=5"><span style="font-weight: 400">Agentforce Session Tracing</span></a><span style="font-weight: 400">:<br /></span></p>
<ol>
<li>Is the output marked <code>is_displayable: True</code>? Without that, the runtime doesn&#8217;t add <code>__supports_result_display__</code> (step 5).</li>
<li>Does the output use the CLT as its <code>complex_data_type_name</code>? Without it, the response has no widget (step 7).</li>
<li>Did the LLM call <code>__show_tool_results__</code> at all? Look for it in the trace (step 6). If it&#8217;s missing, ask for the card in the agent&#8217;s instructions.</li>
</ol>
<h2><span style="font-weight: 400">Route 2: Expose HXL widgets to MCP clients with a custom MCP server</span></h2>
<p><span style="font-weight: 400">In Route 2, the MCP server sends a widget already filled with data, and the MCP host draws it in a sandboxed iframe. Route 2 is described in the </span><a href="https://developer.salesforce.com/docs/platform/hxl/guide/hxl-mcp-channels.html"><span style="font-weight: 400">HXL MCP channels guide</span></a><span style="font-weight: 400">. This route follows the standard </span><a href="https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx"><span style="font-weight: 400">MCP Apps protocol</span></a><span style="font-weight: 400">. The protocol defines how an MCP tool points to a UI resource, how the MCP host loads it, and how the host passes tool results to it.</span></p>
<p><span style="font-weight: 400">Let&#8217;s start with a simplified view. In this diagram, everything that happens inside the MCP client is folded into one lifeline, labeled “MCP Client”:</span></p>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207384" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261111131643/image4-e1794431814798.png" class="postimages" width="1000" height="563" alt="Simplified sequence diagram of Route 2 with three lifelines (User, MCP Client, MCP Server), split into an On connect phase and a Request phase." />
			  </span>
			</p>
<p><span style="font-weight: 400">In the diagram, there are three actors: </span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The User that sends the prompt.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The MCP Client, such as ChatGPT, Claude, or Slackbot. The next diagram expands the client into its iframe, host, and the LLM.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The MCP Server in Salesforce.</span></li>
</ul>

<h3 class="wp-block-heading">On connect: The client discovers the renderer</h3>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">1.  When Claude or ChatGPT connects to your MCP server, it calls <code>tools/list</code>.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">2.  Each tool that has a widget comes back with a renderer address, a <code>ui://</code> Uniform Resource Identifier (URI) that MCP Apps defines in <code>_meta.ui.resourceUri</code>:</p>
<pre language="json">{
  "name": "getCustomerReviews",
  "_meta": {
    "ui": { "resourceUri": "ui://widget/lightningType/c__customerReviews" }
  }
}</pre>



<p class="wp-block-paragraph">In Pronto, that address comes from the <a href="https://example.com" target="_blank" rel="noreferrer noopener">Pronto Employee Server MCP server definition</a>. There, the <code>getCustomerReviews</code> tool points to the <code>customerReviews</code> UI resource (the CLT that maps to the widget).</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">3.  The client then calls <code>resources/read</code> on that address.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">4.  It gets back the HXL renderer, an HTML page that reads an HXL widget and draws it on screen. The MCP client loads that page in a sandboxed iframe, isolated from the rest of the app. The client can fetch the renderer when it connects or the first time it needs it. Each host decides, and it can cache the renderer for later calls. In Route 1, the renderer is already part of the Agentforce Client. The actual widget, already filled with data, arrives later with each tool result.</p>



<h3 class="wp-block-heading">Request: The server returns data and a hydrated widget</h3>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">5.  The user asks for the reviews.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">6.  The LLM picks <code>getCustomerReviews</code> and the client sends <code>tools/call</code>. As in Route 1, the LLM first needs the storefront ID, which it can get from another Pronto tool such as <code>searchStorefronts</code>.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">7.  The server runs the action. Then HXL resolves the CLT to its widget and hydrates the widget with the data. The <code>tools/call</code> result carries three parts:</p>
<pre language="json">{
  "content": [{ "type": "text", "text": "the same JSON, as a string" }],
  "structuredContent": { "...": "the raw action output, serialized as JSON" },
  "_meta": {
    "salesforce/uiMetadata": { "...": "the hydrated widget" }
  }
}</pre>



<ul class="wp-block-list">
<li><code>structuredContent</code> is the raw tool response, wrapped in an envelope with <code>actionName</code>, <code>isSuccess</code>, and <code>outputValues</code>, which holds the action&#8217;s output. Because the action returns a list, the envelope sits inside an array.</li>
<li><code>content</code> carries the same JSON as text. That&#8217;s the part the LLM reads.</li>
<li><code>_meta</code> holds the widget, and it&#8217;s only for rendering.</li>
</ul>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">8.  The client hands the result to the renderer, which draws the card, and the agent summarizes the result in its answer to the user. Per the protocol, the agent doesn&#8217;t read <code>_meta</code>. It reads <code>content</code>, which carries the same JSON as <code>structuredContent</code>. Note: Slackbot shows HXL widgets as HTML styled to look like Block Kit.</p>



<h3 class="wp-block-heading">The full picture: Host, LLM, and iframe</h3>



<p class="wp-block-paragraph">The simplified view hides who does what inside the client. This one splits the MCP Client into its three parts:</p>



<ul class="wp-block-list">
<li>The Widget Iframe is the sandboxed frame where the renderer runs.</li>
<li>The MCP Host is the app (for example, Claude or ChatGPT) that talks to the server.</li>
<li>The LLM is the model.</li>
</ul>
<p>
			  <span class="postimagessection_specify alignnone size-full wp-image-207385" >
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261111131712/image3_12f60b-e1794431846154.png" class="postimages" width="1000" height="563" alt="Detailed sequence diagram of Route 2 with five lifelines (User, Widget Iframe, MCP Host, LLM, MCP Server) showing thirteen numbered messages, with HXL-specific messages in orange." />
			  </span>
			</p>



<p class="wp-block-paragraph">Four steps are worth a closer look (9 to 12 in the diagram):</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">9.  The <code>tools/call</code> result reaches the host.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">10. The host pushes the tool result into the iframe. The renderer reads the widget from it and draws the card.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">11. The host sends the tool result to the LLM, without the widget.</p>



<p class="wp-block-paragraph" style="padding-left: 2em;text-indent: -2em">12. The LLM writes the final answer from the data, and the host shows the answer next to the card.</p>
<h3><strong>Troubleshooting Route 2 in MCP clients</strong></h3>
<p>If you get text instead of a card, check each step of the sequence in order. You can use the <a href="https://github.com/modelcontextprotocol/inspector"><u>MCP Inspector</u></a> to see the raw responses the server returns:</p>
<ol>
<li>Does the client support MCP Apps? Claude, ChatGPT, and Slackbot do. Claude Code in the terminal doesn&#8217;t render widgets, so you&#8217;ll see text only.</li>
<li>Does the <code>tools/list</code> result include <code>_meta.ui.resourceUri</code> for your tool (step 2)? If not, check that the tool points to the UI resource in your MCP server definition.</li>
<li>Does the UI resource load? Call <code>resources/read</code> on that URI in the MCP Inspector, and make sure it returns the HXL renderer (step 4).</li>
<li>Does the <code>tools/call</code> result include <code>salesforce/uiMetadata</code> (step 7 in the simplified diagram)? If not, check <code>isError</code> first. When the action fails, the server returns only an error message, with no data and no widget.</li>
</ol>
<h2><span style="font-weight: 400">Route 1 vs. Route 2: What&#8217;s different</span></h2>
<p><span style="font-weight: 400">Both routes start from the same Apex action and the same widget. They differ in who decides to show the card, where the widget gets filled with data, and who draws it.</span></p>
<table>
<tbody>
<tr>
<td></td>
<td><br />Route 1: Agentforce</td>
<td><br />Route 2: MCP (Claude, ChatGPT, Slackbot)</td>
</tr>
<tr>
<td><br />Who decides to show the card</td>
<td><br />The LLM, by calling <code>__show_tool_results__</code></td>
<td><br />The host, whenever the tool has a renderer address. The LLM can&#8217;t drop the card.</td>
</tr>
<tr>
<td><br />What the LLM sees</td>
<td><br />The result plus an ID, never the widget</td>
<td><br />The result data, never <code>_meta</code></td>
</tr>
<tr>
<td><br />What travels to the client</td>
<td><br />Response text, data, and the CLT with its widget</td>
<td><br />Raw tool response plus the hydrated widget in <code>_meta</code></td>
</tr>
<tr>
<td><br />Where data meets the widget</td>
<td><br />In the browser, in the Agentforce Client</td>
<td><br />On the server, in HXL</td>
</tr>
<tr>
<td><br />Who draws the card</td>
<td><br />The Agentforce Client, as Lightning web components</td>
<td><br />The HXL renderer, inside a sandboxed iframe, as HTML</td>
</tr>
<tr>
<td><br />When the HXL renderer loads</td>
<td><br />Already part of the Agentforce Conversation Client</td>
<td><br />Through <code>resources/read</code>, on connect or on first use</td>
</tr>
</tbody>
</table>
<p></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">You now know what happens between a user&#8217;s question and the card on the screen in both routes. In Agentforce, the LLM points at a stored result and the client builds the card in the browser. In MCP clients, the Salesforce MCP server sends a hydrated widget and the host draws it in an iframe. </span></p>
<p><span style="font-weight: 400">To see it in action, deploy </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto</span></a><span style="font-weight: 400"> to an org and try both routes. To go deeper, watch the recorded codeLive, </span><a href="https://www.youtube.com/watch?v=LQHv9hMhqa4"><span style="font-weight: 400">Build Rich Agentic UI with Headless Experience Layer</span></a><span style="font-weight: 400">, and </span><a href="https://www.youtube.com/watch?v=mnvGnN3ny-o"><span style="font-weight: 400">Ask Me Anything (AMA)</span></a><span style="font-weight: 400"> sessions.</span></p>
<h2><span style="font-weight: 400">Resources</span></h2>
<ul>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/blogs/2026/10/building-interactive-ui-with-hxl"><span style="font-weight: 400">Building Interactive UI with Headless Experience Layer</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto sample app</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide/get-started.html"><span style="font-weight: 400">HXL Get Started</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide/agentforce-action-output.html"><span style="font-weight: 400">Render HXL Widgets as Agentforce Action Output</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hxl/guide/hxl-mcp-channels.html"><span style="font-weight: 400">Expose HXL Widgets through MCP</span></a></li>
<li style="font-weight: 400"><a href="https://www.headlessexperiencelayer.com/playground/"><span style="font-weight: 400">HXL Playground</span></a></li>
<li style="font-weight: 400"><a href="https://modelcontextprotocol.io/extensions/apps"><span style="font-weight: 400">MCP Apps overview</span></a><span style="font-weight: 400"> and </span><a href="https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx"><span style="font-weight: 400">MCP Apps specification</span></a></li>
</ul>
<h2><span style="font-weight: 400">About the author</span></h2>
<p><span style="font-weight: 400"><strong>Alba Rivas</strong> works as a Principal Developer Advocate at Salesforce. You can follow her on </span><a href="https://github.com/albarivas"><span style="font-weight: 400">GitHub</span></a><span style="font-weight: 400"> or </span><a href="https://www.linkedin.com/in/alba-rivas/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients">How HXL Widgets Render in Agentforce and MCP Clients</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/how-hxl-widgets-render-in-agentforce-and-mcp-clients/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207367</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261111111801/SingleHeadshot-14-e1794424697863.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261111111801/SingleHeadshot-14-e1794424697863.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Agentforce Metadata Types in Winter &#8217;27: Dive into AiAgentDefinition</title>
		<link>https://developer.salesforce.com/blogs/2026/11/agentforce-metadata-types-in-winter-27-dive-into-aiagentdefinition</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/agentforce-metadata-types-in-winter-27-dive-into-aiagentdefinition#respond</comments>
		<pubDate>Wed, 11 Nov 2026 16:00:42 +0000</pubDate>
		<dc:creator><![CDATA[Sarah Welker]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[Developer Tooling]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Salesforce Releases]]></category>
		<category><![CDATA[Agent Script]]></category>
		<category><![CDATA[AiAgentDefinition]]></category>
		<category><![CDATA[Application Lifecycle Management]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[Metadata API]]></category>
		<category><![CDATA[Salesforce CLI]]></category>
		<category><![CDATA[Winter '27]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207363</guid>
		<description><![CDATA[<p>Explore two new Agentforce metadata types in Winter &rsquo;27 that simplify managing, retrieving, and deploying agents across Salesforce orgs. Learn how these enhancements streamline agent versioning and development workflows.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/agentforce-metadata-types-in-winter-27-dive-into-aiagentdefinition">Agentforce Metadata Types in Winter &#8217;27: Dive into AiAgentDefinition</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you move Agentforce agents between orgs with Salesforce CLI or a continuous integration and continuous delivery (CI/CD) pipeline, the <a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_agentforce_metadata.htm&amp;release=264&amp;type=5"><u>Winter &#8217;27 release</u></a> makes your work simpler. API version 68.0 introduces two new metadata types for agents: <code>AiAgentDefinition</code> and <code>AiAgentDefinitionVersion</code>. Each agent now has one definition and one folder per version, with readable names.</p>
<p>An earlier post, <a href="https://developer.salesforce.com/blogs/2026/05/new-agentforce-metadata-and-development-lifecycle"><u>The New Agentforce Metadata and Development Lifecycle</u></a>, showed how Agent Script agents map to the <code>Bot</code>, <code>GenAiPlannerBundle</code>, and <code>AiAuthoringBundle</code> metadata types. This post picks up from there. It covers why we simplified agent metadata and compares the old and new structures side by side, using a real agent. It also covers what to know before you retrieve and deploy with the new types.</p>
<h2>Agent metadata before API version 68.0 (Winter &#8217;27)</h2>
<p><span style="font-weight: 400">To see what changed, let&#8217;s start with a real agent. TestAgent is an Agentforce Service Agent built with Agent Script. It has one version, 10 subagents, and 26 actions. Here&#8217;s what you get when you retrieve it into a Salesforce DX project at API version 67.0.</span></p>
<pre language="text">├── aiAuthoringBundles
│   └── TestAgent
│       ├── TestAgent.agent
│       └── TestAgent.bundle-meta.xml
├── bots
│   └── TestAgent
│       ├── TestAgent.bot-meta.xml
│       └── v1.botVersion-meta.xml
└── genAiPlannerBundles
    └── TestAgent_v1
        ├── TestAgent_v1.genAiPlannerBundle
        ├── agentGraph
        │   └── TestAgent_v1_graph.json
        ├── agentScript
        │   └── TestAgent_v1_definition.agent
        └── localActions
            ├── AccountManagement_1793afaabbea5e6
            ├── CaseManagement_1797b79603146ff
            ├── DeliveryIssues_1799f005010de87
            │   ├── AnswerQuestionsWithKnowledge_17288a938fc0c53
            │   │   ├── input
            │   │   │   └── schema.json
            │   │   └── output
            │   │       └── schema.json
            │   └── ... 5 more actions
            ├── GeneralFAQ_17958732d5d84f7
            ├── OrderInquiries_179524d7fde40be
            ├── ReservationManagement_17932b500c2b88d
            └── ServiceCustomerVerification_1796152b9540575
                ├── SendEmailVerificationCode_1724f12735f68c6
                └── VerifyCustomer_1726b9bee0044be
</pre>
<p>One agent with one version is spread across three metadata types (<code>Bot</code>, <code>GenAiPlannerBundle</code>, and <code>AiAuthoringBundle</code>). The agent&#8217;s settings live in <code>TestAgent.bot-meta.xml</code> (the bot), and the version&#8217;s settings and welcome message live in <code>v1.botVersion-meta.xml</code> (the version). The subagents and actions live in <code>TestAgent_v1</code> (the planner bundle), and the Agent Script source sits in <code>TestAgent.agent</code> (the authoring bundle).</p>
<p><span style="font-weight: 400">Here are the four biggest pain points we heard about from you regarding this structure:</span></p>
<p><b>One agent, many names.</b> The same agent shows up as <code>TestAgent.bot-meta.xml</code>, <code>v1.botVersion-meta.xml</code>, <code>TestAgent_v1</code>, and <code>TestAgent.agent</code>. Deployment and retrieval operations can fail unless your tooling understands how these names correspond and strictly adheres to a complex naming structure. If you write your manifest by hand, every new version also adds a <code>GenAiPlannerBundle</code> member and an <code>AiAuthoringBundle</code> member to it.</p>
<p><b>Generated suffixes everywhere.</b> Every subagent and action in a version gets a unique name with a generated suffix, such as <code>ServiceCustomerVerification_1796152b9540575</code>. In our one-version sample, the planner bundle contains 37 suffixed names, used 111 times, plus 33 suffixed folders. The suffixes mean nothing to you. Each version also gets its own suffixes, so comparing two versions shows changes that you never made.</p>
<p><b>Messages hidden in dialogs.</b><span style="font-weight: 400"> To find your agent&#8217;s welcome message, you have to dig through a dialog, its steps, and its messages. Each one has its own generated identifier.</span></p>
<p><b>Folder names that move.</b> At API version 67.0 and earlier, the newest authoring bundle has no version number, while older ones do. For example, once TestAgent has four versions, its newest bundle is <code>TestAgent</code>, and the older ones are <code>TestAgent_1</code>, <code>_2</code>, and <code>_3</code>. When you create a version, a different folder becomes the unnumbered one. So the same bundle can have a different name from one retrieve to the next.</p>
<h2>What&#8217;s new in API version 68.0</h2>
<p><span style="font-weight: 400">API version 68.0 gives each agent a simpler shape. One metadata type holds the agent, and one metadata type holds everything that belongs to a version.</span></p>
<table>
<tbody>
<tr>
<td><b>Metadata type</b></td>
<td><b>What it represents</b></td>
<td><b>Member name</b></td>
</tr>
<tr>
<td><code>AiAgentDefinition</code></td>
<td>The agent: its type, description, context variables, and other agent-level settings</td>
<td><code>TestAgent</code></td>
</tr>
<tr>
<td><code>AiAgentDefinitionVersion</code></td>
<td>One version of the agent: its settings, conversation variables, and messages, plus an inline <code>&lt;planner&gt;</code> element with its subagents and actions</td>
<td><code>TestAgent#1</code></td>
</tr>
<tr>
<td><code>AiAuthoringBundle</code></td>
<td>The Agent Script source that you edit (unchanged)</td>
<td><code>TestAgent_1</code></td>
</tr>
</tbody>
</table>
<p>In a Salesforce DX project, the files for these types live in the <code>aiAgents</code>, <code>aiAgentDefinitionVersions</code>, and <code>aiAuthoringBundles</code> folders.</p>
<p>At API version 68.0, Agentforce agents use the new types, and the <code>Bot</code> and <code>BotVersion</code> types are for classic Einstein Bots. If you retrieve or deploy an Agentforce agent as <code>Bot</code> or <code>BotVersion</code> at this API version, you get an error that tells you to use <code>AiAgentDefinition</code> and <code>AiAgentDefinitionVersion</code> instead. To keep using the old types, stay on API version 67.0.</p>
<h3>Before and after: the folder structure</h3>
<p><span style="font-weight: 400">Here&#8217;s the same agent retrieved at API version 68.0.</span></p>
<pre language="text">├── aiAgents
│   └── TestAgent.aiAgentDefinition-meta.xml
├── aiAgentDefinitionVersions
│   └── TestAgent#1
│       ├── TestAgent#1.aiAgentDefinitionVersion-meta.xml
│       ├── agentGraph
│       │   └── TestAgent_v1_graph.json
│       ├── agentScript
│       │   └── TestAgent_v1_definition.agent
│       └── localActions
│           ├── AccountManagement
│           ├── CaseManagement
│           ├── DeliveryIssues
│           │   ├── AnswerQuestionsWithKnowledge
│           │   │   ├── input
│           │   │   │   └── schema.json
│           │   │   └── output
│           │   │       └── schema.json
│           │   └── ... 5 more actions
│           ├── GeneralFAQ
│           ├── OrderInquiries
│           ├── ReservationManagement
│           └── ServiceCustomerVerification
│               ├── SendEmailVerificationCode
│               └── VerifyCustomer
└── aiAuthoringBundles
    └── TestAgent_1
        ├── TestAgent_1.agent
        └── TestAgent_1.bundle-meta.xml
</pre>
<p>If you know the old types, here&#8217;s how they map:</p>
<ul>
<li>The agent-level part of <code>Bot</code> becomes <code>AiAgentDefinition</code>.</li>
<li>Each bot version and its <code>GenAiPlannerBundle</code> merge into one <code>AiAgentDefinitionVersion</code>.</li>
<li>The planner is no longer a separate component. Instead, it&#8217;s a <code>&lt;planner&gt;</code> element inside the version file.</li>
<li><code>AiAuthoringBundle</code> <span>remains largely unchanged, except that every </span><code>AiAuthoringBundle</code><span> file name also explicitly names its version as a suffix</span><span>.</span></li>
</ul>
<p>A key enhancement in API version 68.0 is support for selecting specific version members using the <code>#</code> delimiter. In your <code>package.xml</code> manifest or with the <code>--metadata</code> flag in Salesforce CLI, you can target an individual agent version, retrieve every version of a specific agent, or query across all versions for all agents, as shown in the table below.</p>
<table>
<tbody>
<tr>
<td><b>Member</b></td>
<td><b>What it selects</b></td>
</tr>
<tr>
<td><code>TestAgent#1</code></td>
<td>Version 1 of TestAgent</td>
</tr>
<tr>
<td><code>TestAgent#*</code></td>
<td>All versions of TestAgent</td>
</tr>
<tr>
<td><code>*</code></td>
<td>All versions of all agents</td>
</tr>
</tbody>
</table>
<p>A few things stand out.</p>
<ul>
<li>Everything that belongs to version 1, except its Agent Script source, lives in one folder, <code>TestAgent#1</code>.</li>
<li>Subagent and action folders use the names that you gave them, like <code>DeliveryIssues/AnswerQuestionsWithKnowledge</code>.</li>
<li>The authoring bundle folder always carries its version number. <code>TestAgent_1</code> keeps its name when you add version 2.</li>
</ul>
<p>The content itself didn&#8217;t change. When the two retrieves were compared, all 52 input and output schemas, the agent graph, and the <code>.agent</code> source file were identical. Only the names and the packaging changed.</p>
<h3>Before and after: subagents and actions</h3>
<p><span style="font-weight: 400">The biggest difference is inside the files. Here&#8217;s the Service Customer Verification subagent and one of its actions in the API version 67.0 planner bundle. Some elements have been trimmed to save space.</span></p>
<pre language="xml">&lt;localTopics&gt;
    &lt;fullName&gt;ServiceCustomerVerification_1796152b9540575&lt;/fullName&gt;
    &lt;canEscalate&gt;false&lt;/canEscalate&gt;
    &lt;description&gt;Verifies the customer's identity before granting access to sensitive data. ...&lt;/description&gt;
    &lt;developerName&gt;ServiceCustomerVerification_1796152b9540575&lt;/developerName&gt;
    &lt;!-- instructions omitted --&gt;
    &lt;language&gt;en_US&lt;/language&gt;
    &lt;localActionLinks&gt;
        &lt;functionName&gt;SendEmailVerificationCode_1724f12735f68c6&lt;/functionName&gt;
    &lt;/localActionLinks&gt;
    &lt;localActionLinks&gt;
        &lt;functionName&gt;VerifyCustomer_1726b9bee0044be&lt;/functionName&gt;
    &lt;/localActionLinks&gt;
    &lt;localActions&gt;
        &lt;fullName&gt;VerifyCustomer_1726b9bee0044be&lt;/fullName&gt;
        &lt;description&gt;Verifies whether the verification code entered by the user matches the code sent to the user's email address.&lt;/description&gt;
        &lt;developerName&gt;VerifyCustomer_1726b9bee0044be&lt;/developerName&gt;
        &lt;invocationTarget&gt;SvcCopilotTmpl__VerifyCode&lt;/invocationTarget&gt;
        &lt;invocationTargetType&gt;flow&lt;/invocationTargetType&gt;
        &lt;isConfirmationRequired&gt;false&lt;/isConfirmationRequired&gt;
        &lt;isIncludeInProgressIndicator&gt;true&lt;/isIncludeInProgressIndicator&gt;
        &lt;localDeveloperName&gt;VerifyCustomer&lt;/localDeveloperName&gt;
        &lt;masterLabel&gt;Verify Customer&lt;/masterLabel&gt;
        &lt;source&gt;SvcCopilotTmpl__VerifyCustomer&lt;/source&gt;
    &lt;/localActions&gt;
    &lt;!-- SendEmailVerificationCode action omitted --&gt;
    &lt;localDeveloperName&gt;ServiceCustomerVerification&lt;/localDeveloperName&gt;
    &lt;masterLabel&gt;Service Customer Verification&lt;/masterLabel&gt;
    &lt;pluginType&gt;Topic&lt;/pluginType&gt;
&lt;/localTopics&gt;
</pre>
<p>And here&#8217;s the same subagent in the API version 68.0 version file, inside the <code>&lt;planner&gt;</code> element.</p>
<pre language="xml">&lt;localTopics&gt;
    &lt;canEscalate&gt;false&lt;/canEscalate&gt;
    &lt;description&gt;Verifies the customer's identity before granting access to sensitive data. ...&lt;/description&gt;
    &lt;!-- instructions omitted --&gt;
    &lt;language&gt;en_US&lt;/language&gt;
    &lt;localActionLinks&gt;
        &lt;functionName&gt;SendEmailVerificationCode&lt;/functionName&gt;
    &lt;/localActionLinks&gt;
    &lt;localActionLinks&gt;
        &lt;functionName&gt;VerifyCustomer&lt;/functionName&gt;
    &lt;/localActionLinks&gt;
    &lt;!-- SendEmailVerificationCode action omitted --&gt;
    &lt;localActions&gt;
        &lt;description&gt;Verifies whether the verification code entered by the user matches the code sent to the user's email address.&lt;/description&gt;
        &lt;invocationTarget&gt;SvcCopilotTmpl__VerifyCode&lt;/invocationTarget&gt;
        &lt;invocationTargetType&gt;flow&lt;/invocationTargetType&gt;
        &lt;isConfirmationRequired&gt;false&lt;/isConfirmationRequired&gt;
        &lt;isIncludeInProgressIndicator&gt;true&lt;/isIncludeInProgressIndicator&gt;
        &lt;localDeveloperName&gt;VerifyCustomer&lt;/localDeveloperName&gt;
        &lt;masterLabel&gt;Verify Customer&lt;/masterLabel&gt;
        &lt;source&gt;SvcCopilotTmpl__VerifyCustomer&lt;/source&gt;
    &lt;/localActions&gt;
    &lt;localDeveloperName&gt;ServiceCustomerVerification&lt;/localDeveloperName&gt;
    &lt;masterLabel&gt;Service Customer Verification&lt;/masterLabel&gt;
    &lt;pluginType&gt;Topic&lt;/pluginType&gt;
&lt;/localTopics&gt;
</pre>
<p>The suffixed <code>fullName</code> and <code>developerName</code> elements are gone. Now <code>localDeveloperName</code> is the name, and links between subagents and actions use it too. In this sample, all 37 suffixed subagent and action names disappeared. Because subagent and action names stay the same from one version to the next, diffs between versions get much smaller and easier to review.</p>
<h3>Before and after: welcome and error messages</h3>
<p>In API version 67.0, your welcome message sits inside a <code>Welcome</code> dialog in the bot version file.</p>
<pre language="xml">&lt;botDialogs&gt;
    &lt;botSteps&gt;
        &lt;botMessages&gt;
            &lt;message&gt;Hi, I'm an AI service assistant. How can I help you?&lt;/message&gt;
            &lt;messageIdentifier&gt;7c57d39d-5d76-40d9-a8e8-181b1a20b657&lt;/messageIdentifier&gt;
        &lt;/botMessages&gt;
        &lt;stepIdentifier&gt;42386b78-770c-4911-8ad9-60f664fdeab0&lt;/stepIdentifier&gt;
        &lt;type&gt;Message&lt;/type&gt;
    &lt;/botSteps&gt;
    &lt;botSteps&gt;
        &lt;stepIdentifier&gt;fdf3a8b3-f4b0-4329-a7f5-349f387b84db&lt;/stepIdentifier&gt;
        &lt;type&gt;Wait&lt;/type&gt;
    &lt;/botSteps&gt;
    &lt;developerName&gt;Welcome&lt;/developerName&gt;
    &lt;isPlaceholderDialog&gt;false&lt;/isPlaceholderDialog&gt;
    &lt;label&gt;Welcome&lt;/label&gt;
    &lt;showInFooterMenu&gt;false&lt;/showInFooterMenu&gt;
&lt;/botDialogs&gt;
&lt;!-- ... --&gt;
&lt;entryDialog&gt;Welcome&lt;/entryDialog&gt;
</pre>
<p><span style="font-weight: 400">In API version 68.0, it&#8217;s one line.</span></p>
<pre language="xml">&lt;welcomeMessage&gt;Hi, I'm an AI service assistant. How can I help you?&lt;/welcomeMessage&gt;
</pre>
<p>The version file has three simple message elements: <code>welcomeMessage</code>, <code>errorMessage</code>, and <code>escalationMessage</code>. They hold the first message of the <code>Welcome</code>, <code>Error_Handling</code>, and <code>Transfer_To_Agent</code> dialogs. When you deploy, Salesforce builds the dialogs from these messages for you.</p>
<h3>Before and after: package.xml</h3>
<p><span style="font-weight: 400">Now suppose that TestAgent has four versions. It also uses a global subagent and two global actions, which call an Apex class and a prompt template. Here&#8217;s a hand-written API version 67.0 manifest for it.</span></p>
<pre language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Package xmlns="http://soap.sforce.com/2006/04/metadata"&gt;
    &lt;types&gt;
        &lt;members&gt;TestAgent&lt;/members&gt;
        &lt;name&gt;Bot&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;TestAgent_v1&lt;/members&gt;
        &lt;members&gt;TestAgent_v2&lt;/members&gt;
        &lt;members&gt;TestAgent_v3&lt;/members&gt;
        &lt;members&gt;TestAgent_v4&lt;/members&gt;
        &lt;name&gt;GenAiPlannerBundle&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;TestAgent_1&lt;/members&gt;
        &lt;members&gt;TestAgent_2&lt;/members&gt;
        &lt;members&gt;TestAgent_3&lt;/members&gt;
        &lt;members&gt;TestAgent&lt;/members&gt;
        &lt;name&gt;AiAuthoringBundle&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;Custom_Subagent&lt;/members&gt;
        &lt;name&gt;GenAiPlugin&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;SayHello&lt;/members&gt;
        &lt;name&gt;ApexClass&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;Custom_PromptTemplate&lt;/members&gt;
        &lt;name&gt;GenAiPromptTemplate&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;Say_Hello&lt;/members&gt;
        &lt;members&gt;Custom_PromptTemplate&lt;/members&gt;
        &lt;name&gt;GenAiFunction&lt;/name&gt;
    &lt;/types&gt;
    &lt;version&gt;67.0&lt;/version&gt;
&lt;/Package&gt;
</pre>
<p><span style="font-weight: 400">That&#8217;s 7 types and 14 members. At API version 68.0, you name the agent and its versions.</span></p>
<pre language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Package xmlns="http://soap.sforce.com/2006/04/metadata"&gt;
    &lt;types&gt;
        &lt;members&gt;TestAgent&lt;/members&gt;
        &lt;name&gt;AiAgentDefinition&lt;/name&gt;
    &lt;/types&gt;
    &lt;types&gt;
        &lt;members&gt;TestAgent#*&lt;/members&gt;
        &lt;name&gt;AiAgentDefinitionVersion&lt;/name&gt;
    &lt;/types&gt;
    &lt;version&gt;68.0&lt;/version&gt;
&lt;/Package&gt;
</pre>
<p>The <code>#*</code> wildcard picks up every version, so you don&#8217;t need to edit the manifest when you add one.</p>
<h3>How to retrieve Agentforce metadata dependencies with the Salesforce CLI</h3>
<p>What about the Apex class, the prompt template, and the global subagent and actions? Each agent version knows what it uses, so you can ask the Metadata API to bring those along. With Salesforce CLI, add the <code>--root-type-with-dependencies</code> flag and set it to <code>AiAgentDefinitionVersion</code>. You can use it with a manifest or with the <code>--metadata</code> flag. Using the <code>#</code> delimiter syntax and the new flag requires Salesforce CLI version 2.149.9 or later, so be sure to execute <code>sf update</code> prior to running these commands.</p>
<pre language="bash"># With the manifest above
sf project retrieve start --manifest manifest/package.xml --root-type-with-dependencies AiAgentDefinitionVersion --target-org my-sandbox

# Without a manifest, for version 1 of TestAgent
sf project retrieve start --metadata "AiAgentDefinitionVersion:TestAgent#1" --root-type-with-dependencies AiAgentDefinitionVersion --target-org my-sandbox
</pre>
<p>In both cases, the retrieve then adds what each version depends on. That includes its parent <code>AiAgentDefinition</code> and its <code>AiAuthoringBundle</code>, which holds the Agent Script source that you edit. It also includes the flows, Apex classes, and prompt templates that its actions call, and any global subagents and actions that it uses. The compiled Agent Script file in the version&#8217;s <code>agentScript</code> folder isn&#8217;t a dependency. It&#8217;s part of the version, so you get it with or without the flag.</p>
<p>Without the flag, you get only what you name. For example, <code>--metadata AiAgentDefinitionVersion</code> on its own retrieves every version of every agent. It doesn&#8217;t bring each version&#8217;s parent <code>AiAgentDefinition</code>, its <code>AiAuthoringBundle</code>, or anything else that it uses, so name the ones that you need too. If you name versions with <code>--metadata</code>, put the value in double quotes so that your shell doesn&#8217;t treat <code>#</code> or <code>*</code> as special characters. Without a manifest, Salesforce CLI uses the <code>sourceApiVersion</code> in your <code>sfdx-project.json</code> file, so set it to 68.0.</p>
<p>Retrieving with dependencies isn&#8217;t new. From API version 64.0 (Summer &#8217;25) through 67.0, you could do it only for a whole <code>Bot</code>, so you always got every version of the agent. Now you can do it for a single version, so you can move exactly the version that you want, plus what it needs.</p>
<p>A few limits apply. You can make up to 25 retrieve requests with dependencies per day, and each request can cover up to 100 components. The retrieve also goes only one level deep. It adds what each version uses directly, but not what those dependencies use in turn. For example, if an action calls an Apex class that uses another Apex class, you get only the first class. Add other metadata that your agent needs, such as custom objects or Data 360 dependencies, to your manifest or <code>--metadata</code> list.</p>
<h2>Deployment validations in API version 68.0</h2>
<p><span style="font-weight: 400">The new types come with a few deployment validation rules. Most of them protect you from half-deployed agents. Deployment of agents on API 68.0 will fail if:</span></p>
<p><b>You mix the old and new formats.</b> Pick either API 67.0 or API 68.0 format. Don&#8217;t try to deploy <code>Bot</code> or <code>BotVersion</code> and the new types for the same agent in the same deployment.</p>
<p><b>You deploy the definition without at least one version.</b> A version can&#8217;t deploy unless its <code>AiAgentDefinition</code> already exists in the target org or is in the same deployment. A new definition also needs at least one version. The first time you deploy an agent to an org, include the definition, not just a version.</p>
<p><b>Your Agent Script source is not included.</b> For agents built with Agent Script, you must deploy the version’s <code>AiAuthoringBundle</code> along with the <code>AiAgentDefinitionVersion</code>. Note the <code>agentScript</code> folder inside the version is a compiled copy, not the source that you edit. Storing the compiled copy in your source control is not recommended.</p>
<p><b>You don’t set the agent user correctly.</b> Your retrieved metadata includes the agent username from the source org. For a draft agent, use <a href="https://developer.salesforce.com/docs/ai/agentforce/guide/string-replace-example.html"><u>string replacement</u></a> to swap in a username from the target org. Committed agents can&#8217;t be edited, so to give one a new user, create a new version and add the user there. Either way, the agent needs a user before it can run in the new org.</p>
<h2>Migration tips for switching to API 68.0</h2>
<ul>
<li><b>Retrieve instead of converting by hand.</b> Run <code>sf update</code> to get the latest Salesforce CLI, set your manifest version and the <code>sourceApiVersion</code> in your <code>sfdx-project.json</code> file to 68.0, and retrieve. Salesforce writes the new structure for you.</li>
<li><b>Make the switch in its own commit.</b> Every agent folder and file name changes, so keep the switch separate from other work. Real changes won&#8217;t get lost in the rename during code review.</li>
<li><b>Update scripts that read agent XML.</b> If your pipeline parses <code>GenAiPlannerBundle</code> files or relies on suffixed names, point it at the <code>&lt;planner&gt;</code> element in the version file and use <code>localDeveloperName</code>.</li>
</ul>
<h2>Conclusion</h2>
<p><span style="font-weight: 400">API version 68.0 gives every Agentforce agent a simpler, more predictable metadata shape. You get one definition per agent, one folder per version, names without generated suffixes, and messages that you can read at a glance. Your manifests get shorter, your diffs get smaller, and you can retrieve a single version with everything it depends on. Try it in a Winter &#8217;27 org: retrieve one of your agents at API version 68.0 and compare it with what&#8217;s in your source control today.</span></p>
<h2>Resources</h2>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Release notes: </span><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_agentforce_metadata.htm&amp;release=264&amp;type=5"><span style="font-weight: 400">Move Agents Between Orgs More Easily with Simplified Agent Metadata Types</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Agentforce Developer Guide: </span><a href="https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-deploy-metadata.html"><span style="font-weight: 400">Use Metadata to Move an Agent to a New Org</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Agentforce Developer Guide: </span><a href="https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-api-v67-earlier.html"><span style="font-weight: 400">Define Agent Metadata (v67 and Earlier)</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Agentforce Developer Guide: </span><a href="https://developer.salesforce.com/docs/ai/agentforce/guide/string-replace-example.html"><span style="font-weight: 400">Example &#8211; Configure String Replacement for Agent Username</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Salesforce CLI Command Reference: </span><a href="https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm#cli_reference_project_retrieve_start_unified"><span style="font-weight: 400">project retrieve start</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/metadata-coverage"><span style="font-weight: 400">Metadata Coverage Report</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Blog: </span><a href="https://developer.salesforce.com/blogs/2026/05/new-agentforce-metadata-and-development-lifecycle"><span style="font-weight: 400">The New Agentforce Metadata and Development Lifecycle</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Blog: </span><a href="https://developer.salesforce.com/blogs/2026/02/agent-script-decoded-intro-to-agent-script-language-fundamentals"><span style="font-weight: 400">Intro to Agent Script Language Fundamentals</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Trailhead: </span><a href="https://trailhead.salesforce.com/content/learn/projects/create-an-agent-using-pro-code-tools/create-an-agent-from-your-dx-project"><span style="font-weight: 400">Create and Activate Your Agent with Agent Script Techniques</span></a></li>
</ul>
<h2>About the author</h2>
<p><b>Shreyas Ramesh</b><span style="font-weight: 400"> serves as a Lead Software Engineer with Salesforce AI in San Francisco. He is also a Fellow of the Institute of Analytics (FIoA) alongside BCS, The Chartered Institute for IT. Within the Agentforce Core Platform group, Shreyas directs the architecture for Agentforce Metadata, Agentforce Versioning, and additional design-time functionality aimed at providing enterprise-grade application lifecycle management (ALM) for Agentforce. Connect with Shreyas via </span><a href="https://www.linkedin.com/in/rshreyas2/"><span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/agentforce-metadata-types-in-winter-27-dive-into-aiagentdefinition">Agentforce Metadata Types in Winter &#8217;27: Dive into AiAgentDefinition</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/agentforce-metadata-types-in-winter-27-dive-into-aiagentdefinition/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207363</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261110110101/Generic-B-8-e1794337302733.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261110110101/Generic-B-8-e1794337302733.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Accelerate Agent-Driven Development with the Headless Toolkit</title>
		<link>https://developer.salesforce.com/blogs/2026/11/accelerate-agent-driven-development-with-the-headless-toolkit</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/accelerate-agent-driven-development-with-the-headless-toolkit#respond</comments>
		<pubDate>Tue, 10 Nov 2026 16:00:07 +0000</pubDate>
		<dc:creator><![CDATA[Mohith Shrivastava]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[Headless 360]]></category>
		<category><![CDATA[New Developments]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Code Quality]]></category>
		<category><![CDATA[Coding agents]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[Headless Toolkit]]></category>
		<category><![CDATA[MCP]]></category>
		<category><![CDATA[Model context protocol]]></category>
		<category><![CDATA[Salesforce Development]]></category>
		<category><![CDATA[Software Development Lifecycle]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207306</guid>
		<description><![CDATA[<p>Learn how to accelerate agent-driven Salesforce development with the Headless Toolkit. Explore a seven-stage lifecycle using Salesforce skills, MCP servers, and developer tools to build, test, review, and deploy apps and agents.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/accelerate-agent-driven-development-with-the-headless-toolkit">Accelerate Agent-Driven Development with the Headless Toolkit</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="font-weight: 400">The way developers build on Salesforce is changing. Coding agents like Claude Code, Codex, Cursor, and Agentforce Vibes can now write Apex, Lightning web components (LWC), flows, and metadata. But on their own, these coding agents often drift from platform best practices, miss what already exists in your org, and spend extra tokens hunting for context. They also lack important tools to check and ship their work.</span></p>
<p><span style="font-weight: 400">The </span><a href="https://developer.salesforce.com/docs/platform/headless-get-started/guide/headless-get-started.html"><span style="font-weight: 400">Headless Toolkit</span></a><span style="font-weight: 400"> closes those gaps for building Salesforce apps and agents. The </span><a href="https://github.com/forcedotcom/sf-skills"><span style="font-weight: 400">Salesforce Skills Library</span></a><span style="font-weight: 400"> (sf-skills) gives coding agents Salesforce expertise on demand. </span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/hosted-mcp-servers-overview.html"><span style="font-weight: 400">Hosted Model Context Protocol (MCP) Servers</span></a><span style="font-weight: 400"> give them just the org context they need. The </span><a href="https://github.com/salesforcecli"><span style="font-weight: 400">Salesforce CLI</span></a><span style="font-weight: 400"> lets them test, validate, and deploy their changes.</span></p>
<p><span style="font-weight: 400">This post offers one way to put the Headless Toolkit to work: an agent-driven development lifecycle with seven stages. For each stage, you&#8217;ll see what changes and which skills and tools to use. You&#8217;ll also see what to add each time the agent gets something wrong. This approach isn&#8217;t the only way, so experiment with the skills and tools covered in this post and adapt the parts that work for your team.</span></p>
<p><span style="font-weight: 400">The post starts with how the lifecycle works, </span><span style="font-weight: 400">defining what a harness is and how it fits into the workflow</span><span style="font-weight: 400">. It then explains how to set up the skills and walks through each stage: ground, specify, build, verify, review, release, and observe.</span></p>
<h2>From a linear process to an agent-driven loop</h2>
<p><span style="font-weight: 400">On a traditional Salesforce project, work moves in a line. A requirement becomes a user story in Jira or another tracker, a developer builds it, QA tests it, and someone deploys it. The context for each change is spread across the story, Slack threads, design docs, the org itself, and the memory of people who&#8217;ve worked on it. A developer knows where to look. An agent can use only what it can reach.</span></p>
<p><span style="font-weight: 400">With coding agents, the line becomes a loop. The agent does more of the building, testing, and deploying, and your role shifts toward directing it and judging what it produces. Directing can be as simple as one prompt that states the goal and how the agent should check its own result. Your attention moves to a few decision points: approving the spec, reviewing the proposed design and architecture, judging review findings, and approving production releases.</span></p>
<p><span style="font-weight: 400">Two ideas make the loop work. First, each stage leaves an artifact the next stage can read, such as a spec, a test, or a review report, so a new session doesn&#8217;t start from zero. Second, every mistake the agent makes leaves something behind, whether the mistake is caught in verification, review, or production. That might be a new test, a new rule, or a new spec for the next change.</span></p>
<p>			  <span class="postimagessection_specify alignnone size-full wp-image-207310" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261105105354/image1_7c5ea2-e1793904846277.png" class="postimages" width="1000" height="704" alt="A diagram showing seven lifecycle stages around your project harness, with Observe feeding back into Ground." /><br />
			  </span></p>
<p><span style="font-weight: 400">Use this table as your map of the lifecycle. Each section below covers its row in more detail.</span></p>
<table>
<tbody>
<tr>
<td><b>Stage</b></td>
<td><b>Before coding agents</b></td>
<td><b>In an agent-driven lifecycle</b></td>
<td><b>Artifact in the repo</b></td>
</tr>
<tr>
<td><b>1. Ground</b></td>
<td><span style="font-weight: 400">Context is spread across stories, docs, and people</span></td>
<td><span style="font-weight: 400">Business terms are written down, and the agent can look up org metadata</span></td>
<td><span>Feature map, </span><code>ontology.yaml</code><span>, </span><code>AGENTS.md</code></td>
</tr>
<tr>
<td><b>2. Specify</b></td>
<td><span style="font-weight: 400">The plan stays with the developer and architect and spread in architecture docs</span></td>
<td><span style="font-weight: 400">A short spec captures changes and architecture decisions; you review it and keep it up to date for agents and humans</span></td>
<td><span style="font-weight: 400">Living spec</span></td>
</tr>
<tr>
<td><b>3. Build</b></td>
<td><span style="font-weight: 400">One developer builds each piece in order</span></td>
<td><span style="font-weight: 400">One agent builds step-by-step, or subagents build in parallel for large features</span></td>
<td><span style="font-weight: 400">Metadata and code, plus a dependency graph for parallel builds</span></td>
</tr>
<tr>
<td><b>4. Verify</b></td>
<td><span style="font-weight: 400">QA tests near the end</span></td>
<td><span style="font-weight: 400">The agent runs independent checks and fixes failures as it goes</span></td>
<td><span style="font-weight: 400">Test results, scan reports</span></td>
</tr>
<tr>
<td><b>5. Review</b></td>
<td><span style="font-weight: 400">Humans read every line</span></td>
<td><span style="font-weight: 400">A separate reviewer agent (an adversarial agent) goes first; humans judge its findings</span></td>
<td><span style="font-weight: 400">Review report with file:line evidence</span></td>
</tr>
<tr>
<td><b>6. Release</b></td>
<td><span style="font-weight: 400">Teams deploy with change sets and manual runbooks, or automate via CI/CD</span></td>
<td><span style="font-weight: 400">The agent validates and promotes; a human owns the production gate</span></td>
<td><span style="font-weight: 400">Validated deploy</span></td>
</tr>
<tr>
<td><b>7. Observe</b></td>
<td><span style="font-weight: 400">The team waits for users to file tickets</span></td>
<td><span style="font-weight: 400">The agent reads logs and traces; findings from users or the agent start the next loop</span></td>
<td><span style="font-weight: 400">Findings, new specs</span></td>
</tr>
</tbody>
</table>
<h2>Two harnesses: the agent&#8217;s and yours</h2>
<p><span style="font-weight: 400">A harness is the layer around a model that gives it tools and manages the context it sees. Every coding agent ships with one.</span><a href="https://code.claude.com/docs/en/how-claude-code-works"> <span style="font-weight: 400">Claude Code</span></a><span style="font-weight: 400">, for example, gives the model built-in tools to read and edit files, search code, run commands, and orchestrate multiple agents. It also compacts long conversations and asks permission before actions you haven&#8217;t allowed. You don&#8217;t build this layer, but you can configure it, for example with permission modes and settings.</span></p>
<p><span style="font-weight: 400">Your project adds a second layer on top, and that&#8217;s the layer this post is about:</span></p>
<p><span>Your project adds a second layer on top, and that&#8217;s the layer this post is about:</span></p>
<ul>
<li><b><span>Skills</span></b><span> that teach the agent Salesforce tasks, such as the ones in sf-skills.</span></li>
<li><b><span>Instructions</span></b><span> in </span><code><span>AGENTS.md</span></code><span> or </span><code><span>CLAUDE.md</span></code><span>, plus your ontology (business-specific vocabulary) and feature map.</span></li>
<li><b><span>Tools</span></b><span> such as the Salesforce CLI, Salesforce Hosted MCP Servers, and the Apex language server.</span></li>
<li><b><span>Checks</span></b><span> such as tests, Code Analyzer rules, hooks, and quality gates.</span></li>
</ul>
<p><span>The Headless Toolkit supplies most of these pieces. You add the instructions and checks that are specific to your org.</span></p>
<p><span>The agent&#8217;s built-in harness is the same for everyone who uses that agent. Your project harness is what makes it effective on your org, and it&#8217;s never finished. Here&#8217;s a small example instructions file, </span><code><span>AGENTS.md</span></code><span>, to start from.</span></p>
<pre language="text"># Agent instructions
- Check ontology.yaml before mapping a business term to a Salesforce object.
- Features live in force-app/&lt;feature&gt;/. Update docs/feature-map.md in the same change.

## Hard rules
- All SOQL in Apex runs WITH USER_MODE.
- Never hardcode record IDs. Use Custom Metadata, Custom Labels, or Custom Settings.
</pre>
<p><span>Keep both layers lean. Models get less accurate as the context window fills, an effect researchers call</span><a href="https://www.trychroma.com/research/context-rot"> <u>context rot</u></a><span>. In my experience, deep technical work goes best under roughly 300K tokens for most models. Skills help because the agent loads a skill&#8217;s full instructions only when it uses that skill. In Claude Code, set </span><code>disable-model-invocation: true</code><span> on skills you only run by hand, and run </span><b><code>/context</code></b><span> to check usage.</span></p>
<p><span style="font-weight: 400">Newer models also now need less prompting than most of us still give them. For Claude Opus 5 and Fable 5, </span><a href="https://claude.dev/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models/"><span style="font-weight: 400">over 80% of the Claude Code system prompt</span></a><span style="font-weight: 400"> was removed with no measurable drop in its coding evals.</span></p>
<h2>Set up the Salesforce Skills Library</h2>
<p><span style="font-weight: 400">A skill is a folder of instructions, scripts, and reference files that teaches an agent a specific task. The Salesforce Skills Library holds more than 250 skills and follows the open</span><a href="https://agentskills.io/"> <span style="font-weight: 400">Agent Skills specification</span></a><span style="font-weight: 400">, so it works with any agent that supports skills. </span><span style="font-weight: 400">If you use Agentforce Vibes, the skills come pre-installed with automatic updates</span><span style="font-weight: 400">. In Claude Code, install the plugins for the stages you use, and add standalone skills with npx, which also works for Codex, Cursor, and OpenCode.</span></p>
<pre language="bash">/plugin install salesforce-development@claude-plugins-official

/plugin marketplace add forcedotcom/sf-skills
/plugin install salesforce-code-quality@salesforce
/plugin install experience-lwc@salesforce
/plugin install dx-devops@salesforce
/plugin install agentforce-adlc@salesforce
/plugin install platform-observability@salesforce

npx skills add forcedotcom/sf-skills --skill dx-org-analyze external-diagram-mermaid-generate platform-docs-get dx-apexguru-scan
</pre>
<p><span>Here&#8217;s what each plugin covers:</span></p>
<ul>
<li><code><span>salesforce-development:</span></code><span> metadata, Apex, Flow, permissions, tests, and deploys.</span></li>
<li><code><span>salesforce-code-quality:</span></code><span> Code Analyzer. (You can also include the </span><code><span>architecture-review</span></code><span> subagent to review architecture.)</span></li>
<li><code><span>experience-lwc:</span></code><span> LWC generation, React or Angular apps, accessibility tests, and security validation.</span></li>
<li><code><span>dx-devops:</span></code><span> DevOps Center work items, pipelines, test suites, and quality gates.</span></li>
<li><code><span>agentforce-adlc</span></code><span> and </span><code><span>platform-observability:</span></code><span> Agentforce testing and tracing.</span></li>
</ul>
<p><span style="font-weight: 400">Some skills call Salesforce Hosted MCP Servers in your org, and those servers are off by default. Your coding agent may not function properly without turning on the MCP servers. To do so, go to Setup, enter </span><b>MCP Servers</b><span style="font-weight: 400"> in Quick Find, open </span><b>MCP Servers</b><span style="font-weight: 400"> under API Catalog, and turn on the MCP servers your skills reference. Activation can take up to two minutes. </span></p>
<h2>Stage 1: Ground the agent in your business and org</h2>
<p><span style="font-weight: 400">An agent starts every session without knowing which objects matter or what your business means by a &#8220;customer.&#8221; Grounding gives it that knowledge.</span></p>
<p><span>Start with structure. The default Salesforce DX project groups files by type, such as all Apex in one folder. Try grouping them by business capability instead, with folders like </span><code>customer_care</code><span> and </span><code>field_service</code><span>. If you can&#8217;t restructure, add a feature map: a short file that lists the Apex, LWC, flows, permissions, and tests behind each feature.</span></p>
<p><span style="font-weight: 400">Next, write down what the agent can&#8217;t guess. Coding agents know Salesforce, but they don&#8217;t reliably know </span><span style="font-weight: 400">how your business terms map to Salesforce</span><span style="font-weight: 400">. Is a &#8220;customer&#8221; an Account or a Contact? Keep a small </span><span style="font-weight: 400">ontology.yaml</span><span style="font-weight: 400"> for those terms, and tell the agent to check it.</span></p>
<pre language="yaml">terms:
  customer:
    meaning: context_dependent
    resolve:
      homeowner_context: "Account is the household; Contact is the resident."
      enterprise_sales_context: "Account (RecordType=Business) is the B2B customer."
    never_assume: "Customer == Contact"
  device:
    sf: Asset
    note: "An installed unit. Its catalog definition is Product2."
</pre>
<h3><span style="font-weight: 400">Look up what already exists in your org</span></h3>
<p><span>Objects and flows created in Setup aren&#8217;t in your repo until someone retrieves them. The</span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/references/reference/metadata-grounding.html"> <u>Metadata Grounding MCP Server</u></a><span> (Beta) lets the agent find them first. The agent calls </span><code>describe_metadata</code><span> to list types, </span><code>search_metadata</code><span> to search in plain language, and </span><code>query_metadata</code><span> to fetch full records. Use it to avoid duplicates and to draft your feature map and ontology from the real org.</span></p>
<p><span>The server is read-only and returns only what the signed-in user can access. Its results come from the Salesforce Catalog index, so very recent changes can lag. It isn&#8217;t available in scratch orgs or in Developer Edition orgs with namespaces, and it requires Data 360, API access, and Salesforce Catalog. Turn it on in Setup with the other MCP servers.</span></p>
<p><b><span>Skills to use:</span></b><span> </span><code><span>platform-metadata-grounding-get </span></code><span>finds metadata that already exists in a Salesforce org by meaning, when you do not know its exact API name</span><code><span>.</span></code><span> </span><code><span>dx-org-analyze</span></code><span> inventories an org&#8217;s metadata, permissions, and packages. </span><code><span>external-diagram-mermaid-generate</span></code><span> turns your data model into a text diagram you can keep in the repo.</span></p>
<p><b><span>Improve the harness:</span></b><span> When the agent misreads a business term, add it to the ontology.</span></p>
<h2><span style="font-weight: 400">Stage 2: Specify what to build</span></h2>
<p><span style="font-weight: 400">A plan made in an agent&#8217;s plan mode usually lives in one session. A spec is a file in the repo that humans approve and agents reread, so the decisions survive between sessions.</span></p>
<p><span style="font-weight: 400">Specs come in three common levels. In </span><i><span style="font-weight: 400">spec-first</span></i><span style="font-weight: 400">, you write the spec, build from it, and move on. In </span><i><span style="font-weight: 400">spec-anchored</span></i><span style="font-weight: 400">, you keep the spec and update it as the feature changes. In </span><i><span style="font-weight: 400">spec-as-source</span></i><span style="font-weight: 400">, humans edit only the spec, and code is generated from it.</span></p>
<p><span style="font-weight: 400">For Salesforce, I prefer spec-anchored. In my experience, much of the risk hides in decisions the code doesn&#8217;t show, such as sharing assumptions and which automation owns a field.</span></p>
<p><span style="font-weight: 400">Not sure what to build yet? Ask the agent to interview you until it can resolve all the decisions required to write a spec. You can also use open-source skills like </span><a href="https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md"><span style="font-weight: 400">/grill-me</span></a><span style="font-weight: 400"> for this. Once the spec is finalized, start a new session and build from that spec.</span></p>
<h3><span style="font-weight: 400">When a spec is worth it</span></h3>
<p><span style="font-weight: 400">Not everyone thinks specs are worth the effort, and the critiques are fair. Spec-driven workflows can be overkill for small changes, they can produce Markdown that&#8217;s tedious to review, and a spec doesn&#8217;t stop an agent from skipping instructions. Three habits address those problems:</span></p>
<ul>
<li style="font-weight: 400"><b>Right-size it.</b><span style="font-weight: 400"> For bug fixes and one-file changes, skip the spec. One prompt that states the goal and how to verify it is usually enough. Write a spec when a feature spans several metadata types or several sessions.</span></li>
<li style="font-weight: 400"><b>Record decisions, not a description of the code.</b><span style="font-weight: 400"> Capture what the code can&#8217;t show, such as sharing, which automation owns a field, and data volume. Keep it to a page or less.</span></li>
<li style="font-weight: 400"><b>Check it, don&#8217;t trust it.</b><span style="font-weight: 400"> A spec is advice to the agent, like any instruction. Turn each requirement into a test, and have a reviewer compare the spec with the code, </span><span style="font-weight: 400">so that any requirement the code doesn’t implement fails a test and gets flagged in review.</span></li>
</ul>
<p><b><span>Skills to use:</span></b><span> </span><code>platform-docs-get</code><span> pulls official Salesforce documentation so the spec cites real platform behavior. Here is an unofficial example </span><a href="https://github.com/msrivastav13/salesforce-write-spec-skill"><u>spec-writing skill</u></a><span> that you can take inspiration from.</span></p>
<p><b><span>Improve the harness:</span></b><span> When rework traces back to a decision the spec didn&#8217;t cover, add that topic to your spec template. Common additions are sharing, automation ownership, governor-limit expectations, and data volume.</span></p>
<h2><span style="font-weight: 400">Stage 3: Build step by step or in parallel</span></h2>
<p><span style="font-weight: 400">You have two ways to build with an agent, and neither is always better. Pick the one that fits the feature and the way you like to work.</span></p>
<ul>
<li style="font-weight: 400"><b>One agent, step by step.</b><span style="font-weight: 400"> The agent builds each piece in order while you watch, steer, and review as it goes. This can be easier to follow and keeps you in flow, with no agents to coordinate. It suits bug fixes, small features, and work where each step depends on the last.</span></li>
<li style="font-weight: 400"><b>Subagents in parallel.</b><span style="font-weight: 400"> The agent splits the work across subagents, which are separate agents that each start with a fresh context window. Claude Code often does this on its own, so you rarely need to ask. This can finish large features with independent parts sooner. The trade-off is that you need a clear plan up front, you review more output at once, and every subagent adds cost and waiting time.</span></li>
</ul>
<h3><span style="font-weight: 400">Give each subagent only the context it needs</span></h3>
<p><span style="font-weight: 400">Subagents don&#8217;t make the model smarter by default. Their value is a separate, focused context window. A subagent doesn&#8217;t carry the main session&#8217;s history, so it starts with only what you give it. An accessibility subagent needs the accessibility testing skill, not your Apex, flow, and deployment skills. Each subagent also spends tokens of its own and takes time to gather context. Save them for substantial, standalone work, such as a long audit or a migration. For a small change, one agent is usually faster and cheaper.</span></p>
<p>For example, in Claude Code, you define a<a href="https://code.claude.com/docs/en/sub-agents"> <u>subagent</u></a> as a Markdown file in <code>.claude/agents/</code>. The <code>skills</code> field loads the listed skills when the subagent starts, and the <code>tools</code> field limits what it can do.</p>
<pre language="markdown">---
name: lwc-accessibility-tester
description: Writes and runs Jest accessibility tests for Lightning web components. Use after a component is built.
tools: Read, Write, Edit, Bash
skills:
  - experience-lwc-accessibility-jest-run
---
Test only the components named in the task. Report each failure with its file and line.
</pre>
<h3><span style="font-weight: 400">When parallel pays off</span></h3>
<p><span style="font-weight: 400">Parallel helps only when a feature has independent work, and it pays off once a single session can finish a task without you. Get one session to a passing result first. For a large feature, ask the agent to map the metadata dependency graph from the spec, and review it. Then let subagents build the independent parts at the same time. </span></p>
<p>Keep that work apart with git worktrees. Subagents that edit the same project folder can overwrite each other&#8217;s files. A worktree gives each subagent its own folder and branch in the same repository. In Claude Code, add <code>isolation: worktree</code> to a subagent&#8217;s definition, or start a parallel session with <code>claude --worktree</code>.</p>
<p><b><span>Skills to use:</span></b><span> Either way, give the agent the skill for each piece, such as </span><code>platform-custom-object-generate</code><span>,</span><code> platform-custom-field-generate</code><span>,</span><code> platform-apex-generate</code><span>,</span><code> experience-lwc-generate</code><span>,</span><code> </code>or<code> automation-flow-generate</code><span>.</span><code> platform-metadata-api-context-get</code><span> supplies the exact schema for each metadata type, so the files deploy cleanly.</span></p>
<p><b>Improve the harness:</b><span style="font-weight: 400"> Give the agent only what each piece needs: the schema it depends on, your coding standards, and your test expectations. When it breaks a standard, fix the standards file or skill, not just the code.</span></p>
<h2><span style="font-weight: 400">Stage 4: Verify with independent checks</span></h2>
<p><span style="font-weight: 400">The agent runs checks as it builds, reads the results, and fixes what&#8217;s broken. The checks must be independent tools, not the agent&#8217;s opinion of its own work. </span><span style="font-weight: 400">The agent can run them as skills, or hooks can run them automatically.</span></p>
<ul>
<li><code><span>platform-apex-test-generate</span></code><span> and </span><code><span>platform-apex-test-run</span></code><span> write bulk-safe Apex tests, run them, and drive a test-fix loop.</span></li>
<li><code><span>dx-code-analyzer-run</span></code><span> runs Salesforce Code Analyzer, including PMD and ESLint, and can scan just the files in your git diff.</span></li>
<li><code><span>dx-apexguru-scan</span></code><span> finds performance problems, such as SOQL or DML inside loops, and reports line numbers for each.</span></li>
<li><code><span>design-systems-slds-validate</span></code><span> and </span><code><span>experience-lwc-accessibility-jest-run</span></code><span> check LWC styling and accessibility. </span><code><span>agentforce-test</span></code><span> runs test suites for Agentforce agents.</span></li>
<li><span>For UI tests, the</span><a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforce-ui-script-recorder"><span> </span><u><span>Salesforce UI Script Recorder</span></u></a><span> turns your clicks in an org into a Playwright script.</span></li>
</ul>
<p><span>Give the agent a check it can read. If it can run something that returns pass or fail, or a number to beat, it can keep going without you watching. One example is &#8220;all Apex tests pass and coverage stays above 90%.&#8221; For long background work, </span><code><span>/goal</span></code><span> sets a condition like that, and a separate model checks it after every turn, judging only what the agent has shown.</span></p>
<p><span style="font-weight: 400">Don&#8217;t take &#8220;done&#8221; on trust. When the agent reports back, ask it to show you the command and its output, or a screenshot.</span></p>
<h3><span style="font-weight: 400">Run checks automatically with hooks</span></h3>
<p><span style="font-weight: 400">A skill runs only when the agent decides to use it, but a hook runs every time. A hook is a command your coding agent runs at a set point, such as after each file edit or before it finishes a task. Claude Code and Codex both support hooks. When a check fails, the agent sees the error and fixes it before it moves on.</span></p>
<p>The Salesforce plugins you installed earlier already include hooks. <code>experience-lwc</code> checks each LWC file the agent writes against Salesforce Lightning Design System (SLDS) 2 and Code Analyzer rules. <code>agentforce-adlc</code> checks Agent Script files after every edit. <code>salesforce-development</code> runs Apex language server diagnostics before each deployment.</p>
<p><b>Improve the harness:</b><span style="font-weight: 400"> Every bug that gets past verification is a missing check. Add the test, rule, or evaluation that would have caught it. </span><span style="font-weight: 400">If the check should run every time, make it a hook.</span></p>
<h2><span style="font-weight: 400">Stage 5: Review with a separate agent</span></h2>
<p><span style="font-weight: 400">Agents can produce code faster than people can read it, so review can become the bottleneck. The builder shouldn&#8217;t grade its own work. A separate reviewer agent (an adversarial agent) goes first, and humans focus on its findings.</span></p>
<p><span style="font-weight: 400">Four settings make a reviewer sharper: a </span><b>fresh context</b><span style="font-weight: 400"> without the builder&#8217;s history, </span><b>read-only</b><span style="font-weight: 400"> access, a </span><b>different model</b><span style="font-weight: 400"> when you can, and a </span><b>skill</b><span style="font-weight: 400"> to review against.</span></p>
<p><b><span>Skills to use:</span></b><span> The read-only </span><code>platform-architecture-analyze</code><span> checks sharing, field-level security (FLS), bulkification, and SOQL selectivity, and it cites the file and line for every finding. It grades against the original Trusted, Easy, and Adaptable pillars of</span><a href="https://architect.salesforce.com/docs/architect/well-architected/guide/framework.html"> <u>Salesforce Well-Architected</u></a><span>, which now has five pillars, so treat its grades as a baseline. </span><code>experience-lwc-security-validate</code><span> checks LWC bundles for Lightning Web Security (LWS) issues.</span></p>
<p><span>A reviewer can catch what tests and scans miss. For example, an Apex service queries Asset fields </span><code>WITH USER_MODE</code><span>, but the permission set never grants access to them. The tests pass because they run as an admin, and the scan is clean. Yet a support rep with only that permission set hits an error. A reviewer catches this by comparing the permission set’s field access with the query’s fields.</span></p>
<p><b>Improve the harness:</b><span style="font-weight: 400"> Turn each review finding into a check that runs on its own. For the permission gap above, add an Apex test that runs as a minimum-access user with only the permission set. It fails until the permission set is fixed.</span></p>
<h2><span style="font-weight: 400">Stage 6: Release behind deterministic gates</span></h2>
<p><span style="font-weight: 400">The agent drives the path from validation through promotion, deterministic checks guard each step, and a human owns the production gate.</span></p>
<p><span>In scratch orgs, sandboxes, and lower pipeline stages, the agent can validate changes and fix failures on its own. Production is different. The Salesforce Development plugin&#8217;s deploy gate checks the target org before every </span><code>sf project deploy</code><span>. It allows scratch, sandbox, and trial orgs. For a production org, it blocks the command and directs the agent to validate first, then quick deploy after a person approves.</span></p>
<p><b><span>Skills to use:</span></b><span> </span><code>platform-deploy-validate</code><span> runs a dry run for sandboxes and a validation for production, which returns a quick-deploy job ID. </span><code>platform-quick-deploy</code><span> ships that job without rerunning tests. </span></p>
<p><span>For DevOps Center, </span><code>dx-devops-promote</code><span> moves work items between stages, and </span><code>dx-devops-test-pipeline-configure</code><span> adds quality gates, such as a coverage threshold, to a stage.</span></p>
<p><b><span>Improve the harness:</span></b><span> When a release fails late, move the check earlier. </span><code>dx-devops-test-failures-analyze</code><span> explains a DevOps Center pipeline failure in plain language, so you can add a test suite or quality gate to a lower stage.</span></p>
<h2><span style="font-weight: 400">Stage 7: Observe and feed the loop</span></h2>
<p><span style="font-weight: 400">Instead of waiting for users to report problems, the agent can read debug logs, platform traces, and agent sessions to find issues and explain them.</span></p>
<p><b><span>Skills to use:</span></b><span> </span><code>platform-apex-logs-debug</code><span> analyzes debug logs and governor-limit failures. </span><code>platform-tracing-configure</code><span> and </span><code>platform-tracing-agentforce-configure</code><span> turn on tracing. </span></p>
<p><b>Improve the harness:</b><span style="font-weight: 400"> Ask two questions about every production finding. What should we build next? That becomes a new spec. Why did this get through? That becomes a new constraint, as the next section shows.</span></p>
<h2><span style="font-weight: 400">Make every repeated mistake a constraint</span></h2>
<p><span style="font-weight: 400">Coding agents copy patterns that already exist in your repo, including the bad ones. OpenAI saw this while</span><a href="https://openai.com/index/harness-engineering/"> <span style="font-weight: 400">building a large app with Codex</span></a><span style="font-weight: 400">, and</span><a href="https://labs.snyk.io/resources/copilot-amplifies-insecure-codebases-by-replicating-vulnerabilities/"> <span style="font-weight: 400">Snyk found</span></a><span style="font-weight: 400"> that AI assistants can replicate existing security vulnerabilities. So when the agent repeats a mistake, leave behind a constraint that catches it next time.</span></p>
<p>			  <span class="postimagessection_specify alignnone size-full wp-image-207312" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261105105439/image2_6c902b-e1793904891465.png" class="postimages" width="1000" height="533" alt="A ladder of six harness constraints running from advisory (instructions, skills, clean examples) to deterministic (tests, Code Analyzer rules, hooks and gates)." /><br />
			  </span></p>
<p><span style="font-weight: 400">Instructions and skills are advisory: </span><span style="font-weight: 400">they reduce mistakes, but the agent can still ignore them</span><span style="font-weight: 400">.</span><span style="font-weight: 400"> Tests, Code Analyzer rules, hooks, and quality gates are deterministic: they catch mistakes no matter which agent or human wrote the code. Pick the strongest one that fits.</span></p>
<p><span>For code patterns, use </span><code>dx-code-analyzer-custom-rule-create</code><span>. Describe the pattern in plain language, such as &#8220;ban hardcoded record IDs.&#8221; The skill picks the engine and writes the rule with a script, so the YAML is escaped correctly. Then it tests the rule on one file that should fail and one that should pass. Here&#8217;s the rule it adds to </span><code>code-analyzer.yml</code><span>.</span></p>
<pre language="yaml">engines:
  regex:
    custom_rules:
      NoHardcodedSalesforceIds:
        regex: '/[''"](?&lt;target&gt;(?=[a-zA-Z0-9]{0,14}\d)[a-zA-Z0-9]{15}(?:[A-Z0-5]{3})?)\\?[''"]/g'
        description: "Detects hardcoded 15 or 18 character Salesforce record IDs"
        violation_message: "Replace hardcoded ID with Custom Label, Custom Metadata, or Custom Setting"
        severity: 2
        tags:
          - "Custom"
          - "Security"
        file_extensions:
          - ".cls"
          - ".trigger"
</pre>
<p><span>Then use </span><code>dx-code-analyzer-configure</code><span> to run Code Analyzer in your CI/CD pipeline, such as GitHub Actions. Add the rule to your agent instructions, and clean up old code that breaks it, so the agent has nothing wrong to copy.</span></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">When agents write more of the code, your value moves to grounding them, deciding what to build, and judging the result. An agent-driven lifecycle gives that work a shape: ground, specify, build, verify, review, release, and observe. The Headless Toolkit, together with tools you already know, such as Code Analyzer, </span><a href="https://help.salesforce.com/s/articleView?id=xcloud.apexguru_workflow.htm&amp;type=5"><span style="font-weight: 400">ApexGuru</span></a><span style="font-weight: 400">, and DevOps Center, covers every stage.</span></p>
<p><span style="font-weight: 400">You don&#8217;t need to adopt it all at once. Install the skills, pick the stages that your team finds most efficient, and start there. Every time the agent gets something wrong, improve your harness.</span></p>
<h2><span style="font-weight: 400">Resources</span></h2>
<ul>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills"><span style="font-weight: 400">Salesforce Skills Library (sf-skills) on GitHub</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/salesforce-development"><span style="font-weight: 400">Salesforce Development plugin</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills/tree/main/plugins/builder/salesforce-code-quality"><span style="font-weight: 400">Salesforce Code Quality plugin</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/activate-mcp-servers.html"><span style="font-weight: 400">Activate MCP Servers</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/references/reference/metadata-grounding.html"><span style="font-weight: 400">Metadata Grounding MCP Server (Beta)</span></a></li>
</ul>
<p><b>Mohith Shrivastava</b><span style="font-weight: 400"> is a Principal Developer Advocate at Salesforce. Mohith focuses on AI-assisted development and shares practical patterns for building Salesforce apps and agents with coding agents. Follow Mohith on</span><a href="https://www.linkedin.com/in/mohith-shrivastava/"> <span style="font-weight: 400">LinkedIn</span></a><span style="font-weight: 400"> and</span><a href="https://github.com/msrivastav13"> <span style="font-weight: 400">GitHub</span></a><span style="font-weight: 400">.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/accelerate-agent-driven-development-with-the-headless-toolkit">Accelerate Agent-Driven Development with the Headless Toolkit</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/accelerate-agent-driven-development-with-the-headless-toolkit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207306</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261105105231/SingleHeadshot-13-e1793904767965.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261105105231/SingleHeadshot-13-e1793904767965.png?w=1000" medium="image" />
	</item>
		<item>
		<title>Quick Pages (Beta) を Developer Edition で試す : 有効化からページの作成まで</title>
		<link>https://developer.salesforce.com/blogs/2026/11/quick-pages-beta-developer-edition-jp</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/quick-pages-beta-developer-edition-jp#respond</comments>
		<pubDate>Mon, 09 Nov 2026 01:33:40 +0000</pubDate>
		<dc:creator><![CDATA[Hiroyuki Inaba]]></dc:creator>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[quick pages]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207339</guid>
		<description><![CDATA[<p>&#12505;&#12540;&#12479;&#20844;&#38283;&#12373;&#12428;&#12383; Quick Pages &#12434; Developer Edition &#12391;&#35430;&#12377;&#25163;&#38918;&#12391;&#12377;&#12290;&#27231;&#33021;&#12398;&#26377;&#21177;&#21270;&#12392;&#27177;&#38480;&#12475;&#12483;&#12488;&#12398;&#21106;&#12426;&#24403;&#12390;&#12363;&#12425;&#12289;&#33258;&#28982;&#35328;&#35486;&#12391;&#12398;&#12506;&#12540;&#12472;&#20316;&#25104;&#12289;&#20250;&#35441;&#12391;&#12398;&#20462;&#27491;&#12289;&#20445;&#23384;&#12539;&#20849;&#26377;&#12414;&#12391;&#12434;&#30011;&#38754;&#20184;&#12365;&#12391;&#32057;&#20171;&#12375;&#12414;&#12377;&#12290;&#12480;&#12511;&#12540;&#12487;&#12540;&#12479;&#12434;&#20316;&#12427; Anonymous Apex &#12398;&#12473;&#12463;&#12522;&#12503;&#12488;&#12418;&#20844;&#38283;&#12375;&#12390;&#12356;&#12414;&#12377;&#12290;</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/quick-pages-beta-developer-edition-jp">Quick Pages (Beta) を Developer Edition で試す : 有効化からページの作成まで</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>みなさん、こんにちは！<br />
<strong>Quick Pages</strong> がベータ版として公開されました。「こんなページがほしい」と自然言語で伝えるだけで、エージェントが組織のデータを使ったページを作ってくれる機能です。しかも <strong>Developer Edition でも使えます</strong>。<br />
この記事では、払い出したばかりの Developer Edition で、Quick Pages の機能の有効化から、ページを作る・会話で直す・保存して共有するまでを順に紹介します。最新の Developer Edition にはサンプルデータが入っていなかったので、ダミーデータを作る Anonymous Apex のスクリプトもあわせて公開します。<br />
<!-- TODO: YouTube の URL を入れる --></p>
<ul>
<li><a href="https://www.salesforce.com/blog/introducing-quick-pages-builder-tool/">Introducing Quick Pages（Salesforce ブログ）</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_quick_pages_beta.htm&amp;release=264&amp;type=5">Bring Custom UIs to Life with Quick Pages (Beta)（Winter &#8217;27 リリースノート）</a></li>
</ul>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>この記事は 2026 年 11 月時点（Winter &#8217;27）の情報で作成しています。一般提供までに、機能や画面、提供条件が変わることがあります。</strong></p></blockquote>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>注意</strong></p>
<ul>
<li>Quick Pages は<strong>ベータ版のサービス</strong>です。ご利用はお客様ご自身の判断で行ってください。ベータサービスのご利用には、Beta Services Terms と、Product Terms Directory の Non-GA Agentforce / Non-GA Gen AI の条件が適用されます。</li>
<li>ベータ期間中、Quick Pages の AI 利用は無料ですが、<strong>一般提供後は従量課金</strong>の対象になります。</li>
<li>本番組織ではなく、<strong>Developer Edition</strong> などで試すことをおすすめします。本記事の手順は Developer Edition で動作を確認しています。</li>
<li>購入をご検討の際は、現在一般提供されている機能をもとにご判断ください。</li>
</ul>
<p>参考:</p>
<ul>
<li><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_considerations.htm&amp;type=5">Considerations and Limitations for Quick Pages (Beta)</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_quick_pages_beta.htm&amp;release=264&amp;type=5">Bring Custom UIs to Life with Quick Pages (Beta)（Winter &#8217;27 リリースノート）</a></li>
</ul>
</blockquote>
<p>動画も公開しました。</p>
<div class="video-container"><iframe loading="lazy" title="Quick Pages (Beta) を Developer Edition で試す" width="500" height="281" src="https://www.youtube.com/embed/piz1G3OlmjQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<hr />
<h2 id="quick-pages-とは">Quick Pages とは</h2>
<p>一言で表現すると、<strong>「話しかけるだけで、組織のデータを使ったページを作れる機能」</strong> です。</p>
<ul>
<li>作りたいページを説明すると、エージェントが React ベースの 1 ページのアプリを作ります。ライブプレビューを見ながら、チャットで直していけます。</li>
<li>組織のメタデータ（カスタムオブジェクトや項目も含む）に沿って作られ、データはいつも最新です。グラフ、表、タブなどを入れられます。</li>
<li>作ったページは、個人、公開グループ、組織全体に共有できます。見る人には、その人がアクセスできるデータだけが表示されます。</li>
<li><strong>管理者権限がなくても、自分で作れます。</strong> ページを作っても組織のメタデータは変わらず、管理者は組織内のすべてのページを確認できます。</li>
</ul>
<h3 id="使える組織の条件">使える組織の条件</h3>
<ul>
<li>Lightning Experience</li>
<li>Enterprise / Performance / Unlimited / <strong>Developer</strong> Edition</li>
<li>Foundations が有効で、<strong>Hyperforce</strong> 上にある組織</li>
</ul>
<p>参考:</p>
<ul>
<li><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_setup.htm&amp;type=5">Set Up Quick Pages (Beta)</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_quick_pages_beta.htm&amp;release=264&amp;type=5">Bring Custom UIs to Life with Quick Pages (Beta)（Winter &#8217;27 リリースノート）</a></li>
</ul>
<hr />
<h2 id="全体の流れ">全体の流れ</h2>
<ol type="1">
<li>Quick Pages をオンにする</li>
<li>権限セットを割り当てる</li>
<li>ダミーデータを入れる（任意）</li>
<li>ページを作る</li>
<li>会話で直す</li>
<li>保存して共有する</li>
</ol>
<p>今回は Developer Edition &amp; システム管理者での操作で解説します。</p>
<hr />
<h2 id="事前準備">事前準備</h2>
<p>公式の <a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_setup.htm&amp;type=5">Set Up Quick Pages (Beta)</a> では、機能をオンにする前に次の 4 つを確認するよう案内されています。</p>
<ul>
<li>組織が Hyperforce 上にあること（設定 &gt; 組織情報 で、インスタンスが「英字 3 文字＋数字」になっていれば Hyperforce）</li>
<li>設定 &gt; Salesforce Multi-Framework Apps で、ドメインが有効になっていること（「Enable Domain」ボタンがあれば押す）</li>
<li>設定 &gt; 私のドメイン &gt; ルーティングとポリシー で、「Use Salesforce Edge Network」が有効になっていること</li>
<li>設定 &gt; Einstein 設定 で、Einstein がオンになっていること</li>
</ul>
<p><strong>最新の Developer Edition では、これらは最初から満たされています。</strong> そのため、この記事ではすぐに機能の有効化から始めます。既存の組織で試す場合は、上の 4 つを先に確認してください。</p>
<hr />
<h2 id="ステップ-1quick-pages-をオンにする">ステップ 1：Quick Pages をオンにする</h2>
<p>まずは組織で Quick Pages の機能を有効化します。</p>
<ul>
<li>設定 &gt; クイック検索に「Quick」と入力（英語で入力します）</li>
<li>「Quick Pages (Beta)」を選択</li>
<li>「Quick Pages」のトグルをオンにする</li>
</ul>
<p>「Quick Pages is turned on in your org.」と表示されれば成功です。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207342" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162402/01-quick-pages-on.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<hr />
<h2 id="ステップ-2権限セットを割り当てる">ステップ 2：権限セットを割り当てる</h2>
<p>次に、ページを作る人に権限セットを割り当てます。Quick Pages 用の権限セットは 2 つあります。</p>
<ul>
<li><strong>クイックページを作成</strong>（Create and View Quick Pages (Beta)）: ページを作る人</li>
<li><strong>クイックページを表示</strong>（View Quick Pages (Beta)）: ページを見るだけの人</li>
</ul>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207343" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162406/02-permission-sets.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>今回は自分でページを作るので、「クイックページを作成」を自分に割り当てます。</p>
<ul>
<li>設定 &gt; クイック検索に「権限セット」と入力し、「権限セット」を選択</li>
<li>「クイックページを作成」を開く</li>
<li>「割り当ての管理」&gt;「割り当てを追加」で自分のユーザーを選び、割り当てる</li>
</ul>
<p>「1 の割り当てに成功しました。」と表示されれば成功です。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207344" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162408/03-permset-assigned.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>以上で初期設定は完了です。</p>
<hr />
<h2 id="ステップ-3ダミーデータを入れる任意">ステップ 3：ダミーデータを入れる（任意）</h2>
<p>最新の Developer Edition には、取引先や商談のサンプルデータが入っていませんでした。データが無いとページを作っても中身が空になってしまうので、Anonymous Apex でダミーデータを作ります。お手持ちの組織にデータがある場合は、このステップは飛ばしてください。<br />
作るデータは次のとおりです。</p>
<ul>
<li>取引先「アストロ製作所」1 件（すでにあれば、それを使います）</li>
<li>商談 10 件（フェーズ・金額・完了予定日をばらして作成）</li>
</ul>
<p>ここでは、ブラウザ上で使える Web コンソールから実行します。</p>
<ul>
<li>画面右上の歯車アイコン（設定メニュー）&gt;「Web コンソール」を開く</li>
<li>コマンドパレットで <code>SFDX: Create Anonymous Apex Script</code> を実行し、スクリプトのファイルを作る</li>
<li>作られたファイルに、下のスクリプトを貼り付ける</li>
<li>エディターの 1 行目の上に出る「Execute」を押す</li>
</ul>
<p>「Anonymous Apex executed successfully」と表示されれば成功です。<br />
スクリプトは次のとおりです。<br />
<code>scripts/apex/sampledata.apex</code>:</p>
<pre class="apex"><code>// ============================================================
// ダッシュボード用ダミーデータ作成 (Anonymous Apex) 改訂版
// 取引先: アストロ製作所 (基本情報を拡充)
// 商談 10件
// 実行: Web Console &gt; SFDX: Create Anonymous Apex Script で
//       このファイルの内容を貼り付け &gt; SFDX: Execute Anonymous Apex
// ============================================================
Savepoint sp = Database.setSavepoint();
try {
    // ---------- 取引先 ----------
    Account acc;
    List&lt;Account&gt; existing = [SELECT Id FROM Account WHERE Name = 'アストロ製作所' LIMIT 1];
    if (existing.isEmpty()) {
        acc = new Account(
            Name = 'アストロ製作所',
            Site = '東京本社',
            Type = 'Customer - Direct',
            Industry = 'Manufacturing',
            Rating = 'Hot',
            AccountSource = 'Web',
            Phone = '03-0000-0001',
            Fax = '03-0000-0002',
            Website = 'https://www.example.com/astro',
            NumberOfEmployees = 320,
            AnnualRevenue = 4500000000.00,
            BillingStreet = '大森北1-2-3 アストロビル',
            BillingCity = '大田区',
            BillingPostalCode = '143-0000',
            ShippingStreet = '京浜島4-5-6 第一工場',
            ShippingCity = '大田区',
            ShippingPostalCode = '143-0003',
            Description = '精密部品・産業機械の製造メーカー。国内3拠点の工場を持ち、'
                        + '生産管理・品質管理の高度化を推進中。ダッシュボード検証用ダミーデータ。'
        );
        insert acc;
    } else {
        acc = existing[0];
    }

    // ---------- 商談 (10件: ステージ・金額・クローズ日を分散) ----------
    Date today = Date.today();
    List&lt;Opportunity&gt; opps = new List&lt;Opportunity&gt;{
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 生産管理システム導入',
            StageName = 'Prospecting', Amount = 3000000, CloseDate = today.addDays(90),
            LeadSource = 'Web', NextStep = '要件ヒアリング日程調整',
            Description = '既存の表計算ベース管理からの移行案件。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 工場見える化ダッシュボード',
            StageName = 'Prospecting', Amount = 1800000, CloseDate = today.addDays(120),
            LeadSource = 'Web', NextStep = '初回提案資料の送付',
            Description = '稼働状況をリアルタイムに把握したいとの要望。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 受発注システム刷新',
            StageName = 'Qualification', Amount = 4200000, CloseDate = today.addDays(75),
            LeadSource = 'Partner Referral', NextStep = '予算・決裁フローの確認',
            Description = 'パートナー経由の紹介案件。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - IoTセンサー追加',
            StageName = 'Needs Analysis', Amount = 5500000, CloseDate = today.addDays(60),
            LeadSource = 'Partner Referral', NextStep = '現地調査の実施',
            Description = '第二工場へのセンサー増設。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 設備保全クラウド',
            StageName = 'Proposal/Price Quote', Amount = 2700000, CloseDate = today.addDays(45),
            LeadSource = 'Phone Inquiry', NextStep = '見積書の提出',
            Description = '予防保全の仕組み化を検討中。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 基幹システム連携開発',
            StageName = 'Proposal/Price Quote', Amount = 6000000, CloseDate = today.addDays(35),
            LeadSource = 'Web', NextStep = '技術要件のすり合わせ',
            Description = '既存ERPとのAPI連携。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 保守契約更新',
            StageName = 'Negotiation/Review', Amount = 1200000, CloseDate = today.addDays(20),
            LeadSource = 'Phone Inquiry', NextStep = '契約書レビュー',
            Description = '年間保守契約の更新。値引き交渉中。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 品質管理ツール',
            StageName = 'Closed Won', Amount = 2400000, CloseDate = today.addDays(-15),
            LeadSource = 'Web', NextStep = '導入後フォロー',
            Description = '受注済み。導入完了済み。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 従業員向け研修プログラム',
            StageName = 'Closed Won', Amount = 3600000, CloseDate = today.addDays(-70),
            LeadSource = 'Partner Referral', NextStep = '効果測定のレビュー',
            Description = '全拠点で実施した研修パッケージ。'),
        new Opportunity(AccountId = acc.Id, Name = 'アストロ製作所 - 在庫最適化PoC',
            StageName = 'Closed Lost', Amount = 800000, CloseDate = today.addDays(-30),
            LeadSource = 'Other', NextStep = '失注理由の振り返り',
            Description = '競合製品を採用されたため失注。')
    };
    insert opps;

    System.debug('&#x2705; 作成完了: Account=' + acc.Id + ', Opportunity=' + opps.size());
} catch (Exception e) {
    Database.rollback(sp);
    System.debug(LoggingLevel.ERROR, '&#x274c; エラー: ' + e.getMessage() + ' / ' + e.getStackTraceString());
}

// ============================================================
// 【削除用スクリプト】(必要なときだけ別途実行)
// List&lt;Account&gt; a = [SELECT Id FROM Account WHERE Name = 'アストロ製作所'];
// delete [SELECT Id FROM Opportunity WHERE AccountId IN :a];
// delete a;
// ============================================================</code></pre>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="📝" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 試し終わってデータを消したいときは、末尾の【削除用スクリプト】のコメントを外した部分だけを、別のファイルで実行してください。</p></blockquote>
<p>取引先「アストロ製作所」を開いて、商談が入っていれば準備完了です。</p>
<hr />
<h2 id="ステップ-4ページを作る">ステップ 4：ページを作る</h2>
<p>それではページを作ってみましょう。</p>
<ul>
<li>アプリケーションランチャーで「ページ」と検索し、「Quick Pages (Beta)」を開く</li>
<li>「New Quick Page」ボタンを押す</li>
</ul>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207345" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162410/06-new-quick-page.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>右側のチャット欄に、作りたいページを日本語で説明して送ります。今回は次のように入力しました。</p>
<pre class="text"><code>取引先"アストロ製作所"の商談ダッシュボードを作成して。商談数や金額合計をタイルで表示、またフェーズごとの数量を棒グラフで見せて</code></pre>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207346" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162412/07-prompt.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>現時点でのハマりどころ：日本語入力の Enter で送信されてしまう</strong><br />
現在のベータ版では、日本語入力のかな漢字変換を確定する Enter で、<strong>入力途中の指示が送信されてしまう</strong>ことがあります。別の場所（テキストエディターなど）で書いた指示を貼り付けて送るのがおすすめです。(改修対応中)</p></blockquote>
<p>送信すると、エージェントがページを組み立て始めます。今回は 20 秒ほどで、次のようなページができあがりました。上には商談数と金額合計のタイル、その下にはフェーズ別件数の棒グラフと、商談の一覧が並んでいます。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207347" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162415/08-generated-top.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> プロンプトは短く具体的に書くのがコツです。現時点では、長いプロンプトは 2 分でタイムアウトします。</p></blockquote>
<hr />
<h2 id="ステップ-5会話で直す">ステップ 5：会話で直す</h2>
<p>次は、できたページを会話で直していきます。<br />
チャット欄を見ると、エージェントが「NEXT」として、次に直せそうなことを候補で出してくれています。今回は「商談を完了予定日の昇順で並べ替える」を押してみます。<br />
商談の一覧が完了予定日の順に並び替わりました。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207348" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162417/10-sorted.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>続けて、次の候補「商談をフェーズで絞り込んで表示する」を押します。ページの上にフェーズのドロップダウンができました。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207349" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162419/11-filter.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>ドロップダウンでフェーズを選ぶと、その場で商談が絞り込まれます。チャットで頼んだ機能が、そのまま動くページになっています。<br />
もちろん候補を押すだけでなく、チャット欄に自分で指示を書いて直すこともできます。</p>
<hr />
<h2 id="ステップ-6保存して共有する">ステップ 6：保存して共有する</h2>
<p>できあがったら、保存して共有します。</p>
<ul>
<li>画面右上の「Save」ボタンを押す</li>
<li>「Name your page」にページ名を入力し、「Save」ボタンを押す</li>
</ul>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207350" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162422/12-name-page.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<blockquote><p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 現時点の仕様: <strong>保存したあとはページ名を変えられません。</strong> ここで決めておきましょう。</p></blockquote>
<p>保存すると、画面右上に「Edit」「Share」「Delete」ボタンが出ます。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207351" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162428/13-saved.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>直すときは「Edit」です。保存した変更は、共有先にもそのまま反映されます。保存しないで終えた変更は下書きに残り、共有先に見えるのは最後に保存した版です。<br />
共有するときは「Share」ボタンを押します。</p>
<ul>
<li>組織全体に共有する場合: 「All org」にチェックを入れる</li>
<li>特定の人に共有する場合: 「Add people or groups」で個人や公開グループを検索して追加する</li>
<li>「Save」ボタンを押す</li>
</ul>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207352" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162430/14-share.png?w=1710" class="postimages" width="1710" height="986" alt="" /><br />
			  </span></p>
<p>ダイアログにも書かれているとおり、<strong>見る人には、その人がアクセスできるデータだけが表示されます。</strong> 同じページでも、見る人の権限によって表示される内容が変わります。<br />
以上で、ページの作成から共有までは完了です。</p>
<hr />
<h2 id="ベータ中の制約">ベータ中の制約</h2>
<p><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_considerations.htm&amp;type=5">Considerations and Limitations for Quick Pages (Beta)</a> から、試すときに気にしておきたいものを抜き出しました（2026 年 11 月時点）。</p>
<ul>
<li>ページは<strong>読み取り専用</strong>です。ページからレコードの作成・更新・削除はできません。データを変えたい場合は元のレコードを直して、ページを再読み込みします。</li>
<li>プロンプトは短く具体的に。長いプロンプトは 2 分でタイムアウトします。</li>
<li>保存したあとはページ名を変えられません。</li>
<li>管理者は他の人のページを見たり共有したりできますが、編集・削除はできません。</li>
<li>Connect REST API や Apex クラスからデータを取ること、Data 360 や外部 API とつなぐこと、Salesforce CMS やファイルの素材を使うことはできません。</li>
<li>データエクスポートで組織間を移すことや、パッケージに入れることはできません。</li>
</ul>
<p>これらは正式リリースの際には変わっている可能性があります。最新の情報は公式ドキュメントをご確認ください。</p>
<hr />
<h2 id="おわりに">おわりに</h2>
<p>この記事では、Developer Edition で Quick Pages (Beta) を有効化し、ダミーデータを入れて、ページを作る・会話で直す・保存して共有するまでの流れを紹介しました。振り返ると、やることは次のとおりです。</p>
<ul>
<li>機能をオンにして、権限セット「クイックページを作成」を割り当てる</li>
<li>データが無ければ、Anonymous Apex でダミーデータを作る</li>
<li>作りたいページを説明して、会話で直して、保存して共有する</li>
</ul>
<p>これまで、ちょっとした集計や一覧のページがほしいときは、レポートやダッシュボードを組んだり、Lightning Web Components で画面を作ったりする必要がありました。Quick Pages を使えば、<strong>話しかけるだけで、組織の実データを使ったページを、管理者権限なしで作れます。</strong> 見る人の権限もそのまま尊重されるので、気軽にチームへ共有できるのもうれしいところです。<br />
ぜひ Developer Edition で Quick Pages を試してみてください。</p>
<h2 id="参考資料">参考資料</h2>
<ul>
<li><a href="https://www.salesforce.com/blog/introducing-quick-pages-builder-tool/">Introducing Quick Pages（Salesforce ブログ）</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_quick_pages_beta.htm&amp;release=264&amp;type=5">Bring Custom UIs to Life with Quick Pages (Beta)（Winter &#8217;27 リリースノート）</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_setup.htm&amp;type=5">Set Up Quick Pages (Beta)</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_create.htm&amp;type=5">Create and Share Quick Pages (Beta)</a></li>
<li><a href="https://help.salesforce.com/s/articleView?id=platform.quick_pages_considerations.htm&amp;type=5">Considerations and Limitations for Quick Pages (Beta)</a></li>
</ul>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/quick-pages-beta-developer-edition-jp">Quick Pages (Beta) を Developer Edition で試す : 有効化からページの作成まで</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/quick-pages-beta-developer-edition-jp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207339</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162256/quick-pages-beta-developer-edition_1200x600.png?w=1200" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261107162256/quick-pages-beta-developer-edition_1200x600.png?w=1200" medium="image" />
	</item>
		<item>
		<title>Amazon Bedrock から MCP サーバー経由で Salesforce を触る</title>
		<link>https://developer.salesforce.com/blogs/2026/11/jp-access-salesforce-from-amazon-bedrock-via-mcp-server</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/jp-access-salesforce-from-amazon-bedrock-via-mcp-server#respond</comments>
		<pubDate>Fri, 06 Nov 2026 23:26:57 +0000</pubDate>
		<dc:creator><![CDATA[odasho]]></dc:creator>
				<category><![CDATA[APIs and Integrations]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Developer Tooling]]></category>
		<category><![CDATA[Headless 360]]></category>
		<category><![CDATA[amazon web services]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Hosted MCP Servers]]></category>
		<category><![CDATA[Model Context Protocol (MCP)]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207317</guid>
		<description><![CDATA[<p>&#33258;&#20998;&#12391;&#20316;&#12387;&#12383; AI &#12456;&#12540;&#12472;&#12455;&#12531;&#12488;&#12363;&#12425;&#12418;&#12289;Salesforce Hosted MCP Server &#32076;&#30001;&#12391; Salesforce &#12398;&#12487;&#12540;&#12479;&#12434;&#35501;&#12415;&#26360;&#12365;&#12391;&#12365;&#12414;&#12377;&#12290;Amazon Bedrock &#12392; Strands Agents &#12398;&#12456;&#12540;&#12472;&#12455;&#12531;&#12488;&#12363;&#12425;&#12289;&#12465;&#12540;&#12473;&#12398;&#20778;&#20808;&#24230;&#12434;&#21028;&#26029;&#12375;&#12390;&#26360;&#12365;&#25147;&#12377;&#12414;&#12391;&#12434;&#12289;&#12467;&#12540;&#12489;&#20184;&#12365;&#12391;&#35299;&#35500;&#12375;&#12414;&#12377;&#12290;</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/jp-access-salesforce-from-amazon-bedrock-via-mcp-server">Amazon Bedrock から MCP サーバー経由で Salesforce を触る</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>みなさん、こんにちは！外部の AI エージェントから、Salesforce のデータを読んだり更新したりしたいと思ったことはありませんか？</p>
<p>Salesforce Hosted MCP Server を使うと、ChatGPT や Claude などの AI アプリだけでなく、自分で作った AI エージェントからも、MCP (Model Context Protocol) で Salesforce のデータを扱えます。</p>
<p>この記事では、AWS のオープンソースの AI エージェント SDK、Strands Agents でエージェントを作り、Salesforce のケースを読んで、Amazon Bedrock のモデルが判断した優先度を書き戻すまでを解説します。</p>
<blockquote><p>※この記事の内容を試すには、Salesforce 組織と AWS アカウントが必要です。Salesforce の環境は、無料で取得できる <a href="https://developer.salesforce.com/signup">Developer Edition</a> で試せます。Amazon Bedrock の利用には料金がかかります (この記事のエージェントは、1 回の実行で入力が約 1 万トークン、出力が約 3,500 トークンでした)。Hosted MCP Server も組織によっては請求の対象になるので、本番組織では、設定の「MCP サーバー」の画面に出る Flex Credits の案内を確認してください。</p></blockquote>
<blockquote><p>※2026 年 11 月時点の情報で作成しています。</p></blockquote>
<h2>この記事のポイント</h2>
<ul>
<li>Strands Agents の MCPClient にサーバー URL とアクセストークンを渡すと、Salesforce の標準ツールをそのまま使える</li>
<li>読み取りと書き込みをサーバーの単位で分け、渡すツールも絞れる。動かせるのは、認可したユーザーの権限の範囲だけ</li>
<li>書き込みの結果は、エージェント自身に読み直して確かめさせる</li>
</ul>
<hr />
<h2>1. 今回作るもの</h2>
<p>Python のエージェントを実行すると、Amazon Bedrock のモデルが Salesforce の未対応のケースを読み、件名と説明から優先度を判断して、Priority 項目を書き換えます。ケースの読み書きには Hosted MCP Server のツールを使うので、Salesforce の API を呼ぶコードは書きません。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207321" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164438/01-architecture.png?w=1920" class="postimages" width="1920" height="1000" alt="" /><br />
			  </span></p>
<p>処理の流れは次のとおりです。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207322" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164442/02-sequence.png?w=1395" class="postimages" width="1395" height="1000" alt="" /><br />
			  </span></p>
<h3>権限の絞り方</h3>
<p>エージェントに触らせる範囲は、外側から順に 4 段で絞れます。</p>
<ol>
<li>ユーザーの権限: 認可したユーザーに許された範囲 (オブジェクトの権限、項目レベルセキュリティ、共有ルール) しか動かせません</li>
<li>サーバー: 書き込みには、削除のツールを持たない sobject-mutations を使います</li>
<li>ツール: Strands の tool_filters で、渡すツールを soqlQuery と updateSobjectRecord に絞ります</li>
<li>人の確認: この記事では省いていますが、Strands の Interrupts で、書き込みの前に人が確認する仕組みも入れられます</li>
</ol>
<hr />
<h2>2. 事前準備</h2>
<p>次のものを用意します。所要時間は 1 時間ほどです。</p>
<ul>
<li>Salesforce 組織 (この記事では Developer Edition) と、システム管理者のユーザー</li>
<li><a href="https://developer.salesforce.com/tools/salesforcecli">Salesforce CLI</a> (sf)。古い場合は sf update で更新します (詳しくは <a href="https://developer.salesforce.com/docs/platform/sfdx-setup/guide/sfdx-setup-update-cli.html">Update Salesforce CLI</a>)</li>
<li>AWS アカウント (Amazon Bedrock を使える権限)</li>
<li>Python のパッケージ管理ツールの <a href="https://docs.astral.sh/uv/">uv</a> (Python 3.12 は uv が入れます)。古い場合は uv self update で更新します (詳しくは <a href="https://docs.astral.sh/uv/getting-started/installation/#upgrading-uv">Upgrading uv</a>)</li>
</ul>
<blockquote><p>※設定のクイック検索に「MCP」と入れて「MCP サーバー」が出ない組織では、Hosted MCP Server を使えません。新しく <a href="https://developer.salesforce.com/signup">Developer Edition</a> を取得してください。</p></blockquote>
<p>この記事は、Python 3.12.14、strands-agents 1.64.0、mcp 2.3.0、Salesforce CLI 2.157.8 で動作を確認しています。</p>
<p>最初に、作業用のプロジェクトを作ります。このあと作るファイルは、すべてこのフォルダに置きます。</p>
<pre><code>uv init --python 3.12 bedrock-case-agent
cd bedrock-case-agent
uv add strands-agents python-dotenv
</code></pre>
<p>作り終えたときのファイル構成は次のとおりです (uv が作るファイルは省いています)。</p>
<pre><code>bedrock-case-agent/
├── .env              # 4 で作成。接続情報なので、リポジトリに含めない
├── agent.py          # 6 で作成
├── sf_auth.py        # 5 で作成
├── reset_cases.apex  # 7 で作成 (試し直すとき用)
└── data/
    └── cases.json    # 3 で作成
</code></pre>
<hr />
<h2>3. Salesforce 側の設定</h2>
<h3>ステップ 1：MCP サーバーを有効化する</h3>
<p>Hosted MCP Server は、初期状態ではすべて無効になっています。</p>
<ol>
<li>設定のクイック検索で「MCP サーバー」と入力し、API カタログの「MCP サーバー」を開く</li>
<li>一覧から「sobject-reads」を開き、「有効化」をクリックする</li>
<li>同じように「sobject-mutations」も有効化する</li>
</ol>
<p>サーバーの状態が「稼働中」になれば完了です。有効化してから使えるようになるまで、最大 2 分ほどかかります。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207323" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164445/03-mcp-servers.png?w=1608" class="postimages" width="1608" height="1000" alt="" /><br />
			  </span></p>
<p>続けて、sobject-reads と sobject-mutations の詳細画面を開き、「サーバー URL」をそれぞれコピーしておきます。4 のステップ 2 で .env に書きます。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207324" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164449/03b-mcp-server-url.png?w=2000" class="postimages" width="2000" height="791" alt="" /><br />
			  </span></p>
<p>Developer Edition では、次の形の URL が表示されます。</p>
<pre><code>https://api.salesforce.com/platform/mcp/v1/d/&lt;My Domain 名&gt;/develop/platform/sobject-reads
https://api.salesforce.com/platform/mcp/v1/d/&lt;My Domain 名&gt;/develop/platform/sobject-mutations
</code></pre>
<blockquote><p>※URL には組織の My Domain 名が入ります。本番組織や Sandbox では形が少し変わるので、画面の URL をそのまま使ってください (形式の一覧は <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/server-urls.html">Find Your Server URL</a>)。</p></blockquote>
<h3>ステップ 2：外部クライアントアプリケーションを作成する</h3>
<p>エージェントが OAuth で接続するための外部クライアントアプリケーションを作成します。画面の流れは「<a href="https://developer.salesforce.com/jpblogs/2026/04/salesforce-hosted-mcp-server-jp">Salesforce Hosted MCP Server 使い始め</a>」で詳しく解説されているので、ここでは設定する値をまとめます。</p>
<ol>
<li>設定のクイック検索で「外部クライアントアプリケーションマネージャー」を開き、「新規外部クライアントアプリケーション」をクリックする</li>
<li>下の表の値を設定して、「作成」をクリックする</li>
<li>作成したら「設定」タブの「OAuth 設定」で「コンシューマー鍵と秘密」をクリックし、メールの確認コードを入力して、コンシューマー鍵をコピーする</li>
</ol>
<table>
<thead>
<tr>
<th><strong>項目</strong></th>
<th><strong>値</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>外部クライアントアプリケーション名</td>
<td>任意 (例: Hosted MCP Clients)</td>
</tr>
<tr>
<td>取引先責任者メール</td>
<td>自分のメールアドレス</td>
</tr>
<tr>
<td>OAuth を有効化</td>
<td>オン</td>
</tr>
<tr>
<td>コールバック URL</td>
<td>http://localhost:8765/callback</td>
</tr>
<tr>
<td>OAuth 範囲</td>
<td>「Salesforce でホストされている MCP サーバーにアクセス (mcp_api)」と「いつでも要求を実行 (refresh_token, offline_access)」の 2 つ</td>
</tr>
<tr>
<td>フローの有効化</td>
<td>すべてオフ</td>
</tr>
<tr>
<td>セキュリティ</td>
<td>「指名ユーザーの JSON Web トークン (JWT) ベースのアクセストークンを発行」をオン、「Web サーバーフローの秘密が必要」と「更新トークンフローの秘密が必要」をオフ</td>
</tr>
</tbody>
</table>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207325" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164453/04-eca-oauth.png?w=2000" class="postimages" width="2000" height="667" alt="" /><br />
			  </span></p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207326" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164456/05-eca-security.png?w=1054" class="postimages" width="1054" height="1000" alt="" /><br />
			  </span></p>
<blockquote><p>※外部クライアントアプリケーションは、作成してから使えるようになるまで、最大 30 分かかることがあります。</p></blockquote>
<blockquote><p>※コールバック URL は複数登録できるので、ほかの MCP クライアント (Claude や Postman など) のものも足せば、同じアプリを使い回せます。本番の組織では、クライアントごとにアプリを分けると管理しやすくなります。</p></blockquote>
<h3>ステップ 3：試すためのケースを投入する</h3>
<p>エージェントが触るケースを絞るため、ケースの「会社名」 (SuppliedCompany) に目印の BEDROCK-DEMO を入れて投入し、エージェントの SOQL でもこの値で絞ります。</p>
<p>緊急度にばらつきのある 6 件を、優先度はすべて Medium で用意します。data/cases.json を次の内容で作ります。</p>
<pre><code>{
  "records": [
    {
      "attributes": { "type": "Case", "referenceId": "Case01" },
      "Subject": "本番環境で全ユーザーがログインできない",
      "Description": "本日 9:30 頃から全ユーザーが管理ポータルにログインできず、受注処理が止まっています。至急対応をお願いします。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    },
    {
      "attributes": { "type": "Case", "referenceId": "Case02" },
      "Subject": "夜間バッチ後に取引先の住所データが消えている",
      "Description": "昨夜の連携バッチの後、取引先の約 300 件で住所が空になりました。請求書の発送に影響します。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    },
    {
      "attributes": { "type": "Case", "referenceId": "Case03" },
      "Subject": "心当たりのない海外 IP からのログイン成功通知が届いた",
      "Description": "今朝、海外の IP アドレスからのログイン成功通知が届きました。チームの誰も海外にはいません。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    },
    {
      "attributes": { "type": "Case", "referenceId": "Case04" },
      "Subject": "営業ダッシュボードの表示が遅い",
      "Description": "ダッシュボードの表示に 30 秒以上かかるようになりました。使えてはいますが、朝会で待たされています。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    },
    {
      "attributes": { "type": "Case", "referenceId": "Case05" },
      "Subject": "二要素認証の設定手順書はありますか",
      "Description": "新入社員向けに、二要素認証の設定手順の資料があれば共有してください。急ぎではありません。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    },
    {
      "attributes": { "type": "Case", "referenceId": "Case06" },
      "Subject": "見積書テンプレートに会社ロゴを入れたい",
      "Description": "見積書のテンプレートに、自社ロゴを入れられるようにしてほしいという要望です。",
      "Status": "New", "Priority": "Medium", "SuppliedCompany": "BEDROCK-DEMO"
    }
  ]
}
</code></pre>
<p>Salesforce CLI で組織にログインし、ケースを投入します。1 行目でブラウザが開くので、使う組織でログインします。&#8211;alias my-de で付けた別名は、このあとのコマンドの &#8211;target-org で使います。</p>
<blockquote><p>※既定のブラウザでは、使う組織にだけログインしておきます。ほかの組織にもログインしていると、別の組織を認可してしまうことがあります (5 の sf_auth.py も同じです)。</p></blockquote>
<pre><code>sf org login web --alias my-de
sf data import tree --files data/cases.json --target-org my-de
</code></pre>
<p>次のコマンドで、6 件の優先度がすべて Medium になっていれば準備完了です。</p>
<pre><code>sf data query --query "SELECT CaseNumber, Subject, Priority FROM Case WHERE SuppliedCompany = 'BEDROCK-DEMO' ORDER BY CaseNumber" --target-org my-de
</code></pre>
<p>画面では、ケースの「私のケース」のリストビューで確かめられます。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207327" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164459/06-listview-before.png?w=2000" class="postimages" width="2000" height="474" alt="" /><br />
			  </span></p>
<hr />
<h2>4. AWS 側の設定</h2>
<h3>ステップ 1：Bedrock API キーを発行する</h3>
<p>今回は、Amazon Bedrock の API キーで認証します。</p>
<ol>
<li>AWS マネジメントコンソールのリージョンを「アジアパシフィック (東京)」にする</li>
<li>Amazon Bedrock のコンソールで、左のメニューの「API キー」を開く</li>
<li>「短期 API キー」タブの「短期 API キーを生成」をクリックし、表示されたキーをコピーする (キーは一度しか表示されません)</li>
</ol>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207328" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164502/07-bedrock-api-key.png?w=2000" class="postimages" width="2000" height="870" alt="" /><br />
			  </span></p>
<blockquote><p>※短期 API キーは、発行したリージョンでしか使えません。Amazon Nova のモデルは、利用開始の手続きなしで使えます。</p></blockquote>
<p>モデルは Amazon Nova 2 Lite を、推論プロファイル jp.amazon.nova-2-lite-v1:0 (東京と大阪のリージョンで処理する ID) で呼び出します。</p>
<h3>ステップ 2：.env に接続情報を書く</h3>
<p>プロジェクトの直下に .env を作り、次の値を入れます。.env はリポジトリに含めないでください。</p>
<pre><code># Salesforce
SF_CONSUMER_KEY=&lt;コンシューマー鍵&gt;
SF_LOGIN_URL=https://login.salesforce.com
SF_MCP_READS_URL=&lt;sobject-reads のサーバー URL&gt;
SF_MCP_MUTATIONS_URL=&lt;sobject-mutations のサーバー URL&gt;

# Amazon Bedrock
AWS_BEARER_TOKEN_BEDROCK=&lt;Bedrock API キー&gt;
AWS_REGION=ap-northeast-1
BEDROCK_MODEL_ID=jp.amazon.nova-2-lite-v1:0
</code></pre>
<p>SF_MCP_READS_URL と SF_MCP_MUTATIONS_URL には、3 のステップ 1 でコピーしたサーバー URL を書きます。</p>
<p>AWS_BEARER_TOKEN_BEDROCK は、AWS の SDK が Bedrock の API キーとして読み取る環境変数なので、コードでキーを扱う必要はありません。</p>
<hr />
<h2>5. Salesforce の認可を通す</h2>
<p>Hosted MCP Server には、OAuth 2.0 の認可コードフロー (PKCE 付き) で取得したアクセストークンで接続します。ブラウザで認可してトークンを保存する、小さなスクリプト sf_auth.py を用意します。</p>
<pre><code>"""Salesforce Hosted MCP Server 用のアクセストークンを、認可コードフロー + PKCE で取得する。

  uv run sf_auth.py login   ブラウザで認可し、トークンを保存する
  uv run sf_auth.py token   アクセストークンを出力する (MCP Inspector での疎通確認用)
"""
import base64
import hashlib
import http.server
import json
import os
import secrets
import sys
import time
import urllib.error
import urllib.parse
import urllib.request
import webbrowser
from pathlib import Path

from dotenv import load_dotenv

load_dotenv()

LOGIN_URL = os.environ.get("SF_LOGIN_URL", "https://login.salesforce.com").rstrip("/")
CLIENT_ID = os.environ.get("SF_CONSUMER_KEY", "")
REDIRECT_URI = "http://localhost:8765/callback"  # 外部クライアントアプリケーションのコールバック URL と同じにする
SCOPES = "mcp_api refresh_token"
TOKEN_FILE = Path("~/.config/bedrock-case-agent/sf_token.json").expanduser()


def _b64url(data: bytes) -&gt; str:
    return base64.urlsafe_b64encode(data).rstrip(b"=").decode()


def _post_token(form: dict) -&gt; dict:
    req = urllib.request.Request(
        f"{LOGIN_URL}/services/oauth2/token",
        data=urllib.parse.urlencode(form).encode(),
        headers={"Content-Type": "application/x-www-form-urlencoded"},
    )
    try:
        with urllib.request.urlopen(req, timeout=30) as res:
            return json.loads(res.read())
    except urllib.error.HTTPError as e:
        sys.exit(f"トークンの取得に失敗しました (HTTP {e.code}): {e.read().decode()}")


def _save(tokens: dict) -&gt; None:
    tokens["saved_at"] = int(time.time())
    TOKEN_FILE.parent.mkdir(parents=True, exist_ok=True)
    TOKEN_FILE.write_text(json.dumps(tokens))
    TOKEN_FILE.chmod(0o600)  # 自分だけが読めるようにする


def login() -&gt; None:
    if not CLIENT_ID:
        sys.exit(".env に SF_CONSUMER_KEY (コンシューマー鍵) を設定してください。")

    # PKCE: code_verifier から code_challenge を作り、認可画面に渡す
    verifier = _b64url(secrets.token_bytes(64))
    challenge = _b64url(hashlib.sha256(verifier.encode()).digest())
    state = secrets.token_urlsafe(16)
    params = {
        "response_type": "code",
        "client_id": CLIENT_ID,
        "redirect_uri": REDIRECT_URI,
        "scope": SCOPES,
        "code_challenge": challenge,
        "code_challenge_method": "S256",
        "state": state,
    }

    result: dict = {}

    class CallbackHandler(http.server.BaseHTTPRequestHandler):
        def do_GET(self):
            url = urllib.parse.urlparse(self.path)
            if url.path == "/callback":
                result.update(urllib.parse.parse_qsl(url.query))
            self.send_response(200)
            self.send_header("Content-Type", "text/plain; charset=utf-8")
            self.end_headers()
            self.wfile.write("認可が完了しました。ターミナルに戻ってください。".encode())

        def log_message(self, *args):
            pass

    server = http.server.HTTPServer(("localhost", 8765), CallbackHandler)
    webbrowser.open(f"{LOGIN_URL}/services/oauth2/authorize?" + urllib.parse.urlencode(params))
    while "code" not in result and "error" not in result:
        server.handle_request()  # コールバックが届くまで待つ
    server.server_close()

    if "error" in result or result.get("state") != state:
        sys.exit(f"認可に失敗しました: {result.get('error_description', result)}")

    # PKCE: トークンを取るときに code_verifier を送る
    tokens = _post_token({
        "grant_type": "authorization_code",
        "code": result["code"],
        "client_id": CLIENT_ID,
        "redirect_uri": REDIRECT_URI,
        "code_verifier": verifier,
    })
    _save(tokens)
    print(f"トークンを保存しました: {TOKEN_FILE}")


def get_access_token(max_age_sec: int = 3600) -&gt; str:
    if not TOKEN_FILE.exists():
        sys.exit("トークンがありません。先に `uv run sf_auth.py login` を実行してください。")
    tokens = json.loads(TOKEN_FILE.read_text())
    if time.time() - tokens["saved_at"] &gt; max_age_sec:  # 保存から時間が経っていたら取り直す
        new = _post_token({
            "grant_type": "refresh_token",
            "refresh_token": tokens["refresh_token"],
            "client_id": CLIENT_ID,
        })
        tokens = {**tokens, **new}
        _save(tokens)
    return tokens["access_token"]


if __name__ == "__main__":
    command = sys.argv[1] if len(sys.argv) &gt; 1 else ""
    if command == "login":
        login()
    elif command == "token":
        print(get_access_token())
    else:
        sys.exit("使い方: uv run sf_auth.py login | token")
</code></pre>
<p>ポイントは 2 つです。</p>
<ul>
<li>PKCE: 認可画面を開くときに code_challenge を付け、トークンを取るときに code_verifier を送ります。認可コードの横取りを防ぐ仕組みで、コンシューマーの秘密は要りません</li>
<li>トークンの保存: プロジェクトの外 (~/.config/) に自分だけが読める権限で保存し、60 分を過ぎたらリフレッシュトークンで取り直します</li>
</ul>
<pre><code>uv run sf_auth.py login
</code></pre>
<p>許可の画面が開いたら、要求しているアプリが自分で作った外部クライアントアプリケーションであることを確かめて、「許可」をクリックします。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207329" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164504/08-oauth-consent.png?w=549" class="postimages" width="549" height="1000" alt="" /><br />
			  </span></p>
<p>ターミナルに「トークンを保存しました」と表示されれば完了です。</p>
<blockquote><p>※MCP Inspector などで接続を確かめたいときは、uv run sf_auth.py token で出力したアクセストークンを使えます。</p></blockquote>
<hr />
<h2>6. エージェントを書く</h2>
<p>agent.py は次のとおりです。</p>
<pre><code>import os

from dotenv import load_dotenv
from strands import Agent
from strands.models import BedrockModel
from strands.tools.mcp import MCPClient

from sf_auth import get_access_token

load_dotenv()  # .env の値 (Bedrock の API キーを含む) を環境変数に読み込む

headers = {"Authorization": f"Bearer {get_access_token()}"}

# 読み取り用: sobject-reads の soqlQuery だけを渡す
reads = MCPClient(
    url=os.environ["SF_MCP_READS_URL"],  # sobject-reads のサーバー URL
    headers=headers,
    tool_filters={"allowed": ["soqlQuery"]},
)

# 書き込み用: sobject-mutations の updateSobjectRecord だけを渡す
mutations = MCPClient(
    url=os.environ["SF_MCP_MUTATIONS_URL"],  # sobject-mutations のサーバー URL
    headers=headers,
    tool_filters={"allowed": ["updateSobjectRecord"]},
)

model = BedrockModel(
    model_id=os.environ["BEDROCK_MODEL_ID"],  # 例: jp.amazon.nova-2-lite-v1:0
    region_name=os.environ["AWS_REGION"],  # 例: ap-northeast-1
    temperature=0,
    # Nova 2 の推論 (考えてから答える機能) をオンにする。オフのままだと、更新のツールを呼ばないことがあった
    additional_request_fields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "low"}},
)

SYSTEM_PROMPT = """あなたは Salesforce のサポートケース (Case) をトリアージする日本語の AI エージェントです。

# 手順
1. 次の SOQL を soqlQuery で実行して、未対応のケースを取得する (そのまま使うこと)。
   SELECT Id, CaseNumber, Subject, Description, Priority FROM Case
   WHERE Status = 'New' AND SuppliedCompany = 'BEDROCK-DEMO'
   ORDER BY CaseNumber LIMIT 10
2. 各ケースの件名と説明から、優先度を High、Medium、Low のどれかに判断する。
   - High: 業務停止、データ消失、セキュリティ、法令、本番障害など緊急性が高いもの
   - Medium: 不具合や設定の問題だが、業務は継続できるもの
   - Low: 操作方法の質問、軽微な要望、情報提供の依頼など
3. 判断した優先度が、1 で取得した Priority と異なるケースは、すべて updateSobjectRecord で更新する。
   High への変更も Low への変更も、同じように 1 件ずつ更新する。
   sobject-name は "Case"、id は 1 の結果の Id をそのまま使い、body は {"Priority": "Low"} の形にする。
   Priority 以外の項目は変更しない。
4. 更新が終わったら、1 と同じ SOQL をもう一度 soqlQuery で実行し、Priority が判断どおりになったかを確かめる。
   判断どおりになっていないケースがあれば、もう一度 updateSobjectRecord で更新してから、もう一度確かめる。
5. 最後に、4 で確かめた結果を Markdown の表でまとめる (列: CaseNumber、件名、更新前の Priority、判定、理由、更新後の Priority)。
"""

agent = Agent(model=model, system_prompt=SYSTEM_PROMPT, tools=[reads, mutations])
agent("未対応のケースの優先度を判断して、Priority を更新してください。")
</code></pre>
<p>ポイントは 3 つです。</p>
<ul>
<li>MCPClient を 2 つ作る: sobject-reads と sobject-mutations に分け、tool_filters で渡すツールを 1 つずつに絞ります。接続の開始と終了は Strands Agents が管理します</li>
<li>推論をオンにする: additional_request_fields で Nova 2 の推論 (考えてから答える機能) をオンにしています。オフのままだと、更新のツールを呼ばないことがありました</li>
<li>指示文: 使う SOQL と判断基準を固定し、更新のあとに読み直して確かめる手順まで書いています。結果の表の「更新後の Priority」は、読み直した値です</li>
</ul>
<hr />
<h2>7. 動かしてみる</h2>
<pre><code>uv run agent.py
</code></pre>
<p>エージェントが soqlQuery でケースを取得し、優先度が変わる 5 件について updateSobjectRecord を呼び出したあと、もう一度 soqlQuery で読み直します。</p>
<p>ログの [REDACTED]. は、推論の中身が表示されない部分です。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207330" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164507/09-run-log.png?w=1400" class="postimages" width="1400" height="690" alt="" /><br />
			  </span></p>
<p>最後に、判断の結果が表にまとめて出力されます。</p>
<table>
<thead>
<tr>
<th><strong>CaseNumber</strong></th>
<th><strong>件名</strong></th>
<th><strong>更新前の Priority</strong></th>
<th><strong>判定</strong></th>
<th><strong>理由</strong></th>
<th><strong>更新後の Priority</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>00001026</td>
<td>本番環境で全ユーザーがログインできない</td>
<td>Medium</td>
<td>High</td>
<td>業務停止、緊急性が高い</td>
<td>High</td>
</tr>
<tr>
<td>00001027</td>
<td>夜間バッチ後に取引先の住所データが消えている</td>
<td>Medium</td>
<td>High</td>
<td>データ消失、請求書に影響</td>
<td>High</td>
</tr>
<tr>
<td>00001028</td>
<td>心当たりのない海外 IP からのログイン成功通知が届いた</td>
<td>Medium</td>
<td>High</td>
<td>セキュリティリスク</td>
<td>High</td>
</tr>
<tr>
<td>00001029</td>
<td>営業ダッシュボードの表示が遅い</td>
<td>Medium</td>
<td>Medium</td>
<td>不具合だが業務は継続可能</td>
<td>Medium</td>
</tr>
<tr>
<td>00001030</td>
<td>二要素認証の設定手順書はありますか</td>
<td>Medium</td>
<td>Low</td>
<td>操作方法の質問</td>
<td>Low</td>
</tr>
<tr>
<td>00001031</td>
<td>見積書テンプレートに会社ロゴを入れたい</td>
<td>Medium</td>
<td>Low</td>
<td>軽微な要望</td>
<td>Low</td>
</tr>
</tbody>
</table>
<p>3 の sf data query をもう一度実行するか、リストビューを更新すると、Priority が書き換わっていることを確認できます。</p>
<p>			  <span class="postimagessection_specify alignnone size-medium wp-image-207331" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261106164509/10-listview-after.png?w=2000" class="postimages" width="2000" height="474" alt="" /><br />
			  </span></p>
<p>もう一度実行しても、優先度はすでに判断どおりなので、更新は行われません。最初から試し直すときは、次の reset_cases.apex を作って実行し、優先度を Medium に戻します。</p>
<pre><code>// BEDROCK-DEMO の目印が付いたケースを、優先度 Medium、状況 New に戻す
List&lt;Case&gt; cases = [SELECT Id FROM Case WHERE SuppliedCompany = 'BEDROCK-DEMO'];
for (Case c : cases) {
    c.Priority = 'Medium';
    c.Status = 'New';
}
update cases;
</code></pre>
<pre><code>sf apex run --file reset_cases.apex --target-org my-de
</code></pre>
<p>戻して実行するのを 3 回繰り返したところ、3 回とも同じ結果になりました。</p>
<hr />
<h2>8. 活用法</h2>
<p>対象のオブジェクトと指示文を変えれば、同じ形で、期限を過ぎた商談のフェーズの一括更新や、フォローアップの ToDo の作成などにも使えます。読み取りだけで足りる使い方なら、sobject-reads のクライアントだけを渡します。ほかのサービスの MCP サーバーのツールと組み合わせることもできます。</p>
<hr />
<h2>9. よくあるエラーと対処法</h2>
<h3>invalid_client_id</h3>
<p><strong>原因</strong>: コンシューマー鍵が違うか、外部クライアントアプリケーションを作成した直後で、まだ使えない</p>
<p><strong>対処</strong>: 鍵を確かめてください。作成した直後なら、最大 30 分待ってからやり直します (待ち続けている sf_auth.py は Ctrl + C で止めます)</p>
<h3>redirect_uri_mismatch</h3>
<p><strong>原因</strong>: 外部クライアントアプリケーションのコールバック URL と、sf_auth.py の REDIRECT_URI が違う</p>
<p><strong>対処</strong>: どちらも http://localhost:8765/callback にしてください</p>
<h3>MCP サーバーに接続できない (404)</h3>
<p><strong>原因</strong>: MCP サーバーを有効化していない (Server &#8216;sobject-reads&#8217; exists but is not active. と返ります)</p>
<p><strong>対処</strong>: 3 のステップ 1 でサーバーを有効化し、最大 2 分ほど待ってください</p>
<h3>ValidationException (モデル ID の指定)</h3>
<p><strong>原因</strong>: モデル ID に、推論プロファイルではない ID (amazon.nova-2-lite-v1:0 など) を指定している</p>
<p><strong>対処</strong>: jp.amazon.nova-2-lite-v1:0 のように、推論プロファイルの ID を指定してください</p>
<h3>Bedrock の認証が通らない</h3>
<p><strong>原因</strong>: 短期 API キーを発行したリージョンが AWS_REGION と違うか、キーの期限 (最長 12 時間) が切れている</p>
<p><strong>対処</strong>: AWS_REGION と同じリージョンで、キーを発行し直してください</p>
<h3>Your account is currently being verified</h3>
<p><strong>原因</strong>: AWS アカウントを作った直後で、確認が終わっていない</p>
<p><strong>対処</strong>: 確認は通常 2 時間以内に終わるので、待ってから実行してください</p>
<h3>更新していないのに「更新しました」と表示される</h3>
<p><strong>原因</strong>: モデルが、更新のツールを呼ばないまま結果の表を書くことがあります。この記事のエージェントでも、推論をオフにしていたときに起きました</p>
<p><strong>対処</strong>: 推論をオンにし、更新のあとに読み直して確かめる手順を指示文に入れたところ、3 回続けて想定どおりに動きました。それでも表はモデルの報告なので、書き込みを伴うエージェントでは、sf data query などで実際の値も確かめてください</p>
<hr />
<h2>まとめ</h2>
<p>Strands Agents と Salesforce Hosted MCP Server を組み合わせると、Amazon Bedrock の AI エージェントから、ユーザーの権限の範囲で Salesforce のデータを読み書きできます。ほかのフレームワークのエージェントでも、OAuth で取得したアクセストークンを付けて MCP サーバーに接続する考え方は同じです。書き込みを伴う場合は、読み直して確かめる手順を指示文に入れておくと安心です。</p>
<p>まずは無料で取得できる <a href="https://developer.salesforce.com/signup">Developer Edition</a> で試してみてください。</p>
<hr />
<h2>参考リソース</h2>
<ul>
<li>Salesforce Developers (英語): <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/hosted-mcp-servers-overview.html">Hosted MCP Servers: Get Started</a> / <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/server-urls.html">Find Your Server URL</a></li>
<li>Salesforce Developers (英語): <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/sobject-reads.html">SObject Reads</a> / <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/sobject-mutations.html">SObject Mutations</a></li>
<li>Salesforce Developers (英語): <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/create-external-client-app.html">Create an External Client App</a> / <a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/log-into-org.html">Log In to Your Org</a></li>
<li>Strands Agents (英語): <a href="https://strandsagents.com/docs/user-guide/sdk/tools/mcp-tools/">Connect your agent to MCP tools</a> / <a href="https://strandsagents.com/docs/user-guide/sdk/tools/mcp-transports/">MCP Transports</a> / <a href="https://strandsagents.com/docs/user-guide/sdk/model-providers/amazon-bedrock/">Amazon Bedrock</a> / <a href="https://strandsagents.com/docs/user-guide/sdk/interrupts/">Interrupts</a></li>
<li>Amazon Bedrock: <a href="https://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/api-keys.html">API キー</a> / <a href="https://docs.aws.amazon.com/ja_jp/bedrock/latest/userguide/model-card-amazon-nova-2-lite.html">Nova 2 Lite</a></li>
<li>Amazon Nova: <a href="https://docs.aws.amazon.com/ja_jp/nova/latest/nova2-userguide/using-tools.html">ツールの使用 (関数呼び出し)</a> / <a href="https://docs.aws.amazon.com/ja_jp/nova/latest/nova2-userguide/troubleshooting.html">トラブルシューティング</a></li>
</ul>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/jp-access-salesforce-from-amazon-bedrock-via-mcp-server">Amazon Bedrock から MCP サーバー経由で Salesforce を触る</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/jp-access-salesforce-from-amazon-bedrock-via-mcp-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207317</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261106171448/2026-11-07_10-11-59.jpg?w=1118" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261106171448/2026-11-07_10-11-59.jpg?w=1118" medium="image" />
	</item>
		<item>
		<title>Metadata Grounding: Let Your Coding Agent Search Your Org by Intent</title>
		<link>https://developer.salesforce.com/blogs/2026/11/metadata-grounding-let-your-coding-agent-search-your-org-by-intent</link>
		<comments>https://developer.salesforce.com/blogs/2026/11/metadata-grounding-let-your-coding-agent-search-your-org-by-intent#respond</comments>
		<pubDate>Thu, 05 Nov 2026 16:00:55 +0000</pubDate>
		<dc:creator><![CDATA[Gonzalo Gambino]]></dc:creator>
				<category><![CDATA[Agentforce]]></category>
		<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Developer Tooling]]></category>
		<category><![CDATA[Agent-Driven Development]]></category>
		<category><![CDATA[AI Coding Agents]]></category>
		<category><![CDATA[developer tooling]]></category>
		<category><![CDATA[Headless Toolkit]]></category>
		<category><![CDATA[Metadata Grounding]]></category>
		<category><![CDATA[Salesforce MCP]]></category>
		<category><![CDATA[Salesforce Metadata]]></category>

		<guid isPermaLink="false">https://developer.salesforce.com/blogs/?p=207282</guid>
		<description><![CDATA[<p>Introducing Metadata Grounding MCP (Beta). Learn how coding agents can search Salesforce org metadata using natural language, discover existing components, and reuse what's already built.</p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/metadata-grounding-let-your-coding-agent-search-your-org-by-intent">Metadata Grounding: Let Your Coding Agent Search Your Org by Intent</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="font-weight: 400">You ask a coding agent to fix a bug on your menu page. It searches your project, finds nothing that matches, and starts writing a new component. Your org already has one. Most projects hold only part of an org, and this one lives in the part you haven&#8217;t retrieved.</span></p>
<p><span style="font-weight: 400">Coding agents can already explore your org with the Salesforce CLI, but that means listing metadata one type at a time, across hundreds of types and thousands of components. The </span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/metadata-grounding.html"><span style="font-weight: 400">Metadata Grounding MCP Server (Beta)</span></a><span style="font-weight: 400"> searches a pre-indexed catalog of your org&#8217;s metadata instead, so the agent can find what already exists before it builds something new.</span></p>
<p><span style="font-weight: 400">In this post, you&#8217;ll learn how Metadata Grounding works, how to connect it, and how to use it in two examples from a food delivery org called </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto</span></a><span style="font-weight: 400">. </span></p>
<h2><span style="font-weight: 400">Why coding agents need your org&#8217;s metadata</span></h2>
<p><span style="font-weight: 400">The </span><a href="https://developer.salesforce.com/docs/platform/headless-get-started/guide/headless-get-started.html"><span style="font-weight: 400">Headless Toolkit</span></a><span style="font-weight: 400"> is how Salesforce brings your org to any agent, app, and experience. Three pieces matter when you build with a coding agent:</span></p>
<ul>
<li style="font-weight: 400"><b>Skills teach the agent how to build on Salesforce.</b><span style="font-weight: 400"> They carry the patterns, the APIs, and the guardrails.</span></li>
<li style="font-weight: 400"><b>The Headless 360 MCP Server lets the agent act.</b><span style="font-weight: 400"> It can configure, provision, and change things in your org.</span></li>
<li style="font-weight: 400"><b>Metadata Grounding lets the agent see what already exists.</b><span style="font-weight: 400"> It answers the question the other two can&#8217;t: what is currently in this org?</span></li>
</ul>
<p><span style="font-weight: 400">Without that third piece, an agent can write correct Apex against the wrong object. With it, the agent checks the org first.</span></p>
<p><span style="font-weight: 400">If you’ve read our announcement of the Headless 360 MCP Server Beta, you&#8217;ve seen how the Discover tool finds the right Salesforce action to run. Metadata Grounding answers a different question. It finds the things that already exist in your org, such as an object, a field, or a component, so the agent knows what to point that action at.</span></p>
<p><span style="font-weight: 400">Here&#8217;s how the options an agent has today compare:</span></p>
<table>
<thead>
<tr>
<th><b>Where the agent looks</b></th>
<th><b>Finds metadata that isn&#8217;t in your project?</b></th>
<th><b>Search by intent?</b></th>
<th><b>Cost to the agent</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span style="font-weight: 400">Your local DX project</span></td>
<td><span style="font-weight: 400">No, only what you retrieved</span></td>
<td><span style="font-weight: 400">No, text match only</span></td>
<td><span style="font-weight: 400">Low, but blind to the rest of the org</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">Metadata API or SOQL</span></td>
<td><span style="font-weight: 400">Yes</span></td>
<td><span style="font-weight: 400">No, you need the type and name first</span></td>
<td><span style="font-weight: 400">Low per call, but the agent must already know what to ask for</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">Retrieve everything, then search</span></td>
<td><span style="font-weight: 400">Yes</span></td>
<td><span style="font-weight: 400">No</span></td>
<td><span style="font-weight: 400">High. Thousands of files burn context, tokens, and time</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">Metadata Grounding (Beta)</span></td>
<td><span style="font-weight: 400">Yes</span></td>
<td><span style="font-weight: 400">Yes, across 70+ types</span></td>
<td><span style="font-weight: 400">Low. The agent pulls only what it asks for</span></td>
</tr>
</tbody>
</table>
<h2><span style="font-weight: 400">How Metadata Grounding works</span></h2>
<p><span style="font-weight: 400">Metadata Grounding exposes three read-only tools:</span></p>
<table>
<tbody>
<tr>
<td><code>describe_metadata</code></td>
<td><span style="font-weight: 400">Lists the metadata types in your org and the schema for each, so the agent knows what it can search</span></td>
</tr>
<tr>
<td><code>search_metadata</code></td>
<td><span style="font-weight: 400">Finds metadata by what it does, using natural language, with optional filters for type and subtype</span></td>
</tr>
<tr>
<td><code>query_metadata</code></td>
<td><span style="font-weight: 400">Returns the full record for a result, including its type-specific properties</span></td>
</tr>
</tbody>
</table>
<p><span style="font-weight: 400">As of this writing, it covers more than 70 metadata types, including objects, fields, Lightning web components, Apex classes, flows, and permission sets. Behind it is Salesforce Catalog, where your org&#8217;s metadata is stored and indexed. </span></p>
<p><span style="font-weight: 400">The pattern the tools are built for is describe, search, then query. Let the agent learn what exists, narrow to the right type, and read the record before it writes any code.</span></p>
<p><b>Note:</b><span style="font-weight: 400"> </span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Metadata Grounding runs as the authenticated user and returns only the metadata that the user is permitted to access. It&#8217;s read-only, so it can find and explain, but never change your org.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Metadata Grounding currently covers core Salesforce metadata. If you need to ground your agents on Data 360 metadata, use the Data 360 MCP Server.</span></li>
</ul>
<h3><span style="font-weight: 400">What&#8217;s behind the tools</span></h3>
<p><span style="font-weight: 400">Metadata Grounding reads from </span><a href="https://help.salesforce.com/s/articleView?id=data.c360_a_salesforce_catalog.htm&amp;type=5"><span style="font-weight: 400">Salesforce Catalog</span></a><span style="font-weight: 400">, which Data 360 powers. Four pieces matter:<br />
</span></p>
<ul>
<li><b>Extraction.</b> Metadata extractors read your standard and custom metadata from the org. When you turn Salesforce Catalog on, Data 360 runs an initial full sync. How long that takes depends on the size of your org.</li>
<li><b>Storage.</b> Data 360 stores the metadata in a metadata data lake object and maps it into a Catalog data model.</li>
<li><b>Search index.</b> A hybrid index combines a vector index, which matches on meaning, with a keyword index, which matches on exact terms. That&#8217;s why a plain-English query can find <code>MenuBrowserController</code> without the agent knowing its name.</li>
<li><b>Access.</b> The Metadata Grounding MCP Server queries that index and returns only what the authenticated user may see.</li>
</ul>
<p>			  <span class="postimagessection_specify alignnone size-full wp-image-207297" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261104085438/image1_5965d7-e1793811288189.png" class="postimages" width="1000" height="448" alt="Diagram showing how Metadata Grounding works. Salesforce Core metadata is extracted into Data 360, labeled Salesforce Catalog, where it is stored and indexed. Metadata Grounding connects that index to coding agents and other MCP clients." /><br />
			  </span></p>
<p><span style="font-weight: 400">Salesforce Catalog stays current in two ways. For supported metadata types, it picks up changes without waiting for the scheduled refresh. A full refresh also runs every 24 hours to cover all types, including those that incremental sync doesn&#8217;t support yet.</span><span style="font-weight: 400"><br />
</span></p>
<h2><span style="font-weight: 400">Metadata Grounding MCP Server in action</span></h2>
<p><span style="font-weight: 400">Most work in an org starts with a question about what&#8217;s already there. Where&#8217;s the code behind this bug? Do we already have this logic?</span></p>
<p><span style="font-weight: 400">The two use cases below answer those questions in that order. Each one ran in </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto</span></a><span style="font-weight: 400">, our sample food delivery org, so the queries and results are real. Both ran in Claude Code with Metadata Grounding connected and a project rule in place that tells the agent to check the org first. You&#8217;ll find the rule at the end of this section. Your results depend on your org&#8217;s metadata and how well it&#8217;s described.</span></p>
<h3><span style="font-weight: 400">Find the metadata component behind a bug</span></h3>
<p><span style="font-weight: 400">Here&#8217;s the ticket I used in an org installed with </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto</span></a><span style="font-weight: 400"> sample app:</span></p>
<p><em>&#8220;On the menu page, clicking a category doesn&#8217;t do anything. I click Breakfast and it still shows me the whole menu. It works when the page first loads, then breaks the moment you touch it. The All Categories button does nothing at all.&#8221;</em></p>
<p><span style="font-weight: 400">The developer isn&#8217;t familiar with this feature, and the org has hundreds of components. There&#8217;s no field name to search for, only a symptom. The project folder is empty, so there&#8217;s nothing local to grep. I gave the ticket to Claude Code with Metadata Grounding connected and added: &#8220;Find whatever is behind that. I don&#8217;t know what it&#8217;s called. Search by type: look through Apex classes first, then Lightning web components.&#8221;</span></p>
<p><span style="font-weight: 400">The agent starts with <code>describe_metadata</code> to see what&#8217;s available. Then it searches Apex classes by plain English, not by name:</span></p>
<pre language="text">{
  "query": "code that loads a restaurant menu and its categories and items",
  "metadataType": "ApexClass",
  "limit": 8
}
</pre>
<p>Among the results is <code>MenuBrowserController</code>, whose name and purpose match the symptom. A second search, limited to Lightning web components, finds the component that goes with it:</p>
<pre language="text">{
  "query": "menu",
  "metadataType": "LightningComponentBundle",
  "limit": 8
}
</pre>
<p>In my org that returns <code>c__menuBrowser</code> as the first match. A <code>query_metadata</code> call on it shows the targets it&#8217;s exposed on, including record pages, app pages, and Experience Cloud pages.</p>
<p>			  <span class="postimagessection_specify alignnone size-full wp-image-207298" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261104085758/image2_259092-e1793811494860.png" class="postimages" width="1000" height="277" alt="Screenshot of Claude Code using Metadata Grounding to search the Pronto org for the menu bug. Searches filtered by Apex class and Lightning web component return MenuBrowserController and c__menuBrowser." /><br />
			  </span></p>
<p><span style="font-weight: 400">Metadata Grounding tells the agent what exists and where it lives. It doesn&#8217;t return source code. To read the code, the agent switches tools and retrieves only the items it needs into the empty project, such as the controller and the component. The org stays on the server, and only what the fix touches comes down.</span></p>
<p>Two things to notice. The match came from a business symptom, not a name the developer already knew. And the type filter did real work. The same query without <code>metadataType</code> returns standard fields from across the platform, which is noise.</p>
<p><b>Note:</b><span style="font-weight: 400"> The Lightning web component record currently has no description, so the ranking relies on the component name and its properties. The richer the descriptions in your org, the better the search gets. More on that in the roadmap “What’s next” section below.</span></p>
<h3><span style="font-weight: 400">Extend what exists instead of rebuilding it</span></h3>
<p><span style="font-weight: 400">A developer asks the agent to add a customer review summary to a storefront page for the </span><a href="https://github.com/trailheadapps/pronto"><span style="font-weight: 400">Pronto</span></a><span style="font-weight: 400"> app. The project rule tells the agent to check the org first, so before writing anything it searches Apex classes:</span></p>
<pre language="text">{
  "query": "summarize customer reviews for a restaurant",
  "metadataType": "ApexClass",
  "limit": 8
}
</pre>
<p>The first result is <code>AgentSummarizeReviewsActions</code>, which already exists in the org. A <code>query_metadata</code> call on it returns the full class, including an invocable method labeled &#8220;Summarize Reviews&#8221; that retrieves recent reviews for a storefront and returns summary statistics. The agent can see the inputs it requires: an account ID and a storefront ID, as well as optional limits for how many days back to look and how many reviews to return.</p>
<p><span style="font-weight: 400">So the agent builds on the existing class instead of writing a new query. The developer keeps working code, and the team doesn&#8217;t end up with two classes that do the same job.</span></p>
<p>			  <span class="postimagessection_specify alignnone size-full wp-image-207299" ><br />
			    <img loading="lazy" decoding="async" src="https://d259t2jj6zp7qm.cloudfront.net/images/20261104085957/image3_7d5b6e-e1793811612422.png" class="postimages" width="1000" height="358" alt="Screenshot of Claude Code searching Apex classes for &quot;summarize customer reviews for a restaurant.&quot; The top result is the existing AgentSummarizeReviewsActions class." /><br />
			  </span></p>
<p><span style="font-weight: 400">You can make this behavior the default. Add an instruction like this to your project rules or agent instructions:</span></p>
<p><span style="font-weight: 400">Before you write code that references an object, field, component, or Apex class, search my org with Metadata Grounding. Query the record you plan to use and confirm it exists. If something similar already exists, extend it instead of creating a new one.</span></p>
<p><span style="font-weight: 400">You can also install skills instead of writing the rule yourself. The </span><a href="https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-metadata-grounding-get"><span style="font-weight: 400">platform-metadata-grounding-get</span></a><span style="font-weight: 400"> skill teaches your agent how to use Metadata Grounding. The </span><a href="https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-metadata-discovery-get"><span style="font-weight: 400">platform-metadata-discovery-get</span></a><span style="font-weight: 400"> skill helps it choose between Metadata Grounding, SOQL, and the Salesforce CLI. Both are in the </span><a href="https://github.com/forcedotcom/sf-skills"><span style="font-weight: 400">public sf-skills repo</span></a><span style="font-weight: 400">.</span></p>
<h2><span style="font-weight: 400">Choose where to connect</span></h2>
<p><span style="font-weight: 400">Metadata Grounding is available on two servers, both of which are in Beta.</span></p>
<p><b>The Metadata Grounding MCP Server (Beta)</b><span style="font-weight: 400"> is the best way to get started today. It&#8217;s read-only, and it works with any MCP-compatible client such as Claude Code, Cursor, or ChatGPT. If you want discovery and reuse and nothing else, start here.</span></p>
<p><span style="font-weight: 400">The Metadata Grounding MCP Server will be available out of the box in Agentforce Vibes and included in the </span><a href="https://developer.salesforce.com/docs/platform/salesforce-skills-plugins/overview"><span style="font-weight: 400">Salesforce Development Plugin for Claude Code</span></a><span style="font-weight: 400">.</span></p>
<p><b>The Headless 360 MCP Server (Beta)</b><span style="font-weight: 400"> is where Metadata Grounding is headed. It&#8217;s the one-stop MCP for the Headless Toolkit, exposing the same Metadata Grounding capabilities, along with the tools an agent uses to act on your org. One connection and one place to manage access, with grounding next to action.</span></p>
<p><span style="font-weight: 400">The shape differs a little. The standalone server gives your agent three tools directly. Inside the Headless 360 MCP Server, the agent reaches the same capability through the four tools it already uses: </span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Discover finds the grounding workflow, </span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Describe shows its steps, and </span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Dispatch / Dispatch Read Only runs the search and query.</span></li>
</ul>
<p><span style="font-weight: 400">If you build prompts or tests around the three tool names exposed in the standalone MCP server, they won&#8217;t carry over unchanged.</span></p>
<p><b>Note:</b><span style="font-weight: 400"> We&#8217;re working to bring the Headless 360 MCP Server to full parity with the standalone server. We&#8217;ll publish guidance on any change before it affects you, and we&#8217;ll update this post. The Headless 360 MCP Server will be renamed to the Salesforce MCP Server when it reaches general availability.</span></p>
<h3><span style="font-weight: 400">Before you begin</span></h3>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Your org needs an edition that Data 360 supports, with Data 360 provisioned and API Enabled. Salesforce Catalog is opt-in through Data Cloud Setup Feature Manager.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Data 360 isn&#8217;t supported in scratch orgs. Salesforce Catalog isn&#8217;t available in Developer Edition orgs that use namespaces.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">An admin sets up the connection and activates the server. All Platform Hosted MCP Servers require admin activation.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The server returns only the metadata that the authorized user is permitted to access.</span></li>
</ul>
<p><b>Note:</b><span style="font-weight: 400"> The </span><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_headless360_mcp_servers_metadata_grounding.htm&amp;release=264&amp;type=5"><span style="font-weight: 400">Metadata Grounding MCP Server</span></a><span style="font-weight: 400"> is a beta service that is subject to the Beta Services Terms. Use of this beta service is at the Customer&#8217;s sole discretion.</span></p>
<p><b>Tip:</b><span style="font-weight: 400"> Try Metadata Grounding in a sandbox or developer org first, then move to production once your team is comfortable with how the agent uses it.</span></p>
<h3><span style="font-weight: 400">Connect the Metadata Grounding MCP Server</span></h3>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Follow the </span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/setup-overview.html"><span style="font-weight: 400">Platform Hosted MCP Server setup guide</span></a><span style="font-weight: 400"> to create an External Client App and log in to your org.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">In Setup, find the Salesforce Hosted MCP Servers section, locate Metadata Grounding Beta, and click Activate.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Add the </span><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/metadata-grounding.html"><span style="font-weight: 400">server to your MCP client and authorize</span></a><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Ask a first question to confirm it works, such as &#8220;Which objects track reservations?&#8221;</span></li>
</ol>
<h3><span style="font-weight: 400">What to know before you rely on it</span></h3>
<ul>
<li style="font-weight: 400"><b>Search finds candidates; query confirms them.</b><span style="font-weight: 400"> Have your agent read the full record before it writes code against it.</span></li>
<li style="font-weight: 400"><b>Results can lag a change.</b><span style="font-weight: 400"> Something you deployed a moment ago can take time to appear. See the “What&#8217;s behind the tools” section for how refresh works.</span></li>
<li style="font-weight: 400"><b>The set of types is broad but not complete.</b><span style="font-weight: 400"> Use </span><span style="font-weight: 400">describe_metadata</span><span style="font-weight: 400"> to see exactly which types your org exposes, and don&#8217;t treat a search as an exhaustive inventory.</span></li>
<li style="font-weight: 400"><b>It&#8217;s read-only.</b><span style="font-weight: 400"> To change your org, pair it with the Headless 360 MCP Server or your existing deployment tools.</span></li>
<li style="font-weight: 400"><b>It returns metadata, not source code.</b><span style="font-weight: 400"> The agent can find the Apex class or component and see its properties. To read or edit the code, it retrieves that one item with the Salesforce CLI or the Metadata API.</span></li>
<li style="font-weight: 400"><b>Billing.</b><span style="font-weight: 400"> Metadata Grounding usage, including the underlying Data 360 consumption, is metered in production orgs and unmetered in pre-production orgs such as sandboxes and Developer Edition. See </span><a href="https://help.salesforce.com/s/articleView?id=data.c360_a_salesforce_catalog_billing_considerations.htm&amp;type=5"><b>Billing Considerations for Salesforce Catalog</b></a> <span style="font-weight: 400">for details.</span></li>
</ul>
<h2><span style="font-weight: 400">What&#8217;s next</span></h2>
<p><span style="font-weight: 400">We&#8217;re working on two additions that build on this foundation. AI-Generated Metadata Descriptions will make metadata more meaningful to agents, so searches like the menu example get sharper even when a component has no description today. The Metadata Graph will let an agent use dependency analysis to see what could break before it acts. Want to try them early? </span><a href="https://docs.google.com/forms/d/e/1FAIpQLSc3X7ujzcjVViQQKAv7f5Bj19vz-cPfCqKvaMH80hB7bjkcEw/viewform"><span style="font-weight: 400">Sign up for early access.</span></a></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">Coding agents are only as good as their view of your org. Skills tell them how to build, and the Headless 360 MCP Server lets them act. Metadata Grounding lets them see, so they extend what you have rather than rebuild it.</span></p>
<p><span style="font-weight: 400">A good place to start: activate the Metadata Grounding MCP Server in a sandbox that has Salesforce Catalog enabled, add the project rule above, and give your agent a ticket for a feature you suspect already exists somewhere in the org. We welcome </span><a href="https://forms.gle/G3Xuto6tMAUfhA1K7"><span style="font-weight: 400">your feedback</span></a><span style="font-weight: 400"> to help shape what ships next.</span></p>
<p><span style="font-weight: 400">Watch the </span><a href="https://developer.salesforce.com/"><span style="font-weight: 400">Salesforce Developers website</span></a><span style="font-weight: 400"> for documentation, release notes, and hands-on content.</span></p>
<h2><span style="font-weight: 400">Resources</span></h2>
<ul>
<li style="font-weight: 400"><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_headless360_mcp_servers_metadata_grounding.htm&amp;release=264&amp;type=5"><span style="font-weight: 400">Discover Org Metadata with the Metadata Grounding MCP Server (Beta)</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/metadata-grounding.html"><span style="font-weight: 400">Metadata Grounding MCP Server (Beta) Dev Documentation</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/setup-overview.html"><span style="font-weight: 400">Platform Hosted MCP Server Setup Guide</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-metadata-grounding-get"><span style="font-weight: 400">Metadata Grounding Skill (sf-skills)</span></a></li>
<li style="font-weight: 400"><a href="https://github.com/forcedotcom/sf-skills/tree/main/skills/platform-metadata-discovery-get"><span style="font-weight: 400">Metadata Discovery Skill (sf-skills)</span></a></li>
<li style="font-weight: 400"><a href="https://help.salesforce.com/s/articleView?id=release-notes.rn_cdp_2026_winter_salesforce_catalog_ga.htm&amp;release=264&amp;type=5"><span style="font-weight: 400">Ground Users and Agents in Your Metadata with Salesforce Catalog (Generally Available)</span></a></li>
<li style="font-weight: 400"><a href="https://help.salesforce.com/s/articleView?id=data.c360_a_salesforce_catalog.htm&amp;type=5"><span style="font-weight: 400">Salesforce Catalog Documentation</span></a></li>
<li style="font-weight: 400"><a href="https://developer.salesforce.com/blogs/2026/07/announcing-the-headless-360-mcp-server-beta"><span style="font-weight: 400">Announcing the Headless 360 MCP Server Beta</span></a></li>
</ul>
<h2><span style="font-weight: 400">About the author</span></h2>
<p><a href="mailto:ggambino@salesforce.com"><span style="font-weight: 400">Gonzalo Gambino</span></a><span style="font-weight: 400"> is a Senior Director of Product Management at Salesforce and the product domain lead for Platform Metadata and Schema. Gonzalo&#8217;s domain covers the schema and metadata foundation for the platform, including Metadata Grounding.</span></p>
<p>The post <a href="https://developer.salesforce.com/blogs/2026/11/metadata-grounding-let-your-coding-agent-search-your-org-by-intent">Metadata Grounding: Let Your Coding Agent Search Your Org by Intent</a> appeared first on <a href="https://developer.salesforce.com/blogs">Salesforce Developers Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://developer.salesforce.com/blogs/2026/11/metadata-grounding-let-your-coding-agent-search-your-org-by-intent/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">207282</post-id><media:thumbnail url="https://d259t2jj6zp7qm.cloudfront.net/images/20261104084827/Generic-A-11-e1793810926525.png?w=1000" />
<media:content url="https://d259t2jj6zp7qm.cloudfront.net/images/20261104084827/Generic-A-11-e1793810926525.png?w=1000" medium="image" />
	</item>
	</channel>
</rss>
