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 prompt can include
{{system.transcript}}, which keeps the newest 20,000 characters of the conversation. 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.
An agent that uses tools can open its reply with a short line, such as “Let me check that for you.” Ask for this in Instructions. The end user sees the line while the tool runs, and the answer follows as a new paragraph in the same bubble.
Model
The Model region picks which model powers the agent. The picker has a Search models… field. It groups the models by provider, with a count on each group. Meta models are under META-LLAMA and META. A lock marks a model your plan does not include. 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 Manage tools to open a popover with two tabs.
With nothing linked, the region says no tools are connected yet.
- A tool gambit offers actions from a connected toolkit or from CodeKit. Its badge carries a dot that shows the connection status. See Enable and use actions.
- A Component gambit offers native capabilities, such as forms, a meeting booking, file reading, and file generation. See Component gambit and Built-in AI capabilities.
- A Knowledge Retrieval gambit searches knowledge bases and returns results to the agent, so the agent answers from your own source material. One gambit can cover up to 10 knowledge bases. See Attach knowledge to an agent.
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. After a Button gambit, the greeting answers the option the end user selected.
- 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.
