GitLab Connector
Ingest GitLab issues, merge requests, and notes into CortexDB.
Tails GitLab issues, merge requests, and their notes (comments) and writes them to CortexDB as experiences.
Two ways to run this connector
Self-hosted — pip install 'cortexdb-connectors[gitlab]' then cortexdb-sync sync gitlab.
Managed — CortexDB runs the connector as a worker. See the Connectors overview.
1. Prepare credentials
GitLab → Preferences → Access Tokens → create a personal (or project) access token with the read_api
scope, and copy it.
What gets written
Each issue, merge request, and note becomes a POST /v1/experience on the resolved scope (default
org:<org>/source:gitlab/project:{project}), author resolved to a username, body as content.
Corrected fields
- The
idempotency_keyismr:{project_id}:{id},issue:{project_id}:{id}, ornote:{project_id}:{id}— there is nogl:prefix, and segments are separated by:(not thegl:<type>:<project_id>/<id>the older docs showed). - Merge-request note linkage is a
thread=…label, notcontext.preceded_by.
Run it yourself
pip install 'cortexdb-connectors[gitlab]'
pip install cortexdb-cli && cortexdb init
export GITLAB_TOKEN=glpat-... # required
cortexdb-sync --api-url http://localhost:3141 sync gitlab
cortexdb-sync --api-url http://localhost:3141 watch gitlab --interval 120For a self-managed GitLab instance, set the connector's base URL via its config (default is
gitlab.com). Cursor state persists in ~/.cortexdb/sync_state.json.