Building Agents with Glean
Glean provides multiple ways to build AI agents that can search and reason over your organization's knowledge. This guide helps you choose the right approach and get started with building agent-powered applications.
Choose Your Approach
Direct API Integration
Use Glean's REST APIs directly for maximum control and customization
LangChain Integration
Python LangChain integration for Glean's search and chat capabilities
MCP Integration
Connect AI models and IDEs to Glean via standardized protocol
Glean Agent Toolkit
Pre-built Glean tools that work across multiple agent frameworks
Comparison & Decision Guide
Approach | Complexity | Flexibility | Time to Deploy | Best For |
---|---|---|---|---|
Direct API | High | Maximum | Medium | Custom integrations, multi-language |
LangChain | Medium | High | Fast | Python ecosystem, rich tooling |
MCP | Low | Medium | Fast | IDE integration, standardized tools |
Glean Agent Toolkit | Medium | High | Medium | Cross-platform compatibility, multi-framework tools |
Questions to Consider
-
What's your technical background?
- Non-technical → Agent Builder
- Python developer → LangChain
- Multi-language → Direct API
-
Where will the agent run?
- IDE/Editor → MCP
- Web application → Direct API
- Multiple frameworks → Glean Agent Toolkit
-
How much customization do you need?
- Simple Q&A → Agent Builder
- Complex workflows → Direct API
- Multi-framework tools → Glean Agent Toolkit
Authentication & Setup
All approaches require Glean API credentials:
- Get API Token: Request a user-scoped API token
- Required Scopes:
chat
,search
,agents
(depending on usage) - Environment Setup: Configure your Glean instance and token
Need a No-Code Solution?
For creating agents without writing code, use Glean's built-in Agent Builder:
Glean Agent Builder
Create agents with drag-and-drop interface, pre-built templates, and custom instructions. Perfect for business users and rapid prototyping.
The Agent Builder provides a visual interface for creating agents directly in Glean. Agents created this way can still be accessed programmatically via the Agents API for integration with your applications.
Next Steps
- New to Glean? Start with Agent Builder (no-code solution)
- Python Developer? Try LangChain Integration
- IDE User? Set up MCP Integration
- Multi-Framework? Explore Glean Agent Toolkit
- Custom Needs? Use Direct API Integration
- Need Help? Check the API Reference for technical details