๐Ÿ  Home ๐Ÿ”’ Record Sharing ⚙ Apex Triggers ๐Ÿ” SOQL ๐Ÿ’ป LWC ๐Ÿ”— Integration ๐Ÿค– Flows & Automation ๐Ÿค– Agentforce & AI ๐ŸŽˆ Agentforce Course — Free ☁ Data Cloud ๐ŸŽ“ DC Course — Free ๐Ÿ’ต CPQ ๐ŸŽฏ 100 Scenario Questions ๐Ÿ† 150 Advanced Questions ๐Ÿ“ง Marketing Cloud ๐Ÿ—️ Company Wise ๐Ÿ‘ฅ About Us Start Learning Free →

Agentforce Agent Builder Guide — Build Your First Agent 2026

๐Ÿ“…  Agentforce
Agentforce Course — Module 4: Agent Builder — Build Your First Agent | sfinterviewpro.com
๐Ÿค– Free Agentforce Course 2026 — sfinterviewpro.com
๐Ÿค– Module 4 of 15

Agent Builder —
Build Your First Agent!

Open Agent Builder, create the XYZ Company Sales Assistant, configure Topics and Instructions, and have your FIRST real conversation with your AI agent — all step by step.

1st
Real Agent
100%
Hands-On
Live
Agent Test
Zero
Code Needed
๐Ÿ“ Course Progress — Module 4 of 15
What is Agentforce
Trust Layer
Dev Org Setup
M4Agent Builder
M5TIA Framework
M6Prompt Builder
M7Std Actions
M8Flow Actions
M9Apex Actions
M10API Actions
M11Data Cloud
M12Deploy
M13Escalation
M14Testing
M15Full Project
๐ŸŽฏ What You Build in This Module
By the end of Module 4, you will have a working Agentforce agent named "XYZ Sales Assistant" — it will understand natural language questions about your Accounts and Opportunities and respond intelligently. You will have your FIRST real conversation with your own AI agent!
๐Ÿ—️

1. What is Agent Builder?

The UI where you create, configure, and test Agentforce agents

Agent Builder is the no-code/low-code interface in Salesforce Setup where you create and configure Agentforce agents. You define the agent's name, purpose, Topics, Instructions, and Actions — all through a visual UI. No LLM prompt engineering required — Salesforce handles the underlying AI plumbing.
Setup → Agents → Agent Builder — XYZ Sales Assistant
Agent Details
XYZ Sales Assistant
Active ✅
Topics (1)
Sales Assistant ▶
+ New Topic
Topic: Sales Assistant
Classification Description
Helps XYZ Company sales reps find account info, check opportunities, and draft emails
Instructions
Always greet user professionally. When asked about Account, retrieve and summarize key info. Escalate if you cannot answer...
Actions (0)
+ Add Action
๐Ÿงช Test Your Agent
XYZ Sales Assistant
Hi! I'm your XYZ Sales Assistant. How can I help you today?
You
Tell me about ABC Pharma
Type a message...
Agent Builder AreaWhat You ConfigureModule
Agent DetailsName, description, system instructions, active statusM4 (this module)
TopicsCategories of tasks the agent handlesM4 + M5
InstructionsNatural language rules for each TopicM4 + M5
ActionsSpecific tasks — Standard, Flow, Apex, APIM7, M8, M9, M10
Test PanelChat interface to test agent right in SetupM4 (today!)
Channel SettingsWhere agent is deployed — chat, messaging, etc.M12
1
Open Agent Builder
Navigate to where you'll create your first agent
a
In your Developer Org, click ⚙️ Setup
b
In Quick Find, type: Agents
c
Click Agents under the Einstein section
d
You'll see the Agents list page. Click New Agent (top right blue button)
⚙️ Setup → Quick Find: "Agents" → Agents → New Agent
๐Ÿ“ธ What You Should See
A modal or new page asking: "What kind of agent do you want to create?"
Options: Einstein Service Agent, Einstein Sales Agent, Agentforce for Service, Custom Agent, and others.

