Skip to main content
The online Trailblazer Community is now read-only. Soon, the Trailblazer Community will come together in Slack for what’s next. Read the FAQ | Get Help

Set Up Your Development Environment

Learning Objectives

After completing this unit, you’ll be able to:

  • Configure the developer tools for agent development.
  • Set up a Salesforce org for agent development.
  • Clone a repo that contains a sample agent in a Salesforce DX project.

Before You Start

Before you start this badge, we recommend that you complete this content. The work you do here builds on the concepts and skills you develop in that content.

Coral Cloud Resorts + Agentforce Vibes

You, a software developer, were recently hired by the development team at Coral Cloud Resorts and you’re learning all about creating agents. After completing the Build an Agent Using Agentforce DX badge, you’re now familiar with the Local Info Agent that provides customers with local weather updates and resort hours. You used the Agentforce DX tools (Salesforce CLI and VS Code commands) to preview and publish the agent, and even manually updated its Agent Script file to change its behavior.

But now you’re ready to add a new feature to the agent that provides details about local events close to the resort. You want to use natural language rather than manually updating code. Sounds like a job for Agentforce Vibes!

Codey is smiling and walking.

Agentforce Vibes IDE, Agentforce Vibes, and Agentforce DX

Agentforce Vibes IDE, formerly known as Code Builder, is a web-based integrated development environment that delivers the full power and flexibility of Visual Studio Code (VS Code) in your browser. It includes Salesforce Extensions, the Salesforce CLI, and GitHub integration, so you don’t need to install extra software to start building.

Agentforce Vibes is an AI-powered coding companion that helps you build and modify Salesforce apps and agents using natural language. Agentforce Vibes IDE includes Agentforce Vibes. Instead of manually writing Agent Script code or running CLI commands, you describe what you want, and Agentforce Vibes does the work.

Under the hood, Agentforce Vibes uses Agentforce DX — the pro code toolset for building agents. In this module, you use natural language prompts instead of manually running CLI commands or editing code.

Agentforce Vibes comes with specialized AI skills for developing agents. These activate automatically based on your requests. You’ll occasionally see prompts that explicitly mention these skills to help conserve AI tokens.

Sign Up for a Custom Playground with Agentforce Vibes IDE

To complete this badge, you need a special, limited-time custom playground with Agentforce and Agentforce Vibes IDE.

  1. Select Create Playground, and then select Yes, Create Playground.
  2. Your new org is automatically attached to your Trailhead account.
  3. Make note of your org's expiration date and complete this badge before then.
  4. Select Launch to open the playground.

Activate Agentforce in Your Playground

To develop agents using Agentforce DX, confirm that Agentforce is enabled in your playground. Einstein is the org-level toggle required for every AI feature, including Agentforce DX.

  1. To open the Setup menu, select Setup Setup icon.
  2. In the Quick Find box, search for and select Einstein Setup.
  3. Make sure the Turn on Einstein toggle is set to On.
  4. If you changed the toggle status, refresh your browser.

Einstein Setup page in Setup showing Einstein enabled.

Next, enable the Agentforce (Default) feature in Salesforce Go so that you can create agents for your users.

  1. In the Quick Find box, search for and select Salesforce Go.
  2. In the Search features in your org… text box, enter Agentforce (Default).
  3. In the Agentforce (Default) feature box, select Set Up.
  4. Select Get Started.
  5. Select Turn On.
  6. Select Turn On again.

The Agentforce (Default) setup page in Salesforce displays the Turn On button.

Launch Agentforce Vibes IDE

With the required platform features turned on, you’re ready to configure your agent project in Agentforce Vibes IDE.

  1. To open Agentforce Vibes IDE, select Setup and select Agentforce Vibes from the dropdown menu.
  2. Review and accept the Terms and Conditions.

The first time you launch Agentforce Vibes IDE, it runs through a setup process that may take a few minutes. You see the message: “Agentforce Vibes is loading…” After Agentforce Vibes IDE loads successfully, the Agentforce Vibes IDE editor window opens by default.

The Agentforce Vibes IDE editor window.

  1. Configure Workspace Trust settings. This feature allows Agentforce Vibes IDE to execute agents, terminal commands, extensions, and other tasks in selected folders.
    • If the “Do you trust the authors of the files in this folder?” window opens automatically, select the checkbox Trust the authors of all files in the parent folder ‘codebuilder’, and then select Yes, I trust the authors.
    • If the “Do you trust the authors of the files in this folder?” window doesn’t open automatically:
      • Select Restricted Mode in the bottom status bar. The Workspace Trust window opens.

The Workspace Trust window, which opens when you select Restricted Mode (highlighted)  from the bottom status bar. The Add Folder button is highlighted.

      • In the Trusted Folders & Workspaces section, select Add Folder. Enter /home/codebuilder/, and then select Trust Folder.
      • Close the Workspace Trust window.
      • Confirm that the Restricted Mode button no longer appears in the bottom status bar.

If the Agentforce Vibes side panel opens automatically, select I agree to the terms, and then select Enable Agentforce. Dismiss any additional pop-up windows that appear.

Clone the Sample Repo

As already mentioned, your dev team has started working on the Local Info Agent and has checked the source code into a GitHub repository. The source code is organized using a standard Salesforce DX project, which provides a project structure for your org’s metadata (code and configuration), sample data, and all your team’s tests. Agents are Salesforce metadata components, so you use DX projects to store and work with them just like any other component.

Follow these steps to clone the sample repo so you can start coding the agent.

  1. Copy this Github repository URL to your clipboard: https://github.com/forcedotcom/afdx-pro-code-testdrive.git
  2. In Agentforce Vibes IDE, press Ctrl+Shift+P (Windows) or ⌘+Shift+P (macOS) to open the Command Palette.
  3. Enter Gitand select Git: Clone.
  4. In the search bar, paste https://github.com/forcedotcom/afdx-pro-code-testdrive.git and select Clone from URL.
  5. Click Select as repository destination.
  6. If a “Would you like to open the repository, or add it to the current workspace?” popup window appears, select Open.

The Agentforce Vibes IDE window reloads and sets afdx-pro-code-testdrive as the current SFDX project. Dismiss any additional pop-up windows that appear.Feel free to review the existing code in this Salesforce DX project; this badge discusses some of the agent-related artifacts later.

Agentforce Vibes IDE displaying a Salesforce DX project called “afdx-pro-code-testdrive” in the Explorer panel.

Run a Script to Create and Deploy Required Org Artifacts

The sample repo that you cloned contains the source files for the artifacts that implement the new Local Info Agent, such as Apex classes, a prompt template, and a flow. Describing these artifacts is beyond the scope of this module. But you need them in your playground to continue with this Trailhead badge, so we provide a script in the repo you just cloned.

When you run this script, it deploys the source files, assigns permissions, and creates an agent user. Agents run as a dedicated user with the Einstein Agent User profile—this user is the runtime identity for your agent.

  1. Open the terminal in Agentforce Vibes IDE by pressing Ctrl+J (Windows) or ⌘+J (macOS).
  2. In the terminal, enter this command:
    ./setup.
  3. The script displays the steps it’s running, with a green checkmark when the step completes successfully.

Important: Save the unique username the script creates—you need it in the next unit.

The Agentforce Vibes IDE integrated terminal showing the setup script running and the newly generated username highlighted.

Good job, you’re all set up to start vibe coding an agent!

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback