Skip to main content

Agent Builder

The Agent Builder is a tool that lets you design, create, and organize agents to automate your processes in Glean. Think of the Agent Builder as your "workshop" for building automations where you decide what your agent will do, step by step.

Using the Agent Builder, you can break down complex work into clear, manageable instructions. Each agent you create follows a series of steps that you set up, like collecting information, making decisions, or running Sub-agents.

note

The tools available in Agent Builder depend on your organization's admin settings. A tool appears when an admin has enabled it for Agents and included you in its access scope. You don't need the Admin or Tool Creator role to add an existing tool if you already have permission to create or edit the agent. See Manage agent access and Managing tool access.

Some Glean tools also require a corresponding feature to be enabled. For example, the Presentation Generation tool is available only when Slide deck generation is turned on, and the Image Generation tool requires Contextual Images to be turned on in the Admin console. Presentation Generation is available only in Autonomous (Auto Mode) agents, not Workflow-mode agents.

Getting Started​

When you begin building a new agent, you'll be presented with a modal offering two creation approaches:

Build with Natural Language​

Choose this option to describe your agent's purpose in plain language. Simply tell the Agent Builder what you want your agent to accomplish, and it will automatically generate the appropriate steps for you. This approach is ideal when you prefer not to configure each step manually.

note

Your organization must have an agentic model configured to use the natural language panel.

Start from Scratch​

Select this option to build your agent step-by-step using the traditional interface. This gives you complete control over each step's configuration and is perfect when you need precise control over your agent's behavior.

Regardless of which approach you choose initially, you can always switch between natural language and manual editing throughout the building process.

Agent Settings​

You can find Agent settings by clicking the gear icon at the top right in the Agent Builder screen. All agents require an icon and a name. You can help your users understand what your agent does by adding a description. This is what your users will see when they browse through the agent library.

Enhance description​

The Enhance button (sparkle icon) appears next to the agent description field, both under the agent title and in Agent Settings. Clicking Enhance generates or refines the description using the agent's current configuration as context. This makes it easy to create clear, accurate descriptions without writing them from scratch.

  • Click Enhance to auto-generate a description based on your agent's steps and configuration
  • Review and edit the generated description for accuracy and clarity
  • Use Undo if you prefer the previous version

When you share an agent that doesn't have a description, Glean also automatically suggests an icon and description. For more information, see Sharing and Permissions.

Agent Models​

The Glean Model Hub enables you to experiment with and select the most suitable model for each agent and its respective steps. This selection of models allows organizations to flexibly experiment with, choose, and combine leading AI models for each step of their workflows, ensuring data safety, rapid access to new models, and robust performance tracking.

It also empowers businesses to optimize AI performance and cost without vendor lock-in or management overhead. For more information on accessing the model hub, please refer to the Set up LLMs article.

Agent goal message​

The agent goal message is intended to clarify the specific objective that the agent aims to achieve during interactions. It serves as a short description that helps the AI to provide more focused and relevant responses based on the task at hand.

When writing an agent goal message you should consider:

  • Clarity and Specificity: Clearly state what the agent is supposed to achieve. Avoid vague or broad goals, as this can make it harder for the LLM to provide relevant responses.
  • Conciseness: The goal message should be short but comprehensive, summarizing the purpose of the conversation or task.
  • User Perspective: The message should make sense to both the AI and the user, providing enough detail to guide the interaction without being confusing.
  • Distinguishability: If there are multiple agents or similar conversations, craft the goal message to help differentiate between them.

Here are some examples of agent goals across a few job functions:

  • Engineering: "Assist developers in debugging code and provide solutions for common programming errors."
  • Sales: "Guide prospects through product features, answer pricing questions, and assist with purchase decisions."
  • Support: "Help users troubleshoot technical issues and deliver step-by-step resolutions for reported problems."

Enhance prompt​

The Enhance prompt feature automatically improves any step's natural‑language instructions in a single click. When editing a step that accepts a prompt, you can click the Enhance prompt button to have Glean review your text, apply embedded prompting best practices, and generate a refined version tailored to the step's objective.

