Skip to main content
Get Started

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.

Search API

Search your entire knowledge graph

Enterprise search over 100+ connected sources — ranked, permission-aware, and fast, from one query.

Agents

Build agents on your company's knowledge

Plan, retrieve, and act across your tools — agents reason over the knowledge graph, not just a prompt window.

Web SDK

Embed Glean in your apps

Drop permission-aware search and chat into the tools your team already uses — one npm package, two components.

Indexing SDK

Bring any data into Glean

Build a connector on the open-source indexing SDK — push documents from any source and make them searchable everywhere.

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.

Quickstart

One call to your knowledge graph

  1. 1Create an API token in Authentication — OAuth or a Glean-issued token.
  2. 2Install a client library for your language.
  3. 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

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 toolkit
tools.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()