Every agent starts with a Trigger, followed by a set of Steps. The actions chosen will vary from agent to agent, based on the goal or purpose. Generally, every agent moves through the following cycle:

  • Trigger: The agent is triggered somehow and starts
  • Steps: The agent moves through steps, either executing an action or moving through flow:
    • Actions:
      • Retrieves information
      • Uses AI to reason about information
      • Creates content or takes action in other systems (e.g. commenting on a ticket)
    • Flow
      • Branches based on conditions
      • Runs sub-agents

The sections below detail each of these phases.

Triggers

An agent trigger is an event that initiates the execution of an agent within the system. It defines the conditions under which an agent will start, allowing the automation to begin responding to specific actions or changes. Triggers enable the seamless and autonomous operation of agents, ensuring they act when you want them to based on predefined conditions.

For more information on the types of triggers you can use, visit the Triggers article of the Glean documentation.

Steps

A step is something that your agent does. You specify a series of steps for your agent to perform, and it will progress through these steps, running each one as it goes. There are two types of things that can happen in a step: Your agent can perform an action, or it can choose between a number of actions to perform based on conditions you specify. You use the Agent Builder to add your steps, configure them, and define the order and conditions in which they run.

Actions

An action is a specific task or operation an Agent performs. You’ll typically use multiple actions, one per step, to achieve your agent’s overall goals. Some things actions can do include:

  • Reading data
  • Writing to data sources
  • Drafting emails
  • Updating documents

For information on the specific actions Glean can perform, see the Actions section of the documentation.

Flow

Flow determines how your agent moves through its instructions to complete a task. You can use flow to specify branches that select different actions based on conditions, or Sub-agents that run entire agents within your agent.

For more information on flow, see the Flow section of the documentation.

Memory

As the Agent executes each step, each action contributes its output to memory. As more steps are performed, the information stored in memory grows. By default, every step has access to the complete history of all previous step outputs, allowing the Agent to reason at each step using all of the information it has collected so far.

For more information about memory, visit the Memory article of the Glean documentation.