
This document provides a detailed overview of using the debug feature within Glean Agents to test and refine your agent's performance. Follow these steps to efficiently troubleshoot and enhance your agent's capabilities.
To demonstrate the debug feature in Glean Agents, start by ensuring your agent is fully created with all required steps. Testing its functionality is the next logical step.

To initiate a test, click the Preview button located at the top right. This action allows you to run your Glean Agent.
After running your agent and reviewing the output, activate the debug feature by clicking the debug toggle at the top right. This action loads the steps in debug mode.
In debug mode, you can review each step taken by the agent. Delve deeper into any specific step by selecting it for more information. The corresponding step of the agent is also highlighted in green on the left.
In this example, the debug mode displays the URL of the Google document provided to the agent as the input. And below that, the resulting output can also be seen detailing the information extracted from the document and saved in the agent's memory. Click the ... to expand the view and show more details.
To explore additional steps, navigate back to the top and select "trace." This allows you to sequentially review subsequent steps.
Using this method is an excellent way to understand your agent's inner workings beyond just observing the final output. It offers deeper insight into how Glean Agents function and is helpful for troubleshooting and optimizing an agent.
