This page provides troubleshooting suggestions for debugging and observing your agents as you build them.
Some blocks such as PDF parsing and text generation can take a while to run. As an agent runs, you can view its progress through the blueprint by navigating to the Blueprint tab.
The color of a blueprint block’s border describes the status of its execution.
The following image shows a blueprint with a PDF parsing block that’s currently running. The previous blocks have completed successfully and the following blocks haven’t run yet.
You can also see the progress of the agent in the Log status bar. Learn more below.
If there are any errors or messages as your agent runs, you’ll see an indication in the Log bar in the bottom right corner of the page.
You can click the Log bar to expand it and see more details.
You can add additional custom Log message blocks to the agent for debugging purposes. Log messages are helpful to understand the flow of the agent and the value of state and other variables at a given point in the execution.
To add a log message, add a Log message block to the canvas. In the block’s configuration panel, update the following fields:
info
or error
Below is an example of a log message block during a file parsing process. It logs the file ID before beginning the parsing process, to help you debug if the file is not found or not parsed correctly.
When the block runs, you’ll see the log message in the Logs bar at the bottom of the page.
You can use python print
statements and the globally available logger
object to add additional logs to the agent.
The following image shows an example of a Python block that logs messages via print statements and the logger
object.
When the block runs, the log messages appear in the Logs bar at the bottom of the page.
The log bar shows information about the agent’s execution as it runs and after blocks complete. It includes the following:
The trace link opens a new tab with a detailed view of the agent’s execution at that point in time. It contains:
Below is an example of a trace after a File upload block has completed.
You can use the State explorer to view an agent’s state variables and their values. This is helpful when you’re debugging an agent or need to check the state at a given point in the execution.
To access the state explorer, click the State explorer icon in the top right corner of the page.
You can view usage and performance metrics for your agent in the Observability tab. To get to this view, select the agent from the AI Studio homepage and navigate to the Observability tab.
Here, you can view: