Member-only story
Agent Script in Depth — Part 6: Test and Ship
Series: Agent Script in Depth — writing Agentforce agents as code
Five parts in, Case Desk is a real agent. It routes between a queue and a case-work subagent, loads cases deterministically, gates comments across turns, and escalates cases through a scripted flow where the model can’t call the write at all. Every one of those behaviors was verified the same way: by previewing a conversation and reading a trace.
That’s fine for building. It’s not how you ship. An agent that’s going to real users needs the same discipline as any other code: a fast inner loop, tests that catch regressions, a release process with explicit steps, and a repository that another developer can clone and deploy without a phone call.
This final part covers all of it, in the order you’ll use it: the inner development loop, reading traces efficiently, turning the gates from Parts 3 to 5 into automated assertions, testing the Apex underneath, Testing Center suites, publishing and activating, and source control and CI, including the default_agent_user question a reader asked after Part 1.
The inner loop
Every change to Case Desk should go through the same four commands, and it’s worth knowing exactly what each one proves:
sf agent validate authoring-bundle…









