Learning guides
Build Your First Agentforce Agent in a Developer Edition Org (2026)
Step by step in the new Agentforce Builder: set up a free Developer Edition, create an Employee agent, give it a Flow action, test, commit and activate it, and fix the errors most people hit on the way.
Metrinfo Team · · 11 min read
Search for "build an Agentforce agent" and most tutorials still open Setup → Agents and edit the Agentforce (Default) agent. In a new org in 2026 those steps no longer work. The default agent is retired, and since the week of 13 July 2026 Salesforce no longer lets you create agents in the legacy builder in Setup.
This guide uses the current tools: Agentforce Builder in the Agentforce Studio app, in a free Developer Edition org. You'll build a small Employee agent called Account Helper that looks up an account's phone number, website and employee count by calling a Flow you write. Every step is checked against Salesforce Help, and the last section lists the errors people hit most often, with the fix for each.
What changed in 2026 (and why old tutorials fail)
| Old tutorials say | What's true now |
|---|---|
| Open the Agentforce (Default) agent | Retired. Not available in new environments since 17 June 2025. Salesforce recommends the Employee agent. |
| Setup → Agentforce Agents → New Agent | You can't create agents in the legacy builder since the week of 13 July 2026. Use App Launcher → Agentforce Studio → Agents → New Agent. |
| Topics | Subagents. Salesforce's troubleshooting article writes "Subagent (Topic)". |
| Turn on the Agentforce toggle in Setup | Salesforce said it planned to turn Agentforce on for all orgs with Agentforce access in August 2026 and remove the toggle, so you may not see it. |
| Data Cloud | Data 360, the current name in Salesforce Help. |
Step 1: Get the right org
Sign up for a free Developer Edition at developer.salesforce.com/signup. Salesforce Help calls it the Developer Edition with Agentforce and Data Cloud. If you're doing a Trailhead project, use the special org that project links to instead: Trailhead says those orgs are built for that badge's challenges and might not work for other badges.
Know the limits before you start, because they explain errors you'd otherwise blame on yourself:
- 150 LLM generation requests per hour when you use Agentforce in a Developer Edition.
- Data 360 gets one data space and 10 GB, and schedules are ignored. Data streams, identity resolution rulesets, segments and calculated insights run only when you start them (Refresh Now, Run Ruleset, Publish Now).
- An org that hasn't been accessed for 45 days can be terminated. Log in regularly.
Salesforce created a default user with System Administrator rights to set up your org. Help recommends you disable that user so that you're the only admin.
Step 2: Turn on Data 360, Einstein and Agentforce, in that order
Salesforce Help gives the order for a Developer Edition: Data 360 first, then Einstein generative AI, then Agentforce.
- Data 360. To open Data Cloud Setup you need the System Administrator profile and the Data Cloud Architect permission set, so assign that permission set to yourself first. Then, from the Setup menu, open Data Cloud Setup and click Get Started. Setup takes a few minutes. If the option is missing, Help says to refresh the page, or log out and back in.
- Einstein. In Setup, search Quick Find for Einstein Setup and make sure Turn on Einstein is on. New orgs have it on already. After you turn it on, Salesforce needs a few minutes to sync Einstein with Data 360.
- Agentforce. In Quick Find, enter Agent and select Agentforce Agents. Turn Agentforce on if you see the toggle, then refresh the page: the New Agent button only appears after a refresh.
Step 3: Build the Flow your agent will call
Custom agent actions can call autolaunched flows, invocable Apex, prompt templates, external services and more. We'll use a Flow because you can build it without code.
The rule that breaks most first actions. Salesforce Help says a custom action that references a flow or Apex class supports primitive data types only. If a flow includes a picklist, currency or collection resource, you can't use it as an action. So the flow below uses only Text and Number variables, and reads one record rather than a list.
Create a new Autolaunched Flow (No Trigger) with these resources:
| Variable | Type | Available for | Description (the agent reads this) |
|---|---|---|---|
accountName | Text | Input | The exact name of the account to look up. |
accountPhone | Text | Output | The account's main phone number. |
accountWebsite | Text | Output | The account's website. |
employeeCount | Number (0 decimal places) | Output | The account's number of employees. |
Add one Get Records element:
- Object: Account. Condition:
Nameequals{!accountName}. - How many records to store: only the first record.
- How to store record data: choose fields and assign variables. Map
PhonetoaccountPhone,WebsitetoaccountWebsiteandNumberOfEmployeestoemployeeCount.
Save it as Get Account Snapshot and activate it.
Write real descriptions for the flow and every variable. When you turn the flow into an agent action, Salesforce copies those descriptions into the action, and the agent uses them to decide when to call the action and what to pass it.
Step 4: Create the agent
- From the App Launcher, open Agentforce Studio.
- On the Agents tab, click New Agent.
- Choose an Agentforce Employee agent template, enter the name Account Helper, and click Let's Go.
Agentforce Builder opens. The Explorer panel on the left lists your agent's Settings, Subagents, Actions, Variables, Connections and Data. In the middle, you can switch between the Canvas view (natural language) and the Script view (Agent Script). Salesforce keeps the two views in sync.
Why an Employee agent? Salesforce Help says Employee agents run in the context of the logged-in user. Whatever you can see, the agent can see, and you don't have to set up a separate agent user as you do for a Service agent. That makes it the simplest kind of agent to get working first.
Step 5: Add a subagent
- In the Explorer panel, click + next to Subagents and choose New Subagent.
- Name it Account Snapshot.
- Description: Answers questions about a specific account's phone number, website and number of employees.
- Click Create and Open, then Save.
The description isn't decoration. Salesforce's troubleshooting article lists generic subagent names, overlapping subagents and broad descriptions as common reasons an agent picks the wrong subagent. Make each one specific.
Step 6: Add the Flow as an action
- In the Explorer panel, open Account Snapshot, hover over Actions and click +.
- Choose Create New Action, name it Get Account Snapshot, and click Create and Open.
- Set Reference Action Type to Flow and Reference Action to Get Account Snapshot.
- On the
accountNameinput, turn on Require input (the action can't run without it) and Collect data from user (the value has to come from the user, not be filled in by the agent). - On the outputs, leave Include in agent context on. Leave Show in conversation off, so the agent summarises the values in a sentence rather than showing them raw.
- Click Save.
Step 7: Write the instructions
Open the Account Snapshot subagent and replace its reasoning instructions with:
When the user asks for an account's phone number, website or number of
employees, run @Get Account Snapshot with the account's exact name.
If the user hasn't named an account, ask which one.
If the action returns no values, say you couldn't find that account and
ask the user to check the spelling. Never guess a phone number or website.Type the @ yourself and pick the action from the resource picker. Trailhead's own exercise warns that pasting the text won't open the picker. Then click the </> button to see the same instructions in Script view. The reference to the action appears in Agent Script syntax, which is a good way to start reading Agent Script.
Click Save.
Step 8: Test it, in Simulate mode first
First create a test record: an Account called Acme Test Ltd with a phone number, a website and an employee count.
Open Preview. Agentforce Builder has two test modes:
- Simulate checks the setup without changing any data. Use it to confirm the agent picks the right subagent and action.
- Live Test really runs the actions against your org's data. Our flow only reads records, so it's safe here. Be careful with any action that creates or updates records.
Ask "What's the phone number for Acme Test Ltd?", then "How many people work there?" and "What's the website for Globex?" (an account that doesn't exist). The preview shows a trace of which subagent and action the agent chose and why. Read it every time an answer surprises you.
Step 9: Commit, activate and give yourself access
- Click Commit Version. A committed version is a locked snapshot that you can't edit. To keep working, create a new draft from it.
- Click Activate. Only a committed version can be activated, and only one version of an agent can be active at a time.
- In the Explorer panel, under Settings, open Agent Access and add the profile or permission set you use (for example, System Administrator).
Your agent is now available to you in the Agentforce panel in Lightning Experience, one of the employee channels Salesforce lists for Employee agents, alongside Slack and the Salesforce mobile app.
Troubleshooting: the errors you're most likely to hit
| Symptom | Likely cause | Fix |
|---|---|---|
| No Agents in Setup | Einstein generative AI isn't on | Turn on Einstein in Einstein Setup (step 2). |
| No New Agent button | The page wasn't refreshed, or you're missing permissions | Refresh after enabling Agentforce. Check you have Manage AI Agents (or Customize Application for Employee agents). |
| Agentforce Studio isn't in the App Launcher | App visibility | In App Manager, check the app is visible in Lightning Experience and your profile is assigned. In App Menu, make sure it isn't hidden. |
| Data Cloud Setup is missing | Missing permission set | Assign Data Cloud Architect, then refresh, or log out and back in. |
| Your flow can't be used as an action | Non-primitive resources | Remove picklist, currency and collection resources (step 3). Also check it's an autolaunched flow and that it's active. |
| You can't edit the agent | The version is committed | Create a new draft and edit that. |
| Activate isn't available | The version hasn't been committed | Commit the version, then activate it. |
| Commit fails | Errors in the agent definition | Open the Console: clicking an error takes you to the line. Trailhead suggests asking the Agentforce assistant panel to scan and fix, then reviewing what it changes. |
| The agent never calls your action | Vague subagent or action descriptions, or no instruction naming the action | Make the descriptions specific, and reference the action with @ in the instructions (steps 5–7). |
| "An error occurred when executing a flow interview" | The running user can't run the flow | The user (for an Employee agent, you) needs the Run Flows permission and access to the objects the flow uses. Test the flow on its own in Flow Builder's Debug. |
| The website is missing from the answer | URLs are hidden for security | Add the domain under Setup → Trusted URLs. |
| Answers are cut off | Size limits | Salesforce cites about 2,048 tokens per LLM response and about 65,000 characters of action output. Return fewer fields. |
| The agent stops mid-reply | The per-turn limit | An agent can make up to 8 LLM calls per user turn. Simplify the instructions and avoid retry loops. |
| Previews start failing after heavy testing | The hourly cap | Developer Edition allows 150 LLM generation requests per hour. Wait for the next hour and retest. |
| Your org has disappeared | 45 days without a login | Sign up for a new org, and log in regularly from then on. |
Where to go next
- Ground it in documents. In the agent's Data section, select a data library; the Answer Questions with Knowledge action then answers from it.
- Make it deterministic where it matters. Agent Script supports if-else logic and variables, so a step can always run before the LLM reasons.
- Test at scale with Testing Center rather than one preview message at a time.
- Going for the certification? Everything in this tutorial is on the outline. See our Agentforce Specialist exam guide.
If you'd like to build agents with a working Salesforce professional reviewing your work, our live Agentforce classes are small groups that do exactly that.
Sources
- Get Started with Developer Edition with Agentforce and Data Cloud — Salesforce Help
- Developer Edition Limits and Guidelines for Data 360 — Salesforce Help
- Set Up and Turn On Data 360 — Salesforce Help
- Set Up Einstein Generative AI — Salesforce Help
- Enable Agentforce — Salesforce Help
- Create an Agent — Salesforce Help
- Agent Types and Considerations — Salesforce Help
- Access Agentforce Studio and the New Agentforce Builder — Salesforce Help
- Explore Agentforce Builder — Salesforce Help
- Create an Agent from an Agentforce Employee Agent Template — Salesforce Help
- Considerations for Agentforce Employee Agent — Salesforce Help
- Manage Employee Agent Access — Salesforce Help
- Create a Custom Action — Salesforce Help
- Agentforce Considerations (custom actions) — Salesforce Help
- Simulate and Live Test Modes — Salesforce Help
- Versioning and Editing Agents — Salesforce Help
- Activate or Deactivate Your Agent — Salesforce Help
- Common Agentforce Behavior Issues and How to Resolve Them — Salesforce Help
- Creating a Service Agent with Agentforce Builder — Trailhead
- Learn to Develop Agents with Agentforce DX Tools — Trailhead
- Agentforce
- Agentforce Builder
- Agent Script
- Developer Edition
- Flow
- Data 360
- Tutorial