Troubleshoot agents
This page covers common issues you may encounter when building or running agents, along with steps to resolve them.
Agent errors
Generic "Something went wrong" or request ID errors
If your agent displays a generic error with a request ID, try the following:
- Open a new chat session and run the agent again. Some errors are temporary.
- If the error persists, check whether your agent's LLM model is correctly configured in the Admin Console under Platform → LLM.
- Downvote the response and include a brief description of the issue. This helps your admin and Glean Support in their investigation.
Agent times out or doesn't complete
Agents with many steps or large amounts of context may time out. To reduce the chance of timeouts:
- Reduce the number of steps. Combine related logic into fewer steps where possible.
- Use a Plan and Execute step. Replace chains of Company Search, Think, and Respond steps.
- Limit context per step. Set memory to "No memory" on steps that perform unrelated tasks, and manually tag only the steps whose output is needed.
- Constrain output length. In Respond step instructions, specify a maximum length for the response.
- Try a faster model. If latency is contributing to timeouts, experiment with a faster model while monitoring output quality.
Inconsistent agent outputs
If your agent produces different results across runs:
- Review the agent's steps in debug mode to identify which step produces inconsistent output.
- Make sure that Company Search steps are scoped narrowly with specific filters rather than broad queries.
- Avoid using "As many as possible" for the number of search results, as this can overload context and lead to truncation.
- Verify that all referenced documents are indexed and accessible to the user running the agent.
Company Search limitations
- Company Search returns a maximum of 500 results per step. If your use case requires processing more documents, break the work into multiple scoped searches.
- Using "As many as possible" combined with "Entire document content" can cause context overload. Use specific queries and limit the number of results to improve reliability.
SharePoint content in agents
Glean indexes individual documents stored in SharePoint document libraries but doesn't index SharePoint view pages (URLs ending in AllItems.aspx or DocSetHome.aspx). These pages are UI containers, not content items.
If your agent uses a Read document step pointed at a SharePoint view URL, it returns an "unable to read" error. To work around this:
- Replace the Read document step with a Company Search step.
- Scope the Company Search to the specific SharePoint library or folder.
- The agent retrieves and operates on the individual documents within that library.
For more details on what SharePoint content Glean indexes, see SharePoint known limitations.
Citations not appearing
Citations appear when the response relies on enterprise sources. If you notice citations are missing:
- Rephrase your question to reference company-specific knowledge. For example, add context like "According to our FY25 strategy doc..."
- If citations stopped appearing after enabling the new agentic engine, ask your admin to verify that the agentic reasoning model is set to a supported model in Admin Console > Platform > LLM.
- For API integrations, make sure requests use
agentConfig.agent = "ADVANCED"rather than"DEFAULT". TheDEFAULTconfig uses the legacy assistant, which may not return citations consistently.
For more information about how citations work, see Citations.