Skip to content

Guided Scripts

Guided scripts define the questions an assistant asks during guided conversations. They’re available when the assistant is set to either Guided - Interview or Guided - Discovery mode.

Setting Up a Script

Navigate to the assistant detail page and select the Script tab. You’ll see the script editor where you can add, edit, reorder, and remove steps.

Each step has:

FieldDescription
QuestionThe question to ask the user. The assistant will phrase this naturally — it doesn’t have to use your exact wording.
Field KeyA short identifier for the data being collected (e.g., company_name, budget, timeline). This helps the assistant track which answers it has received.
RequiredWhether the assistant must get an answer to this question before concluding. Only applies in Interview mode.
Follow-up NotesOptional guidance for the assistant on how to handle the response — for example, “Ask for specific numbers, not ranges” or “If they mention competitors, ask which ones.”

Reordering Steps

Drag steps using the grip icon on the left to reorder them. The assistant will generally follow this order but may adapt based on the natural flow of conversation.

Interview vs Discovery

How the script is used depends on the assistant’s mode:

Interview mode — The assistant treats required questions as mandatory. It will keep the conversation going until all required questions are answered, circling back to missed ones naturally.

Discovery mode — The questions serve as a guide, not a checklist. The assistant adapts based on the conversation and may skip questions that aren’t relevant. Once it has enough context, it triggers the configured primary tool.

Goal & Completion

Above the script steps, you can configure what the conversation should achieve and what happens when it’s done.

FieldDescription
Goal DescriptionA freeform description of what the conversation should achieve — e.g., “Help the user find their ideal photo and present a final selection.” This is included in the assistant’s instructions to guide it toward a clear endpoint.
Completion ActionWhat the assistant should do when the goal is reached. Options: Summarize results (default), Save as deliverable (uses save_content), Use primary tool (calls the configured primary tool with collected info), or Just end the conversation.
Enforce completionWhen enabled (default), the assistant is actively nudged to wrap up once all required answers are gathered. Disable this if you want the assistant to continue conversing naturally even after requirements are met.

Progress Tracking

The system automatically tracks which script questions have been answered after each turn. This progress is injected into the assistant’s instructions so it always knows where it stands — which questions are answered, which are still pending, and whether it’s time to move to the completion action.

This means the assistant won’t re-ask questions that have already been answered, and it has reliable awareness of its progress even in long conversations.

Technical Details

Progress extraction — After each assistant response, the system makes a separate lightweight LLM call to analyze the conversation transcript against the script questions. This analysis runs after the response has already been delivered to the user, so it adds no latency to the user-facing interaction.

Progress structure — The LLM returns a structured JSON result containing: which questions have been answered (with brief answer summaries keyed by the field key you defined), which required questions are still pending, which optional questions are still pending, and an overall status of “in_progress” or “complete.”

Prompt injection — This progress JSON is stored on the conversation and injected into the system prompt on every subsequent turn. The assistant sees exactly which questions have been answered (and what the answers were), which remain, and whether it’s time to move to the completion action. This prevents re-asking answered questions and gives the assistant reliable self-awareness of its progress even in long, winding conversations.

Completion flow — When the status reaches “complete” (all required questions answered), an explicit instruction is added to the system prompt telling the assistant to proceed to the configured completion action: summarize the collected information, save it as a deliverable, call the configured primary tool with the gathered context, or simply confirm that the conversation is done.