Action chaining and subagent transitions
Key Takeaway
Actions that you run in the reasoning instructions run in order before the prompt is sent to the LLM. The LLM, however, decides whether to call a reasoning action or use a reasoning transition. Transitions are one way: after the new subagent completes, the next customer utterance starts again at the start_agent block.
In Agent Script, action chaining makes an agent run several actions in a set order, so a multi-step workflow doesn't depend on the LLM remembering every step. Subagent transitions move the conversation from one subagent to another. A transition happens either because the LLM picks it or because script logic forces it. Together, action chaining and transitions let you mix predictable, rule-based steps with flexible LLM reasoning.
How Agentforce processes a request
- Every request starts at the
start_agentblock (the agent router). Thestart_agentblock usually sets the starting values of variables. It also usually does subagent classification, which tells the LLM which subagent fits the current context. - Inside a subagent, Agentforce resolves the reasoning instructions into a prompt, working from top to bottom. Along the way, it runs any actions, variable assignments and if/else logic in those instructions.
- The LLM receives the resolved prompt and starts reasoning.
Because the LLM starts reasoning only after it receives the resolved prompt, everything that runs during resolution is deterministic.