<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Exploring Agentforce</title>
    <description>The latest articles on DEV Community by Exploring Agentforce (@exploring_agentforce).</description>
    <link>https://dev.to/exploring_agentforce</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3961233%2F6a49a1b5-2ebe-4fac-89d9-748c0ce2abc0.png</url>
      <title>DEV Community: Exploring Agentforce</title>
      <link>https://dev.to/exploring_agentforce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/exploring_agentforce"/>
    <language>en</language>
    <item>
      <title>Building a React CRUD App on Salesforce with GraphQL</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Mon, 07 Sep 2026 14:59:12 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/building-a-react-crud-app-on-salesforce-with-graphql-n44</link>
      <guid>https://dev.to/exploring_agentforce/building-a-react-crud-app-on-salesforce-with-graphql-n44</guid>
      <description>&lt;p&gt;How much plumbing does a React CRUD App on Salesforce actually need? &lt;/p&gt;

&lt;p&gt;I started with a &lt;strong&gt;prebuilt SFDX project containing a React app&lt;/strong&gt;, generated with the Salesforce CLI. It comes with the React boilerplate and required dependencies already set up (check &lt;a href="https://dev.to/exploring_agentforce/how-to-quickly-scaffold-and-deploy-a-react-app-on-salesforce-1cjj"&gt;here&lt;/a&gt; how to quickly generate SFDX project with React &lt;code&gt;uiBundle&lt;/code&gt; data). I then connected the project to a Salesforce sandbox.&lt;/p&gt;

&lt;p&gt;The goal was simple: build a small React UI that could &lt;strong&gt;read and update real Salesforce Cases&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Basically, to build the integration, you just need:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Generate the GraphQL schema
&lt;/h3&gt;

&lt;p&gt;First, generate the Salesforce GraphQL schema:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run graphql:schema
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The schema is essentially describes the &lt;strong&gt;objects you can access and the queries you can make&lt;/strong&gt; in the org.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Define the GraphQL operations
&lt;/h3&gt;

&lt;p&gt;Using the schema, define the &lt;strong&gt;GraphQL operations&lt;/strong&gt; the UI needs.&lt;/p&gt;

&lt;p&gt;For my Cases app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Queries:&lt;/strong&gt; Get Cases, Get Case details&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mutation:&lt;/strong&gt; Update a Case&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Generate TypeScript types
&lt;/h3&gt;

&lt;p&gt;Next, use GraphQL Code Generator to generate TypeScript types from the Salesforce schema and the operations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run graphql:codegen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the React app type-safe definitions for query results, variables, and mutations without manually defining the data shapes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Setup GraphQL client
&lt;/h3&gt;

&lt;p&gt;To execute the queries and mutations, use the &lt;strong&gt;Data SDK (&lt;code&gt;@salesforce/platform-sdk&lt;/code&gt;)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It includes a GraphQL client and handles authentication and CSRF token management.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Build the UI
&lt;/h3&gt;

&lt;p&gt;From there, the AI coding tool handled most of the React implementation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cases → Case details → Edit → Save&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that's where things got interesting.&lt;/p&gt;




&lt;p&gt;The interesting part isn’t just GraphQL or React individually. It’s how well the pieces fit together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React is extremely good at building the UI.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraphQL is extremely good at fetching the data you need&lt;/strong&gt;, including related data — you can fetch an account, its related cases, contacts, and more in a single query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI coding agents are extremely good at generating the React boilerplate, GraphQL queries, and wiring the pieces together.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And Salesforce already provides the backend: the data model, relationships, authentication, permissions, validation, and APIs.&lt;/p&gt;

&lt;p&gt;You can spend less time building the integration — and more time concentrating on UI/UX and deciding what data you want to show and how you want to show it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://developer.salesforce.com/docs/platform/multiframework/guide/reactdev-data-sdk-usage.html" rel="noopener noreferrer"&gt;Fetch data with Data SDK&lt;/a&gt;&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Debugging AgentScript: Three Ways to Find Compilation Errors</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Tue, 25 Aug 2026 08:07:05 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/debugging-agentscript-three-ways-to-find-compilation-errors-2glg</link>
      <guid>https://dev.to/exploring_agentforce/debugging-agentscript-three-ways-to-find-compilation-errors-2glg</guid>
      <description>&lt;p&gt;If you're working with AgentScript, you may run into a frustrating situation: &lt;strong&gt;the agent doesn't compile, but Agentforce Builder gives you a generic error message.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes the Problems tab in the new Builder shows an error, but it doesn't give you enough information to understand what went wrong.&lt;/p&gt;

