Salesfroce AgentScript
AgentScript is to think of it as a combination of: Prompt Engineering + Flow Decision Logic + Invocable Apex Actions + Variables and State Management Let's learn it by building a simple agent. Basic Structure of AgentScript An AgentScript file typically contains: system variables actions agent definition reasoning instructions 1. System Instructions This defines who the agent is . system: instructions: > You are a customer support assistant. Be polite and concise. Equivalent to: "You are ChatGPT..." in prompt engineering. 2. Variables Variables maintain state during the conversation. variables: customer_verified: mutable boolean = false case_number: mutable string = "" customer_type: mutable string = "" Think of this as: Boolean customerVerified = false; String caseNumber; 3. Actions Actions are Salesforce operations. Example: actions: verifyCustomer getOpenCases createCase These actio...