Skip to main content

Tech Blog

Explore practical guides and implementation patterns for this topic.

Posts

Agentforce

🚀 Mastering Agentforce Subagents: before_reasoning & after_reasoning Guardrails

💬 In plain words: When building AI agents in Salesforce Agentforce, before_reasoning and after_reasoning are two optional logic blocks inside a subagent. One runs exactly before the AI thinks, and one runs exactly after. They contain hard logic (code), not prompt suggestions. This is where your absolute, unbreakable rules must live. 📌 Example: A utility company verification agent checks if a caller actually owns the meter in the before_reasoning block. Later, it escalates any refund request above $100 inside the after_reasoning block. Neither of these critical business decisions is left up to the AI language model.
Read article