Skip to main content

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.

After you have found an agent and run it from the Library, the agent follows:

  1. Trigger: How the agent starts
  2. Steps: The ordered set of things the agent does
  3. Actions: Concrete tasks the agent performs
  4. Flow: How the agent decides what to do next
  5. Memory: What the agent remembers as it runs

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 memory. Later steps can read from this memory so they can:

  • Reuse earlier results without re-running work.
  • Make decisions based on everything that has happened so far.
  • Pass information to sub-agents and get results back.

By default, each step has access to the full history of previous steps. You don’t need to manage memory manually—Glean handles it for you behind the scenes.

For more information, see the Memory article.