LangChain Integration
Build agents with Glean and LangChain
Glean LangChain Integration
Glean’s official LangChain integration enables you to build powerful AI agents that can search and reason over your organization’s knowledge using Python and the LangChain framework.
langchain-glean
Official LangChain integration for Glean’s search and chat capabilities
Installation
Configuration
Configure your Glean credentials by setting the following environment variables. You can obtain these credentials from the authentication documentation:
Usage Examples
Using the Retriever
The GleanSearchRetriever
allows you to search and retrieve documents from Glean:
Building an Agent with Tools
The GleanSearchTool
can be used in LangChain agents to search Glean:
RAG with LangChain Chains
You can integrate the retriever with LangChain chains for more complex workflows:
Advanced Usage
Search Parameters
You can customize your search by passing additional parameters:
Custom Retriever Configuration
Configure the retriever with custom settings:
For the complete API documentation and implementation details, visit the GitHub repository.
Was this page helpful?