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-hosted — pip 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 token — GITHUB_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_keyis the raw GitHub object/event id (str(event.id)), not agh:<type>:<owner>/<repo>/<id>composite. - Thread linkage (a PR's prior version, a comment's parent) is carried by a
thread=…label, notcontext.preceded_by— the connector never setspreceded_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 120Cursor state persists in ~/.cortexdb/sync_state.json.