Key features:

  • Available on all steps that accept prompts - Works across any step type that allows free‑form instructions
  • One-click improvement - Instantly applies field‑tested prompting best practices to your step instructions
  • Undo support - If you don't like the enhanced version, you can instantly revert to your original prompt
  • Consistent quality - Helps maintain high‑quality prompts across all steps in your agent

This feature is particularly useful for users who want to leverage proven prompting techniques without having to manually research and apply best practices themselves.

Natural Language Panel​

The Agent Builder includes a natural language panel that you can access at any time by clicking Open panel in the upper left corner. This panel allows you to:

  • Generate new steps: Describe what you want your agent to do, and the system will create the appropriate steps automatically
  • Modify existing steps: Provide instructions to update, reorder, or refine your current agent steps
  • Iterate quickly: Make changes through conversation rather than manual configuration

Flexible Editing Workflow​

The Agent Builder supports a hybrid approach that combines natural language and manual editing:

  • Start with natural language: Use the initial modal or open panel to describe your agent's purpose
  • Switch to manual editing: Take precise control over any step's configuration, models, or triggers
  • Return to natural language: Use the Open panel whenever conversational editing is faster than field configuration
  • Real-time updates: Your agent's steps update immediately as you iterate through either method

This unified experience lets you start with natural language and finish with precise configuration—or vice versa—without switching tools.

Preview​

The preview agent option lets creators test or interact with their agent in a safe, private environment before making it available to a wider audience. This allows for troubleshooting, refining agent responses, and validating functionality without impacting real users or live workflows. This also streamlines the development cycle by enabling iterative updates and immediate feedback during testing.

After you kick off your agent using the preview, you will have two additional options:

  • Reset Preview: Return to the first screen to enter new values for the initial trigger.
  • Try Again: Re‑run your last input to observe how responses may vary.

Save​

The primary button in the top-right of the builder is labeled Save.

  • Click Save to apply your changes to the agent. All edits are held as a draft until you save.
  • Drafts are auto-saved even if they contain errors, so you can persist changes without perfecting your agent.
  • Want to undo changes? Click Restore to Published State to discard your draft.

More tools menu​

The Manage menu in the Agent Builder groups agent status and management options:

  • Disable agent/Enable agent: pause or resume an agent without deleting it. Only available to admins with the right controls enabled.
  • Delete agent: permanently remove the agent. Only available to users with owner-level delete access.
  • Settings: open agent settings.
  • View insights: open the insights dashboard for this agent.
  • Duplicate: create a copy of the agent. When you duplicate an Auto mode agent, the copy keeps only the custom actions and MCP tools you have permission to add to agents, including tools its sub-agents use. Glean removes any other custom actions and MCP tools from the copy and shows a message asking you to reconfigure those steps. See Managing tool access.
  • Import/Export: import or export an agent configuration. Access and file format depend on the agent mode. See Export and import agents.

Export and import agents​

Export and import let you move agent configurations between Glean deployments or share them across teams. Both Workflow mode and Auto mode agents support export and import.

Who can export and import​

Your role and your permission level on the agent determine whether you can export or import.

Export requires two things:

  • Agent-creation permission in your Glean deployment
  • At least Viewer access to the agent

One exception applies: exporting a never-published Auto mode agent requires Edit access instead of Viewer access because no published version exists for viewers to access. Admins and Agent Moderators always retain export access. You can also export sub-agents and disabled agents as long as you have agent-creation permission.

Import requires Edit access to the target agent. Glean applies the imported configuration as a draft, so you can review the changes before saving.

The following table summarizes the access requirements:

ActionRequired access
Export a published agentAgent-creation permission + Viewer access or higher
Export a never-published Auto mode agentAgent-creation permission + Edit access
Import into an agentEdit access to the target agent
note

If you do not see Import or Export in the three-dot menu, confirm that your account has agent-creation permission. Admins can verify this in Admin console → Agents.

Export formats​

Each agent mode uses a different file format:

Agent modeExport format
Workflow modeJSON
Auto modeZIP file containing spec.yaml and instructions.md

Export and import Workflow mode agents​

To export a Workflow mode agent:

  1. Open the agent in the Agent builder.
  2. Open the three-dot menu and select Export.
  3. Save the JSON file.

The export contains the full agent specification, including steps, tools, sub-agents, and settings. Glean converts tool references to portable names, obfuscates the names and email addresses of the agent owner and shared users, and removes URLs from step instructions.

