Skip to main content

Ihr Browser ist zu klein

Bitte ändern Sie die Größe Ihres Browsers, um weiterhin interaktiv lernen zu können. Wir empfehlen eine Breite von mindestens 900 px.

Learning Objectives

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

  • Build a functional service agent using only natural language.
  • Use headless functionality to configure or adjust an agent.
  • Use a Builder IDE to create, iterate on, and deploy an agent.
Note

Beta

You’re entering into the great experiment with us. This badge features a beta version of the Trailhead headless builder experience, which means your experience might vary from time to time.

Be sure to go through this badge using the English language. To adjust the language, select English from the dropdown menu in the footer in Unit 1.

Build an Agent Using Natural Language

In this hands-on unit, you build your first coding agent in Agentforce using natural language—not clicks—in a new headless building workspace experience.

Many of our customers build their first agent for customer service use cases. So for this exercise you're going to build an Agentforce Help Agent that you can deploy across service channels to resolve customer challenges.

Traditionally, if you wanted to build an app, you had to learn the tools and languages that were required for that app and the environment that it would be used in. Now you can use an AI coding agent to generate the code, queries, and configuration files for you. All it takes is having a conversation with the AI using plain natural language and letting the coding agent do the time-consuming heavy lifting. This back-and-forth conversation can build on the existing system or create a whole new one from scratch.

What You Can Do with Salesforce Headlessly

In this experience, you go back and forth between the instructions in the unit and the headless building workspace where you get hands-on with Agentforce.

As you complete the following steps, be certain to check back here even if the coding agent asks you clarifying questions. Start by just asking the agent what kind of service agents it can build.

  1. In the chat box with the Describe the help agent you want to build label, enter: What kind of service agents can you build?

OK, what just happened? Technically, you just entered what is called a prompt. The agent used the prompt to reason out what you wanted to know. Then the agent responded with what it found for you, and it might have asked some clarifying questions.

This isn’t a simulation. The agent uses real tools (Claude models), scoped to a focused environment (Salesforce), similar to working within a single Claude Code project.

So, what kind of things can you do?

  • Automate workflows without the UI.
  • Integrate with external systems via APIs.
  • Run agent-driven processes for Agentforce Sales and Agentforce Service.

Continue the Conversation

Based on the initial question you asked above, the coding agent likely asked you about your industry. For this example, assume you’re working in the hospitality industry and are searching for a service agent to allow your customers to ask questions, manage reservations, and submit issues all from your help site.

Ask the agent what kind of service agents are good to build for a hospitality company. If the agent doesn't respond after a few moments, simply reenter your prompt.

  1. In the chat box, enter: What kind of service agents are good to build for a hospitality company?

    The conversation has begun and will differ each time you interact with the agent. The agent provides suggestions and might even ask you additional clarifying questions. This is the power of the agent in helping you determine what’s possible, especially if you aren’t fully sure of what you want. Read through the suggestions and any clarifying questions. For this example, use the following prompt that adds two subagents and the associated actions that will do the work.
  1. In the chat box, enter: Good suggestions, let's go with an agent named 'Bookings Help Agent', and set the agent API name to 'bookings_help_agent'. Add a subagent Reservation Agent, named 'Reservation Management' with actions 'FinalizeReservation' and 'GetReservationTimeSlots'. Then add another subagent Guest Complaint Agent, named 'Guest Complaints' with action 'CreateCase'.

    Note: In this example, you provide a name and API name for the agent, as that name is referenced later in this badge. If you create another agent and don’t provide a name, the agent creates one for you.
  1. If the agent asks what personality it should have, enter: Go with 'warm' and 'gracious'. If it doesn’t, continue on to the next step.

The coding agent builds out the service agent, allowing you to view the agent script should you choose, and asks if you want to deploy it to your environment. If in reviewing the script, it isn’t set up the way you want, you can ask the agent to make changes. For this example, you tell the agent to go ahead and deploy it.

  1. In the chat box, enter: Deploy it.
  2. Your agent is now deployed. Select the View in Agents list link to view your new agent.
Note

The View in Agents list link might take a while to become active. In the next unit, you open the agent in your playground. There is always more than one way to work with your agents.

Way to go! The new service agent is deployed to your playground. In the next unit, you’ll explore the agent and try it out.