How an AI Agent gambit runs
When the conversation reaches an AI Agent gambit, the gambit takes over the turn. It reasons about the end user’s message, calls tools when needed, and composes the reply. It repeats this loop, turn after turn, until an exit route matches, then hands the conversation to that branch.The gambit editor
Every page in this section shows the same demo flow: Start, a Welcome message, the gambit this page covers, then End. The gambit sits third, selected, with its editor open on the right. The rest of the screen is dimmed. The gambit carries one handle per exit route, and a Loop badge that marks it as the step that holds the turn. The Label and Variable fields at the top behave as they do on every gambit editor. Below that row sit the sections this page walks through: Messages, Instructions, Model, Tools & Capabilities, Exit Routes, Behavior, and Guardrails.Messages
The Messages accordion holds the gambit’s welcome messages. These bubbles fire once when the gambit activates, before the agent takes over the conversation. Use them to greet the end user or to introduce the AI agent. If you leave the bubbles empty, the Auto-Greet switch in Behavior can open the conversation instead, with a greeting based on conversation context.Instructions
The Instructions region shows a preview of the current prompt. Select Edit to open the System Prompt dialog, where you write the prompt in one of two tabs.
The Raw tab shows the same prompt as one free-form Base prompt. Type @ in either tab to insert a captured variable. The History rail beside the raw editor keeps your recent saved prompts, and Use restores one.
Generate with AI drafts a prompt for you from a short description. Save Prompt applies your changes and closes the dialog.
Model
The Model region picks which model powers the agent. The picker has a Search models… field. Selecting a model your plan does not include opens an upgrade prompt instead. Select the gear icon next to the picker to open the Model parameters popover. It groups the parameters under Generation, Reasoning, and Sampling.
A parameter that the selected model does not support stays in the popover but is disabled. Its info icon says why. A model that requires reasoning does not offer Off, so switching to it picks its lowest effort level.
Tools and capabilities
The Tools & Capabilities region lists what the agent can call, as badges. Select Configure to open the Built-in Tools & Capabilities dialog.- Output components (render_ui) lets the agent render visual elements beside its reply, such as charts, tables, and cards. A switch turns the capability on, and the cards choose which components the agent may use.
- Input components (request_user_input) lets the agent show an interactive input and wait for the end user, such as forms, pickers, and file upload. It works the same way, with a switch plus component cards.
- Built-in Tools holds Web Search, Code Interpreter, Data Extraction, File Generator, and File Reading.
Exit routes
Exit routes are how the agent hands control back to the flow. The agent reads each route’s name and description from its system prompt, then decides when to exit based on conversation context. The Exit Routes region shows the routes as badges, with the first one marked (default). Select Configure to open the Exit Routes dialog.- An exit name, such as Escalate.
- A target gambit dropdown, which picks where the conversation goes next.
- A description of when the agent should take this exit. Write it clearly, because it steers the agent’s decision.
Behavior
The Behavior section collapses below the main regions and holds two settings.- Auto-Greet makes the agent open the conversation itself when no welcome bubbles are configured, based on conversation context.
- Max Steps per Turn caps how many tool calls the agent can chain within one turn. The default is 10 and the maximum is 50. A higher cap allows more tool use but takes longer.