You might also see a tab for "Templates" — pre-built agents to start from.
⚠️ Don't See "New Agent" Button?
Make sure Einstein Generative AI is enabled (Module 3, Step 2). Log out → log back in → try again. If still missing, search "Agents" in Quick Find — sometimes it's under "Einstein" section not the top level.
2
Choose Agent Type — Custom Agent
We build from scratch for maximum learning
a
In the agent type selection screen, click "Custom Agent" or "Build from Scratch"
b
If you see a Templates section — ignore it for now. We build from scratch to learn every component.
c
Click Next or Create to proceed
๐Ÿ’ก Why Custom Agent?
Templates give you a pre-configured agent — useful in production but bad for learning. By building from scratch, you understand every field, every instruction, every action. That's what makes you a true Agentforce developer — not just a template user.
3
Configure Agent Details
Name, description, and system instructions — the agent's identity
a
You'll see the Agent Details panel (usually on the left side of Agent Builder). Fill in these exact values:
Agent Name
XYZ Sales Assistant
API Name
XYZ_Sales_Assistant (auto-filled — leave as is)
Description
AI Sales Assistant for XYZ Company — helps sales reps find account information, check opportunity status, and draft follow-up emails
Company Context
XYZ Company is a pharma-grade silicone and polymer manufacturer serving pharmaceutical, medical device, and biotechnology companies across India, USA, and Belgium
๐Ÿ“ธ Agent Details Panel
Left sidebar shows: Agent Name field (type "XYZ Sales Assistant"), Description textarea, and possibly a "Company" or "Context" field. Fill all visible fields. Some orgs show "System Prompt" here — that's where Company Context goes.
๐Ÿ’ก Why Company Context Matters
The Company Context tells the AI what your company does — so responses are relevant and accurate. Without it, the agent gives generic responses. With it, the agent says things like "As a pharma silicone supplier, XYZ Company offers..." — much more professional and useful for actual sales reps.
4
Create Your First Topic
Topics define WHAT the agent handles — this is the most important step
A Topic is a category of user requests the agent knows how to handle. Think of it as the agent's job description for a specific domain. You need at least one Topic for an agent to work.
a
In Agent Builder, find the Topics section (usually middle panel or left sidebar)
b
Click "New Topic" or "Add Topic" button
c
Fill in the Topic details exactly as shown below:
Topic Label
Sales Assistant
Classification Description
Helps XYZ Company sales representatives find account information, check opportunity pipeline status, get contact details, and request follow-up email drafts for their pharma and medical device customers
Scope
This topic handles queries about: Salesforce Accounts, Contacts, Opportunities, and follow-up email drafting for XYZ Company's sales team
๐Ÿ”‘ Classification Description is Critical
The Classification Description tells the AI WHEN to use this Topic. The AI reads the user's message and matches it to the Topic whose Classification Description best fits. Write it clearly — "when user asks about account information, opportunity status, contacts" — so the AI can match correctly.
๐Ÿ“ธ New Topic Form
A modal or panel with: Topic Label (text field), Classification Description (textarea — this is the most important field!), and possibly a Scope field. Fill all fields carefully. The Classification Description is what the AI uses to decide which Topic applies to each user message.
d
Click Save or Create to save the Topic
✅ Topic Created!
Your first Topic "Sales Assistant" is created. Notice it appears in the Topics panel. Now we need to add Instructions to this Topic — that's what tells the AI HOW to behave when it's handling this Topic.
5
Write Topic Instructions
Natural language rules — HOW the agent behaves on this topic
Instructions are natural language rules that guide the agent's behavior for a specific Topic. You write them like you're explaining the job to a new employee. The AI follows these instructions when handling any message that matches this Topic.
a
Click on the "Sales Assistant" Topic you just created
b
Find the Instructions section within the Topic panel
c
Click "Add Instruction" or type directly in the Instructions text area
d
Enter these instructions exactly (copy-paste recommended):
You are the XYZ Sales Assistant — a professional AI assistant for XYZ Company's sales team. BEHAVIOR RULES: 1. Always greet the user warmly and professionally by their first name if you know it 2. Keep responses clear and concise — sales reps are busy people 3. When asked about an Account, retrieve and summarize: company name, industry, phone, location, recent activity 4. When asked about Opportunities, show: name, stage, amount (in INR), close date, and probability 5. When asked about Contacts, provide: name, title, email, and phone 6. Always present financial figures in Indian Rupees (INR) format 7. If you cannot find the requested information in Salesforce, clearly say so — do not guess 8. If the user asks about pricing, discounts, or negotiations — say "For pricing details, please connect with your sales manager" 9. Always end responses with a helpful follow-up question like "Is there anything else you need about this account?" 10. If you cannot handle the request after trying — say "I'll connect you with a human sales manager who can better assist you"
๐Ÿ“ธ Instructions Panel
The Instructions area shows a text editor where you type your rules. Some versions show individual instruction items you add one by one (like a list). Other versions show a single large text area. Either way — type or paste the instructions above. Save after entering.
e
Click Save after entering all instructions
๐Ÿ’ก Writing Good Instructions — Best Practices
✅ Use numbered lists — AI follows sequential rules better
✅ Be specific about format — "show amount in INR" not just "show amount"
✅ Include what NOT to do — "do not guess" is as important as "do this"
✅ Define escalation — always tell the agent when to hand off to human
❌ Don't be too restrictive — agent needs flexibility to handle edge cases
6
Configure Agent System Prompt (Agent Instructions)
Global instructions that apply across ALL Topics
Apart from Topic-level instructions, Agent Builder has a global system prompt — instructions that apply to the agent regardless of which Topic is active. This is where you set the agent's overall personality and constraints.
a
Go back to the Agent Details panel (click on agent name in sidebar)
b
Find "Agent Instructions" or "System Prompt" field
c
Enter this global system prompt:
You are XYZ Sales Assistant — a professional, helpful, and knowledgeable AI agent for XYZ Company. XYZ Company is a pharma-grade silicone and polymer manufacturer serving pharmaceutical, medical device, and biotechnology companies across India, USA, and Belgium. GLOBAL RULES (apply in all situations): - Always be professional, friendly, and concise - Only answer questions related to XYZ Company's sales activities and customer information - Never reveal internal company information, pricing structures, or confidential data - Never impersonate a human — if asked "are you a human?", clearly say you are an AI assistant - Always respect data privacy — do not share one customer's information with another - If uncertain about any information, say "I'm not sure about that — let me connect you with someone who can help" - Language: Respond in the same language the user writes in (English or Hindi)
d
Click Save
✅ Agent Fully Configured!
Your agent now has: Name + Description + Company Context + Topic + Topic Instructions + Global System Prompt. This is a complete, production-quality agent configuration. Time to test it!
7
Activate Your Agent
Turn the agent ON before testing
a
In Agent Builder, find the agent Status toggle (usually top right or in Agent Details panel)
b
Switch status from Inactive to Active
c
A confirmation dialog may appear — click Activate
d
Agent status shows Active ✅
Agent Builder → Agent Details → Status Toggle → Active
⚠️ Important!
An Inactive agent will not respond to messages. Always make sure the agent is Active before testing. In production, you'll toggle this to control when an agent is live.
8
Test Your Agent — First Conversation! ๐ŸŽ‰
The moment you've been waiting for — talk to your AI agent!
a
In Agent Builder, find the Test Panel (right side of the screen — looks like a chat window)
b
If not visible, look for a "Test" or "Preview" button in the top bar
c
The test panel opens with your agent's greeting message
d
Type your first message and press Enter!
Agent Builder → Test Panel (right side) → Type message → Press Enter
๐Ÿ“ฑ Test These Messages — Expected Conversations:
๐Ÿงช Test 1 — Basic Greeting
๐Ÿ‘ค You (Sales Rep)
Hello
๐Ÿค– XYZ Sales Assistant
Hello! Welcome to XYZ Sales Assistant. I'm here to help you with account information, opportunity status, contact details, and follow-up email drafts for your customers.

