Skip to main content

Agent Script

Explore practical guides and implementation patterns for this topic.

Posts

Agentforce

Agent Script: Understanding the 8 Essential Blocks in Salesforce Agentforce

💬 In plain words: An Agent Script is a collection of building blocks, where each block contains either specific data or procedural logic. There are exactly eight types of blocks available, but as a developer, you will spend the vast majority of your time working inside just four of them. 📌 Example: Let's say you are building an internal employee assistant for a company called Meridian. This agent requires a config block with agent_type explicitly set to AgentforceEmployeeAgent . It also needs a variables block to store session data like the employee's meter ID and outage status, five separate subagent blocks to handle specific tasks, and a start_agent block to act as the traffic cop.
Read article
Agentforce

Agent Script: The Critical Difference Between Actions vs. Reasoning Actions in Agentforce

In plain words: There are two action lists inside a subagent in Agentforce, and they serve completely different purposes. One list runs strictly because your logic explicitly called it. The other acts as a menu of tools that the AI model can choose to use if it thinks they are needed. Confusing these two is the most common mistake developers make when writing Agent Script. 📌 Example: Imagine a utility company's agent (like Meridian). It runs an "outage lookup" deterministically every single time by placing it in the actions block. However, it offers a "book a crew visit" tool inside reasoning.actions , so the model only offers to schedule a crew when the context of the conversation actually requires it.
Read article