Glean Developer Platform
Chat API
Chat grounded in company knowledge
Ask across every connected app and get permission-aware answers, with citations, in a single API call.
chat.pyChat API
from glean.api_client import Glean with Glean( api_token=os.environ["GLEAN_API_TOKEN"], server_url=os.environ["GLEAN_SERVER_URL"], ) as client: response = client.client.chat.create( messages=[{"fragments": [{"text": "Summarize the Q3 roadmap"}]}] ) answer = "".join( f.text or "" for m in response.messages or [] for f in m.fragments or [] )
search.pySearch API
from glean.api_client import Glean with Glean( api_token=os.environ["GLEAN_API_TOKEN"], server_url=os.environ["GLEAN_SERVER_URL"], ) as glean: results = glean.client.search.query( query="quarterly reports", page_size=10, ) titles = [r.title for r in results.results]
agent.pyAgents
from glean.agent_toolkit.tools import ( search, employee_search, ) # Use with LangChain search_tool = search.as_langchain_tool() people_tool = employee_search.as_langchain_tool() # Use with CrewAI crew_tool = search.as_crewai_tool()
embed.tsWeb SDK
import { renderSearchBox, renderSearchResults, renderChat, } from "@gleanwork/web-sdk"; renderSearchBox(searchEl, { backend: "https://acme-be.glean.com", onSearch: (query) => renderSearchResults(resultsEl, { query }), }); renderChat(chatEl, { backend: "https://acme-be.glean.com", });
connector.pyIndexing SDK
from glean.indexing.connectors import ( BaseDatasourceConnector, ) class CatalogConnector(BaseDatasourceConnector): def get_data(self): return load_catalog_pages() connector = CatalogConnector(name="catalog") connector.index_data(mode=IndexingMode.FULL)
Choose your path
Four ways to get started.
Build with Platform APIStart with modern search, agents, skills, and chat from your code.Embed with the Web SDKPermission-aware search and chat inside the apps your team already uses.Connect your dataBring any source into Glean with the Indexing API.Bring Glean to your IDEClaude Code, Cursor, Codex, and any MCP host.
Quickstart
One call to your knowledge graph
- 1Prefer OAuth for per-user Client and Platform work in Authentication. Use a Glean-issued token for Indexing, global ActAs, or when no OAuth path exists.
- 2Install a client library for your language.
- 3Run your first query — results come back ranked and permission-aware.
main.py
from glean.api_client import Glean with Glean( api_token=os.environ["GLEAN_API_TOKEN"], server_url=os.environ["GLEAN_SERVER_URL"], ) as glean: results = glean.client.search.query( query="quarterly planning", page_size=10, ) for r in results.results: print(r.title, r.url)
API client libraries
Bring Glean into your IDE
Claude CodeInstall the Glean plugins and search company knowledge from your terminal.CursorConnect the Glean MCP server to Cursor for context-aware coding.CodexInstall the Glean plugin for Codex — enterprise knowledge in your terminal.
Plus GitHub Copilot, Goose, Windsurf, and any MCP host.
Agents
Framework-agnostic by design
The agent toolkit exposes Glean retrieval as tools for whatever you build with — the knowledge graph comes along regardless of framework.
LangChainOpenAI Agents SDKGoogle ADKMCP
Explore the agent toolkittools.pyAgent toolkit
from glean.agent_toolkit.tools import ( search, employee_search, ) # LangChain lc_tool = search.as_langchain_tool() # CrewAI crew_tool = search.as_crewai_tool()