Most of what your company knows lives somewhere Glean doesn't crawl out of the box — an internal wiki, a service catalog, a bespoke database. The Indexing API brings any of it in, with real per-document permissions from day one, so search results respect who's allowed to see what.
Scaffold the project
connector.py resolves the corpus via a relative path two levels up (Path(__file__).parent.parent.parent / "acme-corpus") — scaffold both directories preserving that same nesting, not flattened into one directory.
mkdir -p index-custom-source/recipes/index-custom-source index-custom-source/acme-corpus
npx tiged --mode=git gleanwork/glean-cookbook/recipes/index-custom-source index-custom-source/recipes/index-custom-source
npx tiged --mode=git gleanwork/glean-cookbook/acme-corpus index-custom-source/acme-corpusInstall dependencies
cd index-custom-source/recipes/index-custom-source && pip install -r requirements.txtSet credentials
Export GLEAN_INDEXING_API_TOKEN and GLEAN_SERVER_URL — this recipe has no .env.example, it reads directly from the environment (see indexing-token in cookbook-conventions).
Run it
Registers the custom datasource and bulk-indexes documents/people with real per-document permissions — never allow-all.
python seed.pyVerify
Search "Who owns the payments-service catalog entry?" as yourself and as a restricted test user — the restricted user must not see Acme-HR-only documents.
get_data(since=...) and calling index_data(mode=IndexingMode.INCREMENTAL).BasePeopleConnector.Copies a prompt your AI assistant can build from.