&lt;p&gt;There are a few ways to approach debugging. This is the workflow I currently use.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. VS Code + Salesforce DX Extensions
&lt;/h3&gt;

&lt;p&gt;If you're developing AgentScript in VS Code, the Salesforce DX extensions provide syntax checking directly in the editor.&lt;/p&gt;

&lt;p&gt;Syntax issues are highlighted as you work, so VS Code is a good first place to check when something doesn't compile.&lt;/p&gt;

&lt;p&gt;It's fast feedback and often enough to spot an obvious syntax issue before doing anything else.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Salesforce CLI validation
&lt;/h3&gt;

&lt;p&gt;When VS Code doesn't give you enough information, I use Salesforce CLI validation.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf agent validate authoring-bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI will prompt you to select the &lt;code&gt;AiAuthoringBundle&lt;/code&gt; you want to validate.&lt;/p&gt;

&lt;p&gt;If validation fails, the output includes: the syntax error,  a short description of the error, the relevant line number in the AgentScript file.&lt;/p&gt;

&lt;p&gt;For me, this is currently the &lt;strong&gt;most reliable way to validate AgentScript syntax&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax4falyf2nl5s40pqlc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax4falyf2nl5s40pqlc1.png" alt=" " width="655" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The useful part is that the CLI points you to the actual location of the problem instead of just telling you that the agent failed to compile.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Agentforce Builder AI Assistant
&lt;/h3&gt;

&lt;p&gt;There is also another option directly in Agentforce Builder: the built-in AI assistant.&lt;/p&gt;

&lt;p&gt;You can ask it to &lt;strong&gt;review your AgentScript&lt;/strong&gt;. It can identify syntax errors and also suggest improvements to the code.&lt;/p&gt;

&lt;p&gt;However, I wouldn't rely on it as the only validation method. There is no guarantee that it will find every syntax error, and its suggestions quality can vary.&lt;/p&gt;

&lt;h3&gt;
  
  
  My current workflow
&lt;/h3&gt;

&lt;p&gt;When an AgentScript agent doesn't compile, I usually go through these three steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VS Code&lt;/strong&gt; → quick feedback and syntax highlighting&lt;br&gt;
&lt;strong&gt;Salesforce CLI&lt;/strong&gt; → reliable validation and specific error locations&lt;br&gt;
&lt;strong&gt;Builder AI Assistant&lt;/strong&gt; → additional review and suggestions&lt;/p&gt;

&lt;p&gt;Using all three together has been much more effective than relying on a single validation method.&lt;/p&gt;

</description>
      <category>salesforce</category>
      <category>agentforce</category>
      <category>agentscript</category>
      <category>sfdx</category>
    </item>
    <item>
      <title>How to Quickly Scaffold and Deploy a React App on Salesforce</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Tue, 18 Aug 2026 08:32:20 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/how-to-quickly-scaffold-and-deploy-a-react-app-on-salesforce-1cjj</link>
      <guid>https://dev.to/exploring_agentforce/how-to-quickly-scaffold-and-deploy-a-react-app-on-salesforce-1cjj</guid>
      <description>&lt;p&gt;Salesforce provides CLI templates that can quickly scaffold a React application with a ready-to-run React/Vite setup.&lt;/p&gt;