How can I assist you today?
๐Ÿงช Test 2 — Account Query (No Actions Yet)
๐Ÿ‘ค You (Sales Rep)
Tell me about ABC Pharma
๐Ÿค– XYZ Sales Assistant
I'd be happy to help you with information about ABC Pharma! However, I need access to the Salesforce Account data to retrieve the specific details.

Once I'm connected to your Salesforce data (via Actions that we'll configure), I'll be able to show you ABC Pharma's complete profile including contact details, recent opportunities, and activity history.

Is there anything else I can help you with in the meantime?
๐Ÿงช Test 3 — Out of Scope Query
๐Ÿ‘ค You (Sales Rep)
What is the weather in Mumbai today?
๐Ÿค– XYZ Sales Assistant
I'm specialized in helping with XYZ Company's sales activities — account information, opportunities, contacts, and follow-up emails.

For weather information, you'll want to check a weather service like Google Weather or AccuWeather.

Is there anything related to your accounts or opportunities I can help you with?
๐Ÿงช Test 4 — Pricing Question (Should Decline)
๐Ÿ‘ค You (Sales Rep)
What discount can I give to ABC Pharma?
๐Ÿค– XYZ Sales Assistant
For pricing details and discount authorization, please connect with your sales manager — that decision requires human judgment and approval based on your specific situation and relationship with ABC Pharma.

