How agents work
Glean Agents are reusable workflows that automate work for you and your teammates. You can discover, launch, and manage these agents from the Agent Library, then open any agent to see how it is built and what it does.
Every agent starts with a trigger, followed by a series of steps. Each step can perform an action, make a decision about what to do next, or call another agent. As the agent runs, it builds up memory so later steps can use the results of earlier steps.
The agent follows the following pattern:
- Trigger: How the agent starts
- Steps: The ordered set of things the agent does
- Actions: Concrete tasks the agent performs
- Flow: How the agent decides what to do next
- Memory: What the agent remembers as it runs
How to build agents
The Agent Builder course in Glean Academy is a self-paced, on-demand training that helps builders learn how to design and create Glean agents, from the basics of getting started to more advanced workflows. It covers the core building experience such as setting up agent steps, using natural language or manual configuration, and working with key concepts like branching, looping, read/search, and respond patterns so learners can move from simple agents to more powerful automations.
Triggers
A trigger is an event that starts the agent.
Triggers define when the agent runs. For example, an agent might start when:
- You run it manually from the Library or a link.
- A scheduled time is reached such as a daily digest.
- An external content or system update happens.
By configuring triggers, you decide which situations should automatically kick off the agent, so it can work without you manually starting it every time.
For more information on trigger types, see the Triggers article.
Steps
A step is a single unit of work inside an agent.
You define a sequence of steps, and the agent runs them one by one. In each step, the agent can either:
- Perform an action, for example, search your knowledge base, analyze data, or send a message.
- Use flow logic to choose between multiple possible paths, based on conditions you specify.
You configure steps in the Agent Builder, where you can:
- Add new steps.
- Reorder them.
- Define conditions for when each step should run.
Actions
An action is the concrete task an agent performs in a step. Typical actions include:
- Reading data (documents, tickets, records, calendars).
- Writing to data sources (updating tickets, logging notes).
- Drafting content (emails, summaries, reports).
- Updating documents or other external systems.
Most agents use multiple actions, chained together across steps, to complete an entire workflow from start to finish.
For a full list of available actions, see the Actions section.
Flow
Flow determines how the agent moves from one step to the next.
With flow, you can:
- Add branches that choose different paths based on conditions, for example, “if this is a bug report, do X; otherwise, do Y”.
- Call sub-agents to offload part of the work to another agent, then return to the main agent when the sub-agent finishes.
This lets you model complex processes using clear, readable logic instead of one long, rigid script.
For more information, see the Flow article.
Memory
As an agent runs, every step adds its outputs into a persistent memory log. Later steps can access this memory to reuse earlier results, make informed decisions based on the full execution history, or pass data to sub-agents.
While all data is stored in memory, you control how much of it is visible to each step through context settings. By default, the system employs a sequential context model where each step inherits only the output of the one immediately preceding it. You can refine this behavior to include all previous outputs or no prior outputs at all. To further optimize performance, use the [[ ]] syntax to explicitly reference a specific step’s output or an initial agent input. By combining the "no prior outputs" setting with these targeted references, you can pull exactly what you need from memory without the token overhead of a full history, maintaining precise data continuity and cost efficiency.
For more information, see the Memory article.