The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Must-read

Running a seven-stage agent-driven Salesforce lifecycle with the Headless Toolkit (opens in a new tab)

You will learn how to structure a Salesforce project around coding agents, using Skills, hosted MCP Servers and the Salesforce CLI across seven stages from grounding to observation.

Why read this

You will also see how to keep the agent's context lean and feed each mistake back into the project's instructions, checks and specs.

  1. Ground in business and org
  2. Specify what to build
  3. Build with the agent
  4. Verify with tests and checks
  5. Review with a reviewer agent
  6. Release through a human gate
  7. Observe and feed mistakes back
The seven stages of the agent-driven Salesforce lifecycle, each leaving an artifact for the next

This Salesforce Developers Blog post, written by Principal Developer Advocate Mohith Shrivastava, proposes an agent-driven development lifecycle built on the Headless Toolkit: the Salesforce Skills Library (sf-skills), Salesforce Hosted MCP Servers for org context, and the Salesforce CLI for testing and deploying. The author argues that coding agents drift from platform best practices and miss what already exists in an org, so a team should wrap them in its own project layer of skills, instructions, ontology, tools and checks. The linear project model becomes a loop in which each stage leaves an artifact for the next, and every mistake feeds back into the project. The author also stresses keeping the agent’s context lean, since accuracy falls as the context window fills, and notes that the agent’s built-in harness is the same for everyone while the project harness is what makes it effective on a specific org.

The seven stages run as follows. Ground gives the agent the org’s existing metadata through the read-only Metadata Grounding MCP Server (Beta), a feature map and an ontology of business terms. Specify has the agent produce a short, human-approved spec kept up to date alongside the code, recommended as spec-anchored and used only for features that span several metadata types or sessions. Build lets one agent work step by step, or subagents work in parallel in separate git worktrees, with each subagent given only the context it needs. Verify runs independent checks such as Apex tests, Code Analyzer, ApexGuru scans, LWC and accessibility checks, and hooks that run automatically. Review uses a separate, read-only adversarial reviewer agent whose findings humans judge. Release has the agent validate and promote changes through deterministic gates, with a human owning the production step. Observe has the agent read debug logs and traces to find production issues and start the next loop.

The post closes with a principle: each repeated mistake should become a constraint. Advisory instructions and skills reduce errors, but deterministic tests, Code Analyzer rules, hooks and quality gates catch them regardless of who wrote the code, and the author recommends choosing the strongest option available and cleaning up existing code that the agent might copy. The author presents this as one approach to adapt rather than the only way, and suggests installing the skills and starting with the stages that suit the team.

Read the original at Salesforce Developers Blog (opens in a new tab)

Worth reading?

Pronto sample App shows how to build Headless Agentforce experiences (opens in a new tab)

You will see how one sample app wires Agentforce agents, custom MCP servers and HXL widgets together, and which tool types and latency trade-offs to weigh when exposing Salesforce logic to external clients.

  1. Agentforce agents and actions in the org
  2. Hosted MCP Servers expose the tools
  3. External Client App connects the client
  4. Third-party agent renders HXL widgets
How the Pronto employee assistant reaches users across surfaces

The Pronto sample app is an open-source example built on the Headless Toolkit, set around a fictional food delivery platform. It ships two Agentforce agents: an employee assistant and a customer service assistant. Both are orchestrator agents that share a storefront explorer assistant as a connected subagent, which shows how multi-agent orchestration can transfer conversations and reuse subagents without losing context.

The app also demonstrates exposing business logic through Salesforce Hosted MCP Servers. Its employee MCP server offers several tool types: Apex tools built from invocable actions, an Apex REST tool for storefront search registered through the API Catalog, and an Agentforce agent exposed as a custom MCP tool. The article notes that the agent-as-tool adds latency, because Agentforce makes further LLM calls after the first call to the MCP server.

Pronto is delivered to several surfaces from one codebase: an LWR Experience Cloud customer site, and external clients such as Claude, Slack and ChatGPT. Through the Headless Experience Layer Beta, the employee server can return rich HXL widgets, such as an order status card, which render the same way on each surface. Readers can create an External Client App, connect the server to a third-party agent, and deploy the source from GitHub to try it.

Read the original at Salesforce Developers Blog (opens in a new tab)

Worth reading?