Waiting for engine...
Skip to main content

Testing and debugging agents

After you create an agent in the Agent Designer, you can test it in the Test Agent interface before packaging and deploying it to a production environment. Since the test interface is in the same place where you build agents, you can iteratively test your agent as you make configuration changes.

When you start using the chat interface, Agent Designer automatically deploys the agent to your default test environment and runtime cloud. You can select a different environment in the drop-down at the top of the testing window. For details on managing packages, deploying to multiple environments, and working with regional runtime clouds, refer Deploying agents The agent’s responses include a Show Trace section where you can see details on the agent’s response, reasoning, and the tools it uses. These details can help you fine-tune your agent and troubleshoot issues with responses and behavior.

The agent trace is only available in the Test Agent window.

image showing test agent window and trace

For deployed agents, you can view session logs containing details of the agents behavior, performance, and troubleshooting issues. Read Tracing sessions of Boomi Agent Garden agents to learn more.

looping image opening session logs from the log button in the chat

Testing your agent

tip

Test your agent iteratively. Test your agent before and after you add tasks and guardrails. Testing iteratively helps you easily identify which configuration is causing an issue and which configurations are working correctly.

  1. In Agent Garden > Agents, open your agent and converse with it in the Test Agent window.

    note

    Testing your agent may count against any usage limits.

  2. Select Show Trace to view details about the agent's reasoning, tool responses, latency, and more to troubleshoot and adjust agent behavior. You can copy tool response code from Action steps.

Testing best practices

  • Test the same input multiple times: AI agents are non-deterministic, meaning the same input can produce slightly different responses each time. Run the same input at least five times to build confidence that responses are consistently valid, even if they are not identical.

  • Test phrasing variations: Users will not phrase requests the same way you do. Test variations of the same request to ensure the agent handles them correctly. For example, an agent that handles "what is the status of my order" should also be tested with "can you pull up my order info."

  • Maintain a test input set: Keep a set of test inputs with expected outputs. Use this set to quickly verify agent behavior after any configuration change and confirm you have not broken existing functionality.

  • Enable Extended Thinking during testing: Turn on Extended Thinking in the agent's model configuration while testing to see the agent's reasoning in the trace. Note that Extended Thinking increases latency. Disabling Extended Thinking removes the reasoning section from the trace, potentially making it harder to diagnose reasoning issues.

  • Watch for live plan streaming: With Extended Thinking on and no guardrails set, the chat interface streams the agent's plan as it generates it, instead of showing a static "Thinking..." message. You see the agent's reasoning unfold in real time in the Test Agent window. If you set guardrails, there is no plan streaming and you'll see the standard "Thinking..." indicator instead. Agentstudio deactivates plan streaming since the agent must validate the full response before returning it.

Agent trace field reference

Thinking step fields

Thinking steps show the agent's reasoning.

FieldDescription
rationaleDescribes agent reasoning during the step
latencyMsTotal time taken by the LLM to generate and complete its response (in milliseconds)
inputTokensNumber of tokens sent to the LLM as input for a reasoning step
outputTokensNumber of tokens generated by the LLM in a reasoning step
ttftTime elapsed from the LLM request submission until the first set of tokens are received (in milliseconds)

Action step fields

Action steps show tool usage and response data.

FieldDescription
toolNameName of the tool you created in Agent Designer that was invoked
toolIdUnique identifier for the tool
toolTypeCategory of tool used. Valid values: MCP, API, Application, Integration, Data HubQuery, Prompt
requiresApprovalBoolean indicating whether user approval is required before tool execution
inputParameters passed to the tool (e.g., latitude, longitude)
responseRaw response data returned by the tool after execution
latencyMsTime taken by the tool to run the tool call (in milliseconds)
successBoolean indicating whether the tool execution completed successfully

Retrieval step fields

A retrieval step shows when the agent fetches content from an attached asset, such as a Meta Hub business glossary or a Knowledge Hub knowledge base. The step triggers during agent execution. The agent uses the asset's name and purpose to determine when retrieval is relevant.

FieldDescription
assetTypeType of asset retrieved. Valid values: GLOSSARY, KNOWLEDGE_BASE
assetNameName of the retrieved glossary or knowledge base
assetIdUnique identifier of the retrieved asset
inputParameters sent for the retrieval request. For a knowledge base, this includes the fields listed in Knowledge base input fields
responseContent retrieved from the asset. For a knowledge base, this includes the fields listed in Knowledge base response fields
latencyMsTime taken to complete the retrieval (in milliseconds)
successBoolean indicating whether the retrieval completed successfully

Knowledge base input fields

When assetType is KNOWLEDGE_BASE, the input object includes the following fields:

FieldDescription
queryThe query text sent to the knowledge base
retrievalModeThe retrieval mode used for the query. Valid values: lexical, semantic, hybrid
topKThe result limit applied to the query. The number of chunks requested from the knowledge base
filtersMetadata filters applied to the query, if any
repositoryIdUnique identifier of the repository the knowledge base belongs to

Knowledge base response fields

When assetType is KNOWLEDGE_BASE, the response object includes the following fields:

