Next-generation authoring of Agent Script
Key Takeaway
Agent Script lets you mark where the LLM is free to make reasoning decisions and where the agent must run deterministically, so the agent still talks naturally but follows your rules predictably.
Agent Script is the language behind agents built in the new Agentforce Builder. It is the foundation of the next generation of Agentforce agents. Agent Script mixes natural language instructions, which the LLM interprets for conversational tasks, with programmatic expressions, which handle business rules the same way every time. The result is an agent that still reasons and talks naturally, but follows your rules predictably instead of relying only on the LLM's interpretation.
What expressions do in Agent Script
In Agent Script, you use expressions to do these things:
- Define if/else conditions and transitions.
- Set, modify and compare variables.
- Select subagents and actions.
Agent Script lets you mark areas where the LLM is free to make reasoning decisions and areas where the agent must run deterministically.
For example, you can control exactly when the agent moves from one subagent to another. You can also make the agent run actions in a set sequence, which is sometimes called action chaining.