Skip to Content
Agentforce
book

Agentforce

by Martin Kihn, Marc Benioff
June 2025
Intermediate to advanced
240 pages
4h 48m
English
Wiley
Content preview from Agentforce

Chapter 15How Do You Build a Custom Agent from Scratch?

In this chapter, we are going to build an Agentforce service agent using only Agent Builder and our own savoir faire. Creating the agent is just the first step; you then have to configure and deploy it. But we'll get to that second part in a moment.

Those of you with more retentive beans will recall we built an agent together earlier, in Chapter 4. That was indeed an agent, but it did not quite reflect how it works in real life. Most agents are built to be embedded somewhere in the company's digital channels, such as on their website or in their call-center consoles. Figure 15.1 shows how such integration-in-real-life is done.

We will take you through the steps an Agentforce user would take to create a custom agent in some detail. If you're impatient for more on the agentic AI business or cultural implications, you can push on. The rest of you will be treated to a hands-on paper demo of a working agent created for the benefit of developers and admins who have some familiarity with how agents work but not exactly how to fashion one.

First, you'll open your Salesforce platform screen and look in Setup Quick Find for Agents, selecting +New Agent and then Agentforce Service Agent. By default you're given the prebuilt service agent with some preselected topics, but because we want to start from scratch, we deselect all the topics and start fresh.

Figure 15.1 AI agent lifecycle

You'll need to name your agent, provide a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

LLMOps

LLMOps

Abi Aryan
Agentic GraphRAG

Agentic GraphRAG

Anthony Alcaraz, Sam Julien
Agentic Mesh

Agentic Mesh

Eric Broda, Davis Broda

Publisher Resources

ISBN: 9781394349227