FieldDescription
contentThe chunks of content returned by the knowledge base
chunksReturnedNumber of chunks returned by the knowledge base
chunksUsedNumber of returned chunks the agent used to generate its response
topScoreRelevance score of the highest-ranked chunk returned
khActivityIdUnique identifier for the retrieval activity, logged in Knowledge Hub
khLatencyMsTime taken by Knowledge Hub to execute the retrieval (in milliseconds)
errorTypeType of error returned if the retrieval failed (for example, unavailable)
errorCodeHTTP error code returned if the retrieval failed (for example, 503)
errorLogsDetailed error messages logged for a failed retrieval

Invocation metrics fields

FieldDescription
countNumber of times the LLM has been called
inputTokenCountNumber of tokens in the input
outputTokenCountNumber of tokens in the output
averageLatencyAverage time in milliseconds to process the LLM request
ttftTime elapsed from the LLM request submission until the first set of tokens are received (in milliseconds)
durationMsTotal time to complete the agent invocation, from start to finish (in milliseconds)

Guardrail fields

Topic policy

FieldDescription
topicPolicyDescribes how the LLM applied topic-based filtering
nameThe name of the policy from the Guardrails tab
typeType of restriction (e.g., DENY)
ActionAction taken (e.g., BLOCKED)

Word policy

FieldDescription
wordPolicyDescribes word-based filtering that causes a user's words to block the agent from responding
customWordsDisplays the number and list of blocked words configured by the user in the guardrail. Match is the blocked word and Action describes the action the agent took ("BLOCKED")
managedWordListsDisplays the number and list of blocked words which are applied by default for all agents. Match is the blocked word, Action is the action agent took ("BLOCKED"), and the Type is the category of the word (e.g., PROFANITY, INSULTS)

Sensitive information policy

FieldDescription
sensitiveInformationPolicyDisplays the number and list of RegEx matches that are configured by the user to prevent the agent from processing and producing sensitive information that matches a RegEx pattern
NameThe name of the Policy in the Guardrails tab
MatchThe word or phrase that matched
regexThe pattern it matched to
ActionThe action that Agent took ("BLOCKED")

Content policy

FieldDescription
contentPolicyDefault content filters applicable to all agents for the following categories: HATE, SEXUAL, VIOLENCE, INSULTS, MISCONDUCT, PROMPT_ATTACK. These filters prevent agents from behaving inappropriately and in an unsafe manner
TypeThe category of filter that was triggered
ConfidenceA numerical score between 1-100 useful in determining how provoking a given prompt was
Filter StrengthThe strength at which filter is configured (the only value is "HIGH")
ActionThe action that the agent took ("BLOCKED")

Troubleshooting tips

Troubleshooting agent performance

  • Be aware of context window limitations: The user prompt, agent goal, tasks, and instructions combined cannot exceed 200K input tokens.

  • Adjust model settings to address latency issues: If your agent performs only simple tasks, such as sentiment analysis, summarization, and data formatting, select Fast in the Model Configuration section to improve the AI processing speed in the agent's Profile configuration.

  • Consider instruction clarity: Evaluate instructions and ensure that they do not cause conflicting actions that may conflict with LLM reason and logic or cause unnecessary action resulting in high latency.

Instructions

  • Be specific and detailed: You may need to adjust your instructions or add additional tasks so that the Large Language Model (LLM) understands how to behave in certain situations. It may not have enough information or context to act appropriately. This can cause incorrect reasoning to show in the trace.

  • Include timelines and action triggers: Tell the agent when to do an action. This can correct issues where the agent is not following instructions in the way you want it to. For example, "After you get information from the database about X, confirm with the user that they want to do X." "Before you do X, ask the user for the X parameter to make the API call using the X tool."

Read Guidelines for building effective AI agents for instruction best practices.

Tools

  • Make changes to tool configuration: Your tool configuration may need adjustment to work correctly. The trace can indicate if the agent is having trouble using a specific tool during a tool step. Review Building an agent for more information.

  • Ensure your tool is linked to the correct task: Your tool needs to be attached to the same task where it is relevant. You can attach a tool to multiple tasks. You may need to add additional instructions in the task that tell the agent when to use the tool for that particular outcome. For example, "Use the X tool to query the database and get information about X."

API tools

  • Remove any extra spaces surrounding parameters: Extra spaces can cause an error when the agent calls the API.

  • Test API authentication: Test the API endpoint using Postman or a similar tool. Ensure the API call is successful and that you have entered the correct credentials.

  • Check for duplication: Do not duplicate the URL in the API tool for the endpoint path. The API tool adds the base URL and the endpoint path to create the API call. For example, entering the base URL and then the base URL + endpoint path would duplicate the base URL and cause the tool to call the baseURLbaseURL+endpoint path, causing an error.

example of duplication

Guardrails

  • Adjust guardrails: Evaluate and adjust guardrails so they do not limit the agent from accomplishing the task. Guardrails cause the agent to respond with the blocked message you configured (for example, "I'm sorry but I'm only able to provide an order status and customer support contact information."). The trace can indicate when and how the LLM triggered the guardrail while following instructions.
On this Page