Salesforce's new Agentforce Builder replaced the legacy builder for new agent creation starting July 13, 2026. The new engine is graph-based with subagent nodes, transitions, and stateful variables — replacing the legacy prompt-based ReAct loop. Migration is done via an 'Upgrade to New Builder' action in Setup, which converts existing agents to Agent Script. The post recommends a staged migration: upgrade first, stabilize with regression tests, then harden with deterministic logic. Regression testing uses Agentforce DX CLI commands (sf agent test create/run) with AiTestingDefinition metadata and scorers like topic_sequence_match, action_sequence_match, and bot_response_rating. A coding agent (Claude Code is shown) can automate the v1-vs-v2 diff. Multi-turn test cases require restating context explicitly and should be kept in separate suites from single-turn cases.

13m read timeFrom developer.salesforce.com
Post cover image
Table of contents
Why migrate legacy agents to the new Agentforce BuilderMigrate in stages, then harden with Agent ScriptVerify Migration with Regression TestingConclusionResourcesAbout the author

Questions this post answers

What changed when Salesforce moved agent creation to the new Agentforce Builder and can I still edit my legacy agents?

Starting the week of July 13, 2026, new agent creation moved exclusively to the new Agentforce Builder. Existing agents built on the legacy builder continue to work and remain editable, but no new agents can be created there. The new engine is graph-based — subagents are nodes connected by transitions with stateful variables — replacing the legacy prompt-based ReAct loop that re-evaluated every subagent and action each turn. Teams deciding whether to migrate their Agentforce agents now or later track these platform changes on daily.dev.

What CLI commands do I use to run Agentforce regression tests against both the legacy and new builder agents?

Use sf agent generate test-spec to scaffold a YAML spec, sf agent test create to generate the AiTestingDefinition metadata, and sf agent test run to execute. Omitting --test-runner targets the legacy testing-center runner and writes AiEvaluationDefinition for v1. Adding --test-runner agentforce-studio targets the new runner and writes AiTestingDefinition for v2. Running both loops and diffing the JSON output is the migration sign-off. Developers automating Agentforce CI pipelines find the latest CLI and DX tooling updates on daily.dev.

Which scorers should I use to verify an Agentforce agent migration produced no regressions?

Three scorers cover the core migration checks: topic_sequence_match confirms the agent routed to the expected subagent, action_sequence_match confirms the expected actions fired in order, and bot_response_rating uses an LLM to judge whether the final response matches the expected description. Additional quality scorers include completeness, coherence, conciseness, output_latency_milliseconds, factuality, and task_resolution for multi-turn goal verification. Agentforce developers validating scorer choices and testing strategies share findings on daily.dev.

309 Impressions