I can help you prepare for that conversation by pulling up ABC Pharma's account history, open opportunities, and past order values. Would you like me to do that?
๐ŸŽ‰ Congratulations! Your Agent is Working!
If you're getting sensible responses — you've built your first Agentforce agent! Notice how it correctly declines out-of-scope questions and pricing queries based on the instructions you wrote. The agent doesn't have Salesforce data access yet (we add Actions in M7-M10) — but the intelligence and guardrails are working perfectly!
๐Ÿ—บ️

2. Agent Builder UI — Complete Tour

Know every button and panel — you'll use all of these in future modules

UI ElementLocationWhat It DoesUsed In
Agent Name & StatusTop of page / left panelAgent identity and active/inactive toggleM4 (done!)
Topics ListLeft panel / centerAll Topics configured for this agentM4, M5
Topic DetailsCenter panelClassification Description + Instructions for selected TopicM4, M5
Actions PanelBelow Topic InstructionsList of Actions available to the agent for this TopicM7, M8, M9, M10
Add Action ButtonActions PanelAdd Standard, Flow, Apex, or API action to TopicM7-M10
Test PanelRight sideChat window to test agent in real timeAll modules
New Session ButtonTest Panel topReset conversation — start fresh testAll modules
Debug ViewTest Panel optionShows which Topic was selected and which Actions were calledM14
Save / ActivateTop rightSave changes and activate agent for useEvery module
ChannelsTab or sectionConfigure where agent is deployedM12
⚙️

3. What Happens Under the Hood When You Chat

Understanding the reasoning loop — critical for interviews

When a user sends a message to the agent, Agentforce runs a reasoning loop — a multi-step process where the AI figures out what to do. Understanding this loop is what separates Agentforce developers from button-clickers.
StepWhat HappensExample
1️⃣ Receive MessageUser message received through the channel (chat, messaging, API)"Tell me about ABC Pharma's opportunities"
2️⃣ Trust LayerPII masking + toxicity check on input"Tell me about [ORG_1]'s opportunities"
3️⃣ Topic ClassificationAI reads Classification Descriptions of all Topics, selects best matchMatches "Sales Assistant" Topic
4️⃣ Read InstructionsAI reads the Instructions for the matched TopicLoads "Sales Assistant" Instructions
5️⃣ Plan ActionsAI decides which Actions to call (if any) to gather dataDecides to call "Get Opportunities" Action
6️⃣ Execute ActionsActions run (Apex/Flow queries Salesforce data)SOQL runs, returns ABC Pharma's Opportunities
7️⃣ Generate ResponseAI uses Instructions + Action results to write the responseFormats Opportunities table with names, amounts, stages
8️⃣ Trust Layer OutputPII re-inserted + toxicity check on output"Tell me about ABC Pharma's opportunities" response ready
9️⃣ Deliver ResponseFinal response sent to userSales rep sees the Opportunities list
⚡ Interview Question Alert!
"Explain the Agentforce reasoning loop" is asked in EVERY senior Agentforce interview. The answer: Message → Trust Layer (PII mask) → Topic Classification → Load Instructions → Plan Actions → Execute Actions → Generate Response → Trust Layer (PII restore) → Deliver. Know this cold.
๐Ÿ“ˆ

4. What Your Agent Can't Do Yet — And Why

Understanding current limitations sets you up for the next modules

Agent Can't DoWhyFixed In
Retrieve real Salesforce Account dataNo Actions connected to Salesforce objects yetM7 (Standard Actions) / M9 (Apex Actions)
Show Opportunity details from your orgSame — needs Actions that query Opportunities SOQLM9 (Apex Action with SOQL)
Draft a follow-up email using AINo Prompt Template connected yetM6 (Prompt Builder)
Create Tasks or follow-up recordsNo Flow or Apex Action for record creationM8 (Flow Actions)
Escalate to a human agentOmni-Channel routing not configuredM13 (Human Escalation)
Be accessed by external usersNot deployed to any channel yetM12 (Deploy to Experience Cloud)
๐ŸŽฏ The Big Picture
Right now your agent is like a smart employee who has read the handbook (Instructions) but doesn't have access to the company database (Salesforce data) yet. Modules 5-10 give it the tools — Actions — to actually access and manipulate Salesforce data. By Module 15, it's a fully capable production-ready agent!
๐Ÿ”ง

