Introducing Optional Slots in Agent Studio
We're excited to share a new capability in Agent Studio that gives you much more control over how your conversational plugins collect information: Optional Slots.
The problem
Until now, every slot declared in an Activity or Decision Policy required a value before the plugin could move forward. That meant users were prompted for every single field if no value was explicitly provided when NULL, a previous step, or a sensible default would do. For plugins like quick updates, lookups, or one-shot transactions, this added unnecessary friction to the conversation.
What's new
Optional Slots introduce two key concepts: More robust Slot Inference Policies and Fallback Values.
Slot Inference Policies let you control how each slot's value gets collected:
- Always Ask: The assistant always prompts the user, even if a value could be inferred from context.
- Infer if Available: The assistant tries to infer the value from conversation context first. If it can't, it prompts the user.
- Always Infer: The assistant never prompts for this slot. It uses an inferred value if available, otherwise it uses the fallback value you define.
Fallback Values let you define what happens when the user doesn't provide input. These can be static values (like a string or number), DSL expressions that pull from the data bank, references to other collected slots, or simply NULL.
Together, these unlock patterns that were previously difficult or impossible to build: one-shot transactions, smart defaults, conditional workflows, and more.
A quick example
Imagine you're building a plugin that updates a user's address. You collect their most recent address via a resolver, then want to let them optionally change just the city. With Optional Slots, you can configure the city slot to fall back to data.recent_address.city, so if the user doesn't specify a new city, the plugin automatically uses the one on file. No extra prompts, no friction.
Things to keep in mind
- If you use Always Infer, you must define a fallback value.
- When a slot's fallback references another slot, make sure the referenced slot is positioned to the left in your Required Slots list. The reasoning engine processes slots left to right, so dependencies need to be collected first.
- When a slots’s fallback references an action output that activity must be complete before the slot is collected with the fallback referencing that action.
- File slots have some limitations with optional configurations. Always Infer and fallback values won't work with file uploads: use Infer if Available or Always Ask with a NULL fallback instead.
Get started
Check out the full documentation for detailed configuration examples, fallback expression syntax, and best practices:
📄 Optional Slots Documentation
We'd love to hear how you're using this in your builds. Drop your use cases or questions in the comments!