&lt;p&gt;There are two approaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate a &lt;strong&gt;complete SFDX project&lt;/strong&gt; with an internal React app.&lt;/li&gt;
&lt;li&gt;Generate a &lt;strong&gt;React UI Bundle&lt;/strong&gt; inside an existing SFDX project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both give you React boilerplate that you can run, explore, customize, and deploy. The main difference is how much Salesforce setup is included and what you need to do before the app is available in the org.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;You'll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VS Code&lt;/li&gt;
&lt;li&gt;Salesforce CLI (&lt;code&gt;sf&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Salesforce Extension Pack&lt;/li&gt;
&lt;li&gt;A Salesforce org, such as a Trailhead Playground&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check your connected orgs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf org list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set your default org:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf config &lt;span class="nb"&gt;set &lt;/span&gt;target-org&lt;span class="o"&gt;=&lt;/span&gt;my-org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Option 1: Generate a complete SFDX project
&lt;/h2&gt;

&lt;p&gt;If you're starting from scratch, you can generate a complete project using the &lt;code&gt;reactinternalapp&lt;/code&gt; template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf template generate project &lt;span class="nt"&gt;--name&lt;/span&gt; my-react-app &lt;span class="nt"&gt;--template&lt;/span&gt; reactinternalapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a new Salesforce DX project with the React application and the Salesforce metadata needed for an internal React app.&lt;/p&gt;

&lt;p&gt;Install the dependencies and start the React app locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-react-app
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You now have a prebuilt React application that you can explore and modify.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying the project
&lt;/h3&gt;

&lt;p&gt;From the project root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build the production bundle (run command from force-app/main/default/uiBundles/react-app-name)&lt;/span&gt;
npm run build
&lt;span class="c"&gt;# Deploy the production bundle (run from the SFDX project root)&lt;/span&gt;
sf project deploy start &lt;span class="nt"&gt;--source-dir&lt;/span&gt; force-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After deployment, assign the generated permission set to your user if required by the generated project - app appears in the App Launcher.&lt;/p&gt;

&lt;p&gt;The advantage of this approach is that Salesforce gives you a more complete starting point. You're starting with an application rather than just a UI Bundle.&lt;/p&gt;




&lt;h2&gt;
  
  
  Option 2: Generate a React UI Bundle
&lt;/h2&gt;

&lt;p&gt;This approach is useful when you &lt;strong&gt;already have an SFDX project&lt;/strong&gt; and want to add a React application to it.&lt;/p&gt;

&lt;p&gt;From the root of your existing project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf template generate ui-bundle &lt;span class="nt"&gt;--name&lt;/span&gt; ReactDemo &lt;span class="nt"&gt;--template&lt;/span&gt; reactbasic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bundle is created under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;force-app/
└── main/
    └── default/
        └── uiBundles/
            └── ReactDemo/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside you'll find the React application. &lt;/p&gt;

&lt;p&gt;Install the dependencies and run locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;force-app/main/default/uiBundles/ReactDemo
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you the same basic experience you'd expect from a modern React/Vite application: start with working boilerplate and then build on top of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying the UI Bundle
&lt;/h3&gt;

&lt;p&gt;Go back to the SFDX project root and deploy the bundle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build the production bundle (run command from force-app/main/default/uiBundles/react-app-name)&lt;/span&gt;
npm run build
&lt;span class="c"&gt;# Deploy the production bundle (run from the SFDX project root)&lt;/span&gt;
sf project deploy start &lt;span class="nt"&gt;--source-dir&lt;/span&gt; force-app/main/default/uiBundles/ReactDemo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, this is where the two approaches differ. The &lt;code&gt;reactbasic&lt;/code&gt; UI Bundle gives you the React application itself, but you need additional Salesforce metadata to expose it as an internal application:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;CustomApplication&lt;/code&gt; under &lt;code&gt;force-app/main/default/applications/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A reference from the application to the UI Bundle&lt;/li&gt;
&lt;li&gt;A permission set that makes the application visible&lt;/li&gt;
&lt;li&gt;Assignment of that permission set to your user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once that setup is deployed and the permission set is assigned, the React application becomes available through the Salesforce App Launcher.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which approach should you use?
&lt;/h2&gt;

&lt;p&gt;If you're starting a &lt;strong&gt;new Salesforce project&lt;/strong&gt;, the complete project template is the easier starting point. If you already have a Salesforce DX project and want to add React to it, use the UI Bundle.&lt;/p&gt;

&lt;p&gt;Both approaches solve the same basic problem: &lt;strong&gt;get a working React application scaffolded quickly so you can start exploring and developing. **The difference is **where you start&lt;/strong&gt; and &lt;strong&gt;how much Salesforce setup you have to do yourself&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>salesforce</category>
      <category>react</category>
      <category>sfdx</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Retrieve and Deploy AgentScript with Salesforce CLI</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Sun, 07 Jun 2026 19:54:04 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/how-to-retrieve-and-deploy-agentscript-with-salesforce-cli-2lh8</link>
      <guid>https://dev.to/exploring_agentforce/how-to-retrieve-and-deploy-agentscript-with-salesforce-cli-2lh8</guid>
      <description>&lt;p&gt;With Salesforce CLI, you can &lt;strong&gt;retrieve AgentScript metadata&lt;/strong&gt; into a DX project, work with it locally in VS Code, and &lt;strong&gt;deploy changes back to your org&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VS Code&lt;/li&gt;
&lt;li&gt;Salesforce CLI&lt;/li&gt;
&lt;li&gt;Salesforce DX Extensions&lt;/li&gt;
&lt;li&gt;Agentforce org connected to Salesforce CLI (you can also connect &lt;strong&gt;Trailhead playground org&lt;/strong&gt;, see &lt;a href="https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07"&gt;this connection guide&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step 1. Create a DX Project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sf project generate &lt;span class="nt"&gt;--name&lt;/span&gt; agentforce-demo
&lt;span class="nb"&gt;cd &lt;/span&gt;agentforce-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2. Authenticate to Your Org
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org login web &lt;span class="nt"&gt;--alias&lt;/span&gt; my-agentforce-org &lt;span class="nt"&gt;--instance-url&lt;/span&gt; https://your-org-name.develop.my.salesforce.com

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the connection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org list

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the default org:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf config &lt;span class="nb"&gt;set &lt;/span&gt;target-org my-agentforce-org

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Find the Agent Name
&lt;/h3&gt;

&lt;p&gt;To retrieve AgentScript metadata, you need the &lt;strong&gt;agent name&lt;/strong&gt;. There are several ways to find it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Option 1: Agentforce Builder
&lt;/h4&gt;

&lt;p&gt;Open your agent in the new Agentforce Builder, and in the &lt;strong&gt;Agent Definition&lt;/strong&gt; view find your agent Developer Name&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnx7naecodzghcqvbr8q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnx7naecodzghcqvbr8q.png" alt=" " width="626" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Option 2: View Agents with Salesforce CLI
&lt;/h4&gt;

&lt;p&gt;If an agent has at least one published version, it appears as &lt;strong&gt;Bot metadata&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org list metadata &lt;span class="nt"&gt;--metadata-type&lt;/span&gt; Bot

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Full Name
------------------
CC_Service_Agent
Sales_Agent
Support_Agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: This command only lists agents &lt;strong&gt;that have a published version&lt;/strong&gt;. Draft-only agents may not appear.&lt;/p&gt;

&lt;h4&gt;
  
  
  Option 3: List AgentScript Bundles
&lt;/h4&gt;

&lt;p&gt;You can also list AgentScript bundles directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org list metadata &lt;span class="nt"&gt;--metadata-type&lt;/span&gt; AiAuthoringBundle

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Full Name
------------------
CC_Service_Agent
CC_Service_Agent_1
CC_Service_Agent_2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will list &lt;strong&gt;all versions of all agents your org&lt;/strong&gt; (draft and published).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Retrieve AgentScript Metadata
&lt;/h3&gt;

&lt;p&gt;Retrieve a specific agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf project retrieve start &lt;span class="nt"&gt;--metadata&lt;/span&gt; AiAuthoringBundle:Your_Agent_Name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example: if your agent Developer Name is "My_Agent", the command will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf project retrieve start &lt;span class="nt"&gt;--metadata&lt;/span&gt; AiAuthoringBundle:My_Agent

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Retrieved metadata is stored in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;force-app/
└── main/
    └── default/
        └── aiAuthoringBundles/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bundle contains the AgentScript configuration used by Agentforce Builder.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 5: Deploy Changes Back to the Org
&lt;/h3&gt;

&lt;p&gt;After making changes locally deploy them back to the org:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf project deploy start &lt;span class="nt"&gt;--metadata&lt;/span&gt; AiAuthoringBundle:Your_Agent_Name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Important: Draft vs Published Agents
&lt;/h3&gt;

&lt;p&gt;⚠️ One detail that is not immediately obvious when working with Agentforce: only &lt;strong&gt;draft agents can be deployed&lt;/strong&gt;, &lt;strong&gt;committed&lt;/strong&gt; (published) agents are &lt;strong&gt;immutable&lt;/strong&gt;. To deploy changes, first open Agentforce Studio and create a draft version of your agent, then you can deploy changes from VS Code. If you try to deploy to committed agent, you'll get an error message.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Draft Agent&lt;/th&gt;
&lt;th&gt;Published Agent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Retrieve&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inspect&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edit Locally&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deploy Changes&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In practice, this means you can retrieve metadata from both draft and published agents, but deployment targets a draft version managed in Agentforce Builder.&lt;/p&gt;




&lt;p&gt;Using &lt;strong&gt;Salesforce CLI&lt;/strong&gt; makes it much easier to inspect AgentScript metadata, use &lt;strong&gt;version control&lt;/strong&gt;, and work with Agentforce in a &lt;strong&gt;development workflow&lt;/strong&gt; instead of only through the browser.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Useful links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connect a Trailhead Org to Salesforce CLI &lt;a href="https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07"&gt;guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Read more in the &lt;a href="https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-deploy-metadata.html" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>agentforce</category>
      <category>sfdx</category>
      <category>agentscript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Connect a Trailhead Org to Salesforce CLI</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Sun, 31 May 2026 14:45:05 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07</link>
      <guid>https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07</guid>
      <description>&lt;h2&gt;
  
  
  Take Trailhead Learning beyond the browser
&lt;/h2&gt;

&lt;p&gt;Salesforce &lt;strong&gt;Trailhead&lt;/strong&gt; is a great way to learn &lt;strong&gt;Agentforce&lt;/strong&gt;. You can &lt;strong&gt;level up this experience&lt;/strong&gt; by connecting your Trailhead org to Salesforce CLI and working with AgentScript metadata locally in VS Code. Here’s a &lt;strong&gt;quick setup&lt;/strong&gt; flow for connecting a Trailhead Agentforce org to Salesforce CLI 👇&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;:&lt;br&gt;
• VS Code&lt;br&gt;
• Salesforce CLI installed&lt;br&gt;
• Trailhead org with Agentforce enabled&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 1. Open your Trailhead org
&lt;/h4&gt;

&lt;p&gt;Launch the Trailhead playground or developer org that you want to connect.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2. Find your username
&lt;/h4&gt;

&lt;p&gt;Profile → Settings&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 3. Set password (if not set already)
&lt;/h4&gt;

&lt;p&gt;Settings → Change My Password&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 4. Connect org via CLI
&lt;/h4&gt;

&lt;p&gt;Authenticate via browser, setting up alias for the org and providing your Trailhead org url:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="c"&gt;# Authenticate with your Trailhead org&lt;/span&gt;

sf org login web &lt;span class="nt"&gt;--alias&lt;/span&gt; your-org-alias &lt;span class="nt"&gt;--instance-url&lt;/span&gt; https://your-org-name.develop.my.salesforce.com

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 5. Verify connection
&lt;/h4&gt;

&lt;p&gt;Confirm that the org was added successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org list

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 6. Set the default org
&lt;/h4&gt;

&lt;p&gt;To avoid specifying the org in every command, set it as the default target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf config &lt;span class="nb"&gt;set &lt;/span&gt;target-org your-org-alias

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: Use the Correct Login URL&lt;/p&gt;

&lt;p&gt;Trailhead org URLs used for login usually look like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://your-org-name.develop.my.salesforce.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOT&lt;/strong&gt;:&lt;br&gt;
• &lt;code&gt;login.salesforce.com&lt;/code&gt;&lt;br&gt;
• &lt;code&gt;develop.lightning.force.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once connected, you can &lt;strong&gt;retrieve AgentScript metadata&lt;/strong&gt; locally in VS Code, experiment faster, and work with Agentforce in a more &lt;strong&gt;development-oriented workflow&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>agentforce</category>
      <category>trailhead</category>
      <category>sfdx</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
