QuestionQ173

VerifiedAI Agents

Universal Containers is building an Agentforce Service Agent to help customers track their purchases. To retain the customer’s order number during the conversation, the Agentforce Specialist creates and initializes a variable in Agent Script with the declaration order_id: string = "", leaving out the mutable keyword. During testing, the agent tries to update this variable with the user’s order number through the @utils.setVariables utility.

What is the runtime result of this variable declaration?

Explanation

In Agent Script, mutable permits an agent to change a custom variable’s value. A custom variable defined without mutable is intentionally immutable, so its initialized value cannot be changed by the agent, including through @utils.setVariables.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!