Create your first workflow mode agent
This tutorial builds a web page summarizer in workflow mode, where you place each trigger and step yourself on the visual canvas. Workflow mode gives you explicit control over the order of steps, unlike auto mode, where Glean plans the steps for you. By the end, you configure the flow, test it, and save it.
The web page summarizer does the following:
- Collects a web page URL.
- Reads the page content.
- Returns a formatted summary with headings and bullets.
The flow uses three building blocks:
- An Input form trigger to collect the URL.
- A Read document tool to store the content in memory.
- A Respond tool to generate the summary.
Not sure which mode to use? Start with Create your first auto mode agent. Auto mode is the recommended starting point for most agents. Use workflow mode when you need a fixed, repeatable process with manual control over every step.
Prerequisites
Confirm that:
- Agents are enabled for your organization.
- You have permission to create agents.
- You can open the Agent library from the left navigation in Glean.
If you do not see Agents in the left navigation, or Create agent is unavailable, agents may not be enabled for your account. Contact your administrator or Glean Support.
Step 1: Create a new agent
- In Glean, open Agents from the left navigation.
- Click Create agent. Glean opens auto mode by default.
- Enter workflow mode. Click the arrow next to Create agent and select the workflow option, or select Build a workflow agent from the auto mode starting screen.
- Choose Start from scratch so you can see how triggers and tools connect on the canvas.
Choose Build with natural language when you want Glean to draft the workflow steps for you. See Create a workflow agent using natural language. You can refine the draft afterward.
After you choose Start from scratch, Glean opens the agent builder. You use these controls to configure the agent:
- Canvas — the flow of the trigger and steps.
- Step configuration panel — inputs and instructions for the selected step.
- Agent settings (gear icon) — name, description, goal, and default models.
- Open panel — natural-language edits and step changes.
- Preview — test the draft without publishing.

Step 2: Collect a web page URL
The agent needs a way to collect the URL to summarize. Add an Input form trigger so the user can paste a web page link.
- In the trigger area, choose Input form as the trigger type.
- Add a text field to the form.
- Set Field name to a descriptive value such as
web page. This becomes the field[[ web page ]]. - Add a description such as
Enter the full URL of the web page you want to summarize.The description appears when users run the agent.
When users run the agent, they see this form first and provide the URL as [[ web page ]].
Step 3: Read the web page
Next, instruct the agent to read the content at that URL and store it in memory.
- Add a new step after the trigger.
- For Select step, choose the Read document tool.
- In Choose how to set the document or URLs, select Manual for this example.
- In Documents and URLs, enter
[[ web page ]]so the tool uses the URL that the user provided.
When the agent runs, it reads the web page at [[ web page ]] and stores the content in memory for later steps to use.
Step 4: Generate the summary
Now tell the agent how to summarize the page.
-
Add another step after Read document and choose the Respond tool.
-
In the Instructions field, enter summary guidance, for example:
Generate a summary for the webpage:- Create an "Overview" heading and provide a one-paragraph introduction.- Create a "Layout" heading and summarize the page layout in a short bullet list. -
Click Enhance prompt in the instructions field to have Glean improve the wording with best-practice prompting patterns. The enhanced version replaces your text and usually tightens structure and clarifies expectations. Click Undo to revert to your original text.
Your flow now has three steps: ask for a URL, read and store the page content, and respond with a structured summary.
Step 5: Choose a model (optional)
The Model Hub lets you choose from multiple models and set them per agent or per step.
- Open Agent settings (gear icon).
- Under Agent models, choose a default model that balances quality and speed for summarization.
- To override the default for one step, open the step and use the model selector in the step configuration. For example, choose a more capable model for the Respond step when you need richer formatting.
Start with a single default model. As you gain confidence, tune models per step to balance quality and cost.
Step 6: Preview and troubleshoot
Before you share the agent, use Preview to confirm that it behaves as expected.
- Click Preview.
- Enter a real web page URL that starts with
https://. - Run the agent.
As the agent runs, agent builder highlights the step that is running, so you can see where the agent is in the flow.
If something does not look right:
- Click Reset preview to start over with a new URL.
- Click Try again to re-run the last input and compare outputs.
Use debug mode for deeper troubleshooting
Debug mode shows which steps ran, along with the inputs and outputs of each step. Use it when:
- A step fails or produces unexpected output.
- You need to see the raw responses from tools, such as Read document.
- You tune instructions and want to inspect how changes affect the data between steps.
Preview, step highlighting, and the debug view together help you diagnose issues before you save.
For a typical page, the agent returns a summary like this:
Overview
This page explains how to request time off, who approves requests, and how
long approval usually takes.
Layout
- A short introduction to the time-off policy
- A step-by-step request procedure
- A table of leave types and accrual rates
- An FAQ section
You know the flow works when the input form accepts a URL, the Read document step stores the page content, and the Respond step returns a summary with the Overview and Layout headings.
Step 7: Name, save, and manage versions
After the behavior of the agent looks right:
- Click the default name, such as Untitled Agent, and rename it to something descriptive, such as Web page summarizer.
- Click Save to make the current draft the live version.
Glean saves every change as a draft until you save, and each save creates a version that you can restore later.
Step 8: Refine the flow
As you iterate, adjust the structure and instructions of the agent.
Reorder and restructure steps
Drag steps on the canvas to reorder them, including moving steps between branches. Use this to insert new steps, move steps earlier or later, and simplify complex branches.
Edit with the natural-language panel
Instead of changing each field by hand, use the natural-language panel:
- Click Open panel.
- Ask Glean to add steps, edit instructions, or rearrange and delete steps. For example,
After reading the document, add a Think step that identifies the three main themes.
You can switch between conversational edits and manual configuration without leaving agent builder.
Feature recap
You used these agent builder capabilities:
- The visual canvas to build a step-by-step flow.
- Input form and Read document to collect and store content.
- Respond and Enhance prompt to shape the output.
- Preview and debug mode to test before you save.
- Drafts and version history to save and iterate.
Next steps
- Set your agent to run on a schedule or when an event occurs. See Activate and manage triggered agents.
- Build the recommended way with Create your first auto mode agent.
- Let Glean draft the steps with Create a workflow agent using natural language.
- Combine more tools and branching logic with Create a more powerful agent.
See also
- Agent builder — reference for the builder surface and its controls
- Agent drafts and versions — how Glean saves and restores agent versions