5. Troubleshooting — Common Agent Builder Issues

Problems you'll hit and exactly how to fix them

ProblemRoot CauseFix
Agent doesn't respond in Test PanelAgent is Inactive OR Einstein Generative AI is disabledCheck agent Status → Active. Check Setup → Einstein Generative AI → Enabled.
Agent responds with generic "I can't help with that"Topic Classification Description is too vague — AI can't match the message to the TopicMake Classification Description more specific and detailed. Include examples of messages it should handle.
Agent ignores InstructionsInstructions saved incorrectly OR conflicting instructionsRe-open Topic → Instructions → verify text saved → remove contradictions → save again.
Test Panel shows "Error loading agent"Agent has unsaved changes OR activation failedSave all changes → Activate again → Refresh Test Panel.
Can't find Test PanelDifferent Agent Builder UI version in your orgLook for "Preview", "Test", or a chat icon button in the top navigation of Agent Builder.
Agent reveals pricing when it shouldn'tInstruction about pricing is missing or poorly wordedAdd explicit instruction: "Never reveal pricing, discounts, or margin information. Direct all pricing questions to the sales manager."
๐ŸŽฏ

6. Agent Builder — Interview Questions & Answers

Real questions asked in Agentforce interviews

Interview QuestionBest Answer
What is Agent Builder in Salesforce?A no-code/low-code UI in Salesforce Setup for creating, configuring, and testing Agentforce agents. You define Topics, Instructions, and Actions through the UI — no LLM prompt engineering required.
What is the difference between Agent Instructions and Topic Instructions?Agent Instructions (System Prompt) = global rules that apply across ALL Topics. Topic Instructions = specific rules for HOW the agent behaves when handling a particular category of requests. Agent Instructions set personality; Topic Instructions set task behavior.
What is a Topic Classification Description?A natural language description that tells the AI WHEN to use a particular Topic. The AI reads the user's message and matches it to the Topic whose Classification Description best fits. Critical for correct Topic selection.
Explain the Agentforce reasoning loopMessage → Trust Layer (PII mask) → Topic Classification → Load Instructions → Plan Actions → Execute Actions → Generate Response → Trust Layer (restore PII) → Deliver response to user.
How do you test an agent before deployment?Agent Builder has a built-in Test Panel (right side) — chat directly with the agent. Debug View shows which Topic was selected and which Actions were called. Test failure, out-of-scope, and edge case scenarios before going live.

Module 4 Summary

What you built today — the foundation of all future modules

  • Agent Builder — navigated, understood all panels: Topics, Instructions, Actions, Test Panel
  • Agent Created — "XYZ Sales Assistant" with name, description, and company context
  • First Topic Created — "Sales Assistant" with Classification Description
  • Instructions Written — 10 behavioral rules for Topic + global system prompt
  • Agent Activated — Status set to Active
  • First Conversation — tested greeting, out-of-scope query, and pricing guardrail
  • Reasoning Loop — understood 9-step flow from message to response
๐ŸŽ‰ You Built Your First Agentforce Agent!
The XYZ Sales Assistant is alive! Right now it's smart but data-blind — it understands language and follows rules, but can't yet access real Salesforce data. Module 5 deepens the TIA Framework knowledge, and Modules 6-10 give the agent real Salesforce superpowers through Actions!
๐Ÿง  Module 4 — Knowledge Check
Q1: What is the Classification Description in a Topic used for? → Tells the AI WHEN to use this Topic — AI matches user message to the Topic with best-fitting Classification Description
Q2: What is the difference between Agent Instructions and Topic Instructions? → Agent Instructions = global rules (personality). Topic Instructions = task-specific rules (HOW to handle that topic)
Q3: Your agent returns generic unhelpful responses. What do you check first? → Classification Description — if too vague, AI can't match user messages to the Topic. Make it more specific.
Q4: List the Agentforce reasoning loop steps in order. → Message → Trust Layer → Topic Classification → Instructions → Plan Actions → Execute Actions → Generate Response → Trust Layer → Deliver
Q5: Can you test an agent before deploying it to a channel? → YES ✅ — Agent Builder has a built-in Test Panel on the right side. Test extensively before deployment.

๐Ÿš€ Ready for Module 5?

Next: TIA Framework Deep Dive — Topics, Instructions, and Actions in depth. You'll learn advanced Topic configuration, how to write production-quality Instructions, and the different types of Actions available. Your agent goes from basic to brilliant!

Module 5: TIA Framework →