CortexDB Docs
Connectors

GitHub Connector

Ingest GitHub issues, pull requests, and comments into CortexDB.

Tails GitHub issues, pull requests, and their comments and writes them to CortexDB as experiences.

Two ways to run this connector

Self-hostedpip install 'cortexdb-connectors[github]' then cortexdb-sync sync github. Managed — CortexDB runs the connector as a worker. See the Connectors overview.

1. Prepare credentials

Self-host and dashboard use different auth

The managed dashboard flow can authenticate as a GitHub App (App ID / Installation ID / private key PEM). The self-hosted connector uses a personal access tokenGITHUB_TOKEN is the only required env (cortexdb-sync list confirms it), so the App credentials don't apply self-hosted.

Create a fine-grained or classic PAT with repo read access (issues, pull requests, contents) and copy it.

What gets written

Each issue, pull request, and comment becomes a POST /v1/experience on the resolved scope (default scope template org:<org>/source:github/repo:{repo}), with the author resolved to a login and the body as content.

Corrected fields

  • The idempotency_key is the raw GitHub object/event id (str(event.id)), not a gh:<type>:<owner>/<repo>/<id> composite.
  • Thread linkage (a PR's prior version, a comment's parent) is carried by a thread=… label, not context.preceded_by — the connector never sets preceded_by.

Run it yourself

pip install 'cortexdb-connectors[github]'
pip install cortexdb-cli && cortexdb init

export GITHUB_TOKEN=ghp_...               # required (PAT)

cortexdb-sync --api-url http://localhost:3141 sync github
cortexdb-sync --api-url http://localhost:3141 watch github --interval 120

Cursor state persists in ~/.cortexdb/sync_state.json.

See also

On this page