Glean Indexing SDK

Build custom Glean connectors in Python. The SDK handles fetching, transforming, batching, and uploading your data to Glean's indexing APIs, so you write only the parts that are specific to your source.
📖 Full documentation on the Glean Developer site.
Repository examples cover advanced usage and
streaming connectors.
Build one with an agent
The fastest path is to let a coding agent build the connector. Your agent installs it straight from this repository, which doubles as the plugin marketplace.
Claude Code
claude plugin marketplace add gleanwork/glean-indexing-sdk
claude plugin install glean-connector-builder@glean-indexing-sdk
Codex
codex plugin marketplace add gleanwork/glean-indexing-sdk
codex plugin add glean-connector-builder@glean-indexing-sdk
Cursor has no plugin CLI — open Dashboard → Plugins → Add Marketplace → Import from Repo, point it at gleanwork/glean-indexing-sdk, then install from Customize.
Then describe your source:
I want to push my Webex data to Glean. Build a connector for me.
The agent explores the source's API, confirms a plan with you, generates the connector against this SDK, and tests it. See the Indexing SDK overview for what it does and what to review in the output.
Or write it yourself
Requirements
Installation
pip install glean-indexing-sdk
# Optional cloud integrations
pip install "glean-indexing-sdk[aws]" # Beta CloudWatch logs + metrics
pip install "glean-indexing-sdk[gcp]" # Beta Cloud Logging/Monitoring + deployment Secret Manager
Quickstart
Every connector has two parts: a data client that fetches from your source, and a connector that transforms the result into Glean documents. The flow is fetch → transform → upload; you implement get_source_data() and transform(), and the SDK does the rest.
Set your credentials:
export GLEAN_SERVER_URL="https://your-company-be.glean.com"
export GLEAN_INDEXING_API_TOKEN="your-indexing-api-token"
export WIKI_API_TOKEN="your-wiki-token"
Then define and run a connector:
import os
from datetime import datetime
from typing import Any, List, Optional, Sequence, TypedDict