Chapter 134% of the exam15 min
AIforce and Headless Toolkit
What headless means and why AIforce exists, the components of the Headless Toolkit, standard and custom Salesforce Hosted MCP Servers, Agentic Identity and the trust principles, the Headless Experience Layer, and the headless use cases across the business.
By the end of this chapter you can
- Explain what headless means and why AIforce adds to the Salesforce UI instead of replacing it
- Match each Headless Toolkit component (skills, MCP, APIs, CLIs, metadata and HXL) to the job it does
- Describe metadata grounding, the Metadata Catalog and the role of Data 360 as the system of context
- Tell standard Salesforce Hosted MCP Servers from custom ones and outline how an MCP client connects
- Explain how Agentic Identity registers agents, and how least privilege, monitoring and incident response keep headless access trusted
- Describe how the Headless Experience Layer renders one widget on every supported surface
- Recognise which tools appear in the sales, commerce, health, financial services, field service, marketing and analytics use cases
AIforce and headless basics
Scenario: An account executive answers customers in Slack, takes call notes in another app and reviews her pipeline in a spreadsheet. Only mid-morning does she log in to Salesforce to update a dozen opportunities by hand.
What headless means
Traditionally, people reached Salesforce through Lightning Experience in a browser. Headless means separating the Salesforce back end (the "body": data, business logic, workflows, permissions and governance) from any fixed screen (the "head"). The same back end can then be used from a chat tool, a custom app, an IDE or an AI agent. Agents don't click through screens: they call APIs and MCP tools and run CLI commands.
AIforce (formerly Headless 360) is the platform and functionality that lets humans and agents work together across any surface, tool or environment. Three points define it:
- It is not a new product but an architectural shift that opens the Salesforce Platform to any agent, IDE and surface.
- Agents inherit security and governance. Every permission, compliance rule and approval chain travels with the platform.
- It is an "and", not an "or". Headless doesn't replace Lightning Experience. An action triggered headlessly, such as activating a marketing segment, shows up in the UI as if someone had clicked the button.
Developers can build on Salesforce from Claude Code, Cursor or Windsurf without learning a new IDE. Business users can act on Salesforce data from Slack, Microsoft Teams, WhatsApp or ChatGPT.
Business drivers and challenges
| Value pillar | What it means |
|---|---|
| Adoption | Workflows come to where users already work, so logging in stops being an obstacle |
| Reach | Frontline workers, field teams and external partners who never had Salesforce access can take part through Slack or Teams |
| Speed | Less switching between apps |
| AI agent strategy | Real business data, governed workflows and accountability move agents from pilot to production |
| Challenge | The problem |
|---|---|
| Context gap | Agents lack trusted, unified business data and the logic that gives it meaning |
| Do-it-yourself trap | Custom integration glue and home-made gateways are brittle to maintain |
| Infrastructure lag | A sandbox pilot works, but no governed, auditable path leads from an agent's decision to a real business action |
| AI governance | Without guardrails, trust controls and auditability, agents can't be deployed at scale |
| Developer tension | Developers want their favourite coding agents, while the enterprise needs trust and security |
Managed service versus do-it-yourself
With a do-it-yourself integration, the team must build and maintain every security and governance control itself. AIforce is a managed service built on the open standard, with Salesforce trust controls enforced on every call. Its platform-hosted MCP servers are run by Salesforce, so there is no integration code to write and no server to stand up. Its three headline capabilities: build with any coding agent or IDE, build with any UI framework (Salesforce Multi-Framework supports frameworks such as React) and deploy on any surface through the Headless Experience Layer.
Deterministic logic follows a defined path, so the same input always gives the same output, like a calculator. Probabilistic logic uses AI reasoning, so its output can vary, like a weather forecast. Headless functionality supports both.
Exam tip: An answer saying headless "replaces" Lightning Experience or "needs a new security model" is wrong. Headless adds surfaces, and the data, logic, permissions and governance stay the same.
The Headless Toolkit
Scenario: A developer must build on Salesforce from Cursor, an admin wants an AI assistant to read the org safely, and a release manager wants scripted deployments. Each needs a different tool.
The Headless Toolkit makes AIforce possible by opening Salesforce's architecture, with its security and governance, to any third-party agent.
| Component | What it is | Use it to |
|---|---|---|
| Skills | Prebuilt workflows with domain expertise, run as one command | Give agents repeatable workflows with consistent outputs |
| MCP | A universal, OAuth-based connector | Let an AI agent act on a Salesforce org securely |
| APIs | Robust, deterministic endpoints | Integrate Salesforce with third-party systems programmatically |
| CLIs | Scriptable commands for a terminal or AI interface | Automate development and deployment tasks |
| Metadata | Org-aware grounding in the data model and configuration | Help agents understand your org before they act |
| HXL | A rendering layer | Show the same UI on every supported surface |
Salesforce's Headless Toolkit module names four key tools: MCP, APIs, CLIs and Skills. Its introduction to AIforce lists the toolkit components as Skills, MCP/APIs, Metadata and HXL. The table above combines the two lists.
Salesforce ships a growing library of prebuilt skills and MCP tools. Its introductory module quotes "30+" skills and "60+" MCP tools, "with more coming rapidly", so don't memorise the numbers. Skills are invoked as /skill-name, and the open-source ADLC Skills (Agent Development Lifecycle) let coding agents develop, test and observe Agentforce agents from any IDE.
API-first and the CLI
Headless architecture is API-first: Salesforce designs, builds and exposes APIs for its features. Its principles are a decoupled architecture, the CRM as a system of execution for humans and agents, agentic readiness (clean, deterministic endpoints that need no browser) and developer flexibility. Error messages don't depend on the UI, so agents can act on them.
Salesforce CLI works with orgs from any terminal or IDE: creating orgs, deploying and retrieving metadata, running Apex, querying data and scripting CI/CD.
Metadata grounding and the Metadata Catalog
Metadata grounding means an agent reads the org's own metadata (labels, descriptions, data types, picklist values and relationships) to understand the data model before it queries or acts. Salesforce calls metadata the org's built-in grounding layer.
The Salesforce Metadata Catalog is a structured index of everything in the org (objects, fields, relationships, workflows and permissions) that AI agents can read: the org's table of contents for AI. A programmatic caller has no page layouts or tooltips, so before acting an agent reads the org's shape with two tools of the Headless 360 MCP Server, which Salesforce labels Beta. That server reaches all of Salesforce through one connection and four tools: Discover, Describe, Dispatch and Dispatch (Read-Only). Discover finds what is available, and Describe returns the detail of one item. The Dispatch tools then run the chosen action. Discover and Describe return only what the authenticated user may see, and neither reveals every rule held in validation rules, flows or Apex.
Grounding is only as good as the metadata. Clear metadata improves interpretation, but it doesn't replace validation rules, automation, permissions or application logic. With a blank description the caller gets the API name alone, so a field called Opp_Rev_Adj_Q3 won't be matched to "revenue". Before going live, audit labels, descriptions, help text and picklist values, starting with high-traffic objects, and make custom logic return explicit error strings.
The data foundation and Data 360
Pointing an AI model at raw database tables leads to inconsistent processes and lost governance. A data foundation keeps business logic inside Salesforce. It rests on three pillars: metadata and context grounding, Data 360 and cross-cloud MCPs. The platform enforces the governance you have set up, but setting it up is never automatic: field-level security, sharing rules, tagging and masking must be configured explicitly.
Data 360 is the system of context, the real-time layer that gives agents one trusted source:
- It unifies data through identity resolution and zero-copy federation, which queries data in place without moving it.
- It activates in real time: it monitors events and fires triggers, with no batch jobs.
- It grounds AI in governed data through policy-based governance, automated tagging and dynamic masking.
Alongside it, Agentforce is the system of agency and Slack is the system of engagement.
Exam tip: Match the verb to the tool: act on an org securely (MCP), integrate a third-party system (APIs), script a deployment (CLI), run a repeatable workflow (skill), understand the data model (metadata).
Salesforce-hosted MCP servers
Scenario: A company's reps use Claude, its analysts use ChatGPT and its developers use Cursor. Nobody wants to build three separate integrations to Salesforce.
What MCP and a hosted server are
Model Context Protocol (MCP) is an open standard for connecting AI applications to external systems: a universal plug that lets any compatible agent connect, call tools, query data and take action. An MCP server implements that standard for one platform.
A Salesforce Hosted MCP Server is a Salesforce-managed endpoint that exposes an org's data, flows, Apex actions and queries to any AI client that speaks MCP. Salesforce handles hosting, authentication and permission enforcement. Every tool call respects field-level security, object permissions and sharing rules, runs with the authenticated user's permissions and is logged against that user. Servers are disabled by default, and an administrator must enable each one.
Standard versus custom servers
| Standard server | Custom server | |
|---|---|---|
| Configured by | Salesforce | An administrator, in Setup, with no code |
| Tools | A fixed set from one product area | A chosen mix from several standard servers under one URL |
| Editable | No | Yes |
| Your own tools | Not possible | Autolaunched Flows (not screen or scheduled flows), Apex invocable actions, Apex REST endpoints, API Catalog endpoints, Prompt Builder templates and Agentforce agents |
In Salesforce's analogy, every tool is on a buffet, and a custom server is the plate an admin fills for one persona. An AI client struggles to choose well beyond a few dozen tools, and it picks a tool by its name and description, so curate and describe tools clearly.
Trailhead's examples of standard servers include the Salesforce Headless 360 MCP server and the Metadata Grounding MCP Server. The standard SObject servers show scoped access: SObject All (full create, read, update and delete), SObject Reads, SObject Mutations (create and update, no delete) and SObject Deletes. Trailhead also names two more types: product servers with their own URLs, such as Tableau Next MCP (the developer documentation counts Tableau Next among the standard servers), and external third-party servers, which need manual registration.
Cross-cloud MCPs
| Server | What it adds |
|---|---|
| Informatica MCP Server | Data quality, deduplication, lineage and master data management |
| MuleSoft MCP Server | Existing integrations and APIs as tools, with no code changes |
| Tableau MCP Server | Trusted analytics and governed semantic definitions, not raw data |
Tableau MCP connects to Tableau Cloud and Tableau Server, while Tableau Next MCP connects to Tableau Next.
How a client connects
- An administrator enables the server.
- The admin registers an External Client App to handle OAuth. Connected Apps are not supported. The app carries the mcp_api scope, and sign-in uses OAuth 2.0 with PKCE.
- The server URL and the app's consumer key are added to the MCP client.
- The user authorises the connection and tests it.
Postman is the recommended first test because it calls tools directly, with no language model. Agentforce Vibes is the exception: it needs no External Client App or consumer key, and servers appear in it automatically once an admin has enabled them in the org.
Exam tip: "Fixed tools, cannot be modified" is a standard server. "Combine tools for one persona" or "expose our own Flow or Apex" is a custom server. A Connected App is never the answer for MCP sign-in.
Agentic Identity and trusted access
Scenario: A bank lets an AI assistant answer service questions. Security asks whose identity the agent uses, what is the least it needs to see, and how to stop it.
Agentic Identity
Agentic Identity gives each agent an identity of its own on the platform:
- Agent registration. An admin registers each agent on the Salesforce Platform. Salesforce says that using any Salesforce MCP server requires agent registration (it gives notice before this is required), and that agents that use Salesforce APIs must be registered too. Security options for traditional integrations stay as they are.
- Scoped access. The agent gets a discrete Platform identity with the permissions the admin chooses, which can be narrower than a human user's.
- Agent connectivity. MCP clients and API-based agents are reconfigured to use the new OAuth credentials tied to the registered agent. Once reconnected, the agent works as before.
- Authorisation to act for users. The agent still assists a person, but it acts under its own identity, within the scope the admin authorised, not under that person's.
Each successful interaction by a registered agent is recorded as a Headless Platform Interaction.
The hosted MCP server documentation describes each call as running with the signed-in user's permissions. Salesforce's Agentic Identity article describes registered agents connecting with their own OAuth credentials and scoped permissions instead. Salesforce's published material doesn't explain how the two combine, so answer a question in the terms it uses: per-user permissions for hosted MCP servers, a separate scoped identity for Agentic Identity.
Principle 1: open access, not open bypass
A headless call from an external agent inherits exactly the same governance as a traditional Salesforce call. The surface changes, but identity verification and field-level security checks are the same as for a user clicking a button.
Salesforce pictures this as a tree. The visible surface (limbs and leaves) is Slack and chat interfaces. The Einstein Trust Layer (trunk) mediates traffic and enforces data masking. The underground foundation (roots) is the unseen part: identity, permissions, role-based access control, audit trails and monitoring. Three tools narrow what agents reach through MCP servers: read-only servers, named queries and custom Apex actions that expose only specific operations.
Principle 2: least privilege
Least privilege gives each person, application and agent only the access its task needs. A user-context design honours the end user's own Salesforce access, so two reps can ask the same question and get different results. An integration-user design uses the permissions of a dedicated account. Start read-only, return only the fields and records the task needs, and add write access only once that design is tested and approved.
Progressive authority matches friction to impact:
| Impact | Governance | Example |
|---|---|---|
| Low | Permit a narrow, reversible action with validated inputs | Checking an account balance |
| Moderate | Show the proposed change and require user confirmation | Resolving a disputed card charge |
| High | Route through human approval or a business process | Raising a credit limit |
Never put passwords, client secrets or access tokens in prompts. Test with the real end user's identity, not an admin account, and confirm that unauthorised requests fail.
Monitoring and incident response
Governance sets the policies, and monitoring watches the processes.
| Tool | What it records |
|---|---|
| Event Monitoring | Operational activity such as logins and API calls |
| Setup Audit Trail | Configuration changes in Setup, not individual agent data operations |
| Field History Tracking | Field changes, not prompts or whole interactions |
Salesforce monitoring ends at the Salesforce boundary, so document which system owns each log. An incident plan has five phases: triage (what is happening), contain (stop the risk, for example by disabling a tool), investigate (save evidence), fix and recover (restore service gradually) and learn (document without blame).
Exam tip: "Who the agent is" points to Agentic Identity: a registered identity with its own scoped permissions. "How much it can do" points to least privilege and progressive authority.
The Headless Experience Layer
Scenario: A retail developer builds an order status widget for Slackbot. Marketing then wants it in ChatGPT and operations wants it in Claude. Three builds later there are three sets of bugs.
The Headless Experience Layer (HXL) is a unified experience engine that separates business logic, data and permissions from the presentation layer. You define the business rules and UI structure once, and HXL translates them into native payloads for each channel.
Building blocks and surfaces
| Block | What it is |
|---|---|
| Lightning types | Blueprints for the data. Primitive types cover dates and currency, complex types cover a person or an address. A custom Lightning type (CLT) describes what a widget displays |
| Components | Prebuilt UI pieces such as buttons, tables and text fields that look native on every supported surface |
| Widgets | A complete UI composed of components, defined declaratively in JSON |
| Channels | The surfaces where a widget appears |
A widget describes what the UI should be and owns no business logic, whereas Lightning web components need a framework-specific implementation.
At the time of writing, the HXL module lists these supported surfaces: Agentforce Employee Agents in Lightning Experience, Slackbot, ChatGPT and Claude Desktop. Other AIforce modules describe HXL more broadly, reaching surfaces such as Teams, WhatsApp, Voice, mobile apps and custom portals, so expect the list to grow. Slackbot, ChatGPT and Claude Desktop render the widget through a custom MCP server. The business logic lives in an invocable action that retrieves the data. For an MCP channel, that action becomes an MCP tool on a custom server and the CLT is added as a resource.
How an action output becomes a widget
- A user sends a request to an Agentforce Employee Agent, and Agentforce routes it to a subagent.
- The subagent invokes an action, which returns structured output.
- By default the output appears in a standard format. To show a widget, the builder selects the widget's CLT in the action's Output Rendering field.
- The renderer linked to the CLT maps the output to the widget's attributes, and the widget appears in the conversation.
The action keeps returning the same structured output. Only its presentation changes.
Use HXL when a rich UI conveys information better than text, such as a flight's gate and seat at a glance, and when an experience must work on several surfaces. The browser-based HXL Playground lets builders inspect components and preview widgets on each surface.
Exam tip: HXL is about presentation, not access. MCP and APIs get the data out, and HXL decides how it looks. "Define once, render everywhere" is HXL.
Headless use cases
Scenario: A sponsor asks whether headless is more than a developer feature. In every use case, Salesforce works in the background and the person stays in their own tool.
| Use case | Tools that appear |
|---|---|
| Sales | The Slack MCP Server for conversation context and a Salesforce-hosted MCP server for Agentforce Sales data |
| Commerce | The Agentic B2C Developer Toolkit: Agent Skills teach a coding agent how B2C Commerce works, an MCP Server gives it tools to act, a CLI deploys and a VS Code extension is for review |
| Health | Data 360 as the system of context, Agentforce Health as the system of record, MCP tools such as Provider Search and Home Health, and HXL widgets |
| Financial services | Five advisor journeys built from MCP tool calls, the MuleSoft MCP Bridge for legacy systems and the Tableau MCP for portfolio analytics |
| Field service | Orchestration, configuration and feature skills |
| Marketing | APIs and MCP, with Data 360 powering segment logic |
| Analytics | The Tableau Next semantic layer and Tableau Next MCP |
- Sales. Opportunity Summary, Account Health and Pipeline Summary bring deal data into Slack, and Activity Logging writes a call note or stage change back to Salesforce. On AI partner surfaces such as Claude, ChatGPT, Microsoft Copilot and Gemini, prebuilt skills such as Daily Briefing, Deal Review, Call Prep and Lead Triage turn requests into workflows. The partner matches a prompt to a skill and sees only what the user is authorised to see.
- Financial services. The journeys are Run My Day, Meeting Prep, Live Meeting, Post-Meeting Follow-Up and Client 360. In the follow-up, nothing is saved until the advisor confirms it.
- Field service. The setup conversation starts from the company's website URL. Orchestration skills produce an implementation plan, and once it is approved the other skills build the territories, work types, scheduling policies and mobile app. Slack renders the plan as dynamic UI components.
- Marketing. Campaigns, segments and flows stay in the platform: a loyalty app triggers a reward offer through an API, or a marketer asks for segment data in Slack. MCP is the standard way to trigger platform actions, though it doesn't choose the action for you.
- Analytics. The dashboard is no longer the only front end. The flow is ask, call, connect, answer, and because the semantic layer applies the business logic and row-level security, the answer matches the dashboards.
Building an agent through a conversation
A coding agent is an AI agent that creates code. Here a builder describes a service agent in plain language, including its name, its subagents and each subagent's actions. The coding agent asks clarifying questions, generates the agent script for review and deploys it on request. The builder then opens the agent in Agentforce Studio and tries it in Preview.
Exam tip: Find where the conversation happens and where the data lives. Slack context comes from the Slack MCP Server, governed metrics from Tableau Next MCP, legacy systems through MuleSoft, and the screen from HXL.
Hands-on exercise
Plan a headless rollout on paper
Decide which toolkit component, which kind of MCP server, which level of access and which oversight a service team's AI assistant needs, using only pen and paper.
Use a free Salesforce Developer Edition org — never a production org.
0 of 7 steps done
How to check your work: Your component answers are MCP, APIs, CLIs, skills and HXL in that order. Reading is low impact and read-only. The priority change is a narrow, reversible write: either permit it with validated inputs (low) or show it to the user for confirmation (moderate), as long as you can say why. The refund goes through human approval. Your connection chain starts with an admin enabling the server and never uses a Connected App.
Domain quiz: AIforce and Headless Toolkit
10 questions from the 78 in this domain, different each time and checked as you go. Anything you miss is saved to Mistakes review.
- Questions
- 10
- Time
- Untimed
- Feedback
- After each answer
New questions each time you start, drawn from the bank, unseen ones first.