To import a Workflow mode agent:

  1. Sign in to the destination Glean deployment.
  2. Open the Workflow mode agent you want to update in the Agent builder. You must have Edit access to this agent.
  3. Open the three-dot menu and select Import.
  4. Upload the exported JSON file.

Glean applies the imported configuration to the current agent as a draft. Glean recreates any sub-agents included in the export and validates the configuration against the destination deployment. If a tool, trigger, or other feature in the file does not exist in the target environment, that step appears with a yellow outline.

The draft includes an informational sticky note that describes possible configuration issues. Open each yellow-outlined step, replace or reconfigure the unavailable tool or trigger, and save the agent. If the configured AI model is not available in the destination deployment, the imported agent uses the same model as Glean Assistant in that deployment.

Glean does not guarantee backward compatibility for exported agent schemas. An export from an older Glean release might not import into a deployment on a newer release.

Export and import Auto mode agents​

To export an Auto mode agent, open the three-dot menu and select Export. Glean generates a ZIP file containing spec.yaml and instructions.md. Never-published agents require Edit access because no published version exists for viewers to access.

To import, open the Auto mode agent you want to update, open the three-dot menu, and select Import. Upload a ZIP file exported from an Auto mode agent. Glean applies the configuration to the current agent as a draft. Review the draft before saving.

Cross-deployment considerations​

You can use exported agent files across Glean deployments. If a tool or sub-agent in the file does not exist in the target deployment, reconfigure that step manually after import.

Request to share an agent​

If you can't change who has access to an agent, its share dialog shows Agents can only be shared by admins and agent moderators. You can still ask an admin, an agent moderator, or the agent's owner to share the agent with the people you choose. When requests are available for the agent, a Request to share button appears at the bottom of the share dialog, next to Copy link. This works the same way for Auto mode and Workflow mode agents.

Send a request to share​

  1. Open the agent's share dialog and click Request to share.
  2. In People, select the people who need access. You can add up to 100 people. You can't add groups, departments, or yourself.
  3. For each person, choose Viewer or Editor. Glean selects Viewer unless the person is already a viewer, in which case it selects Editor. To take someone off the request, click the X next to their name.
  4. Optional: In Message (optional), add a note for the approver of up to 2,000 characters.
  5. Click Send request.

Glean shows a Request sent confirmation and returns you to the share dialog. To leave without sending a request, click the back arrow.

When you can't request access for someone​

The request view tells you when a person or role can't be part of the request:

MessageWhat it means
Already an owner or Already an editorThe person already has that access, so there's nothing to request.
Already a viewer. Request editor access instead.The person can already view the agent. You can request only Editor access for them.
This agent is shared with your entire company as viewer. You can request editor access.Everyone can already view the agent. You can request only Editor access.
We can't verify this personGlean can't confirm who the person is or what access they have, so you can't add them.

If Glean can't send the request, the dialog shows We couldn't send your request. Check your access and try again.

For who can share agents and which roles collaborators can have, see Sharing and permissions.

Retrieval and execution limits​

Agents have tool-call budgets for each run and payload size caps for each response. When you build agents that need to retrieve large datasets, for example every open ticket in a Jira project, use a native connector tool like JQL or SOQL rather than company search. Batch queries by date range or field to stay within those limits.

See Limits and exhaustive retrieval best practices for guidance on choosing between company search and native tools, configuring result counts, and paginating large result sets.

Unavailable actions in a step​

When you select a step with an action that you cannot access, for example, if another user did not share the action or if it is removed, the step configuration panel displays Action unavailable instead of the step settings. An error banner explains that you cannot access the action or that the system cannot load it.

To fix the step, open the menu in the panel and select a different action, or delete the step. To learn which tools you can use in Agent Builder, see Managing tool access.

Agent Drafts​

All changes made to an agent are automatically saved as a draft. These edits do not impact the live agent until you save.

Agent Versions​

Each time you save, the current changes become the new live agent, and a snapshot of the previous live version is stored in version history.

  • Version history lets you browse and revisit earlier agent versions.
  • Click Restore on any past version to create a new draft from it.
  • Only the most recent 30 versions are retained.