How I built a GitHub Actions connector for Cognee — and what it can do for your AI agents
What is Cognee — one paragraph, AI memory layer The problem — your CI history lives in GitHub but your AI agent can't query it What the connector does — workflow definitions, run history, job failures all become searchab
What is Cognee — one paragraph, AI memory layer
The problem — your CI history lives in GitHub but your AI agent can't query it
What the connector does — workflow definitions, run history, job failures all become searchable memory
Real example — show the 5 lines of code to use it:
from cognee_community_connector_github_actions import github_actions_source
source = github_actions_source(repositories=["owner/repo"], token="...")
await cognee.remember(source, dataset_name="github_actions")
answer = await cognee.search("Which workflows failed on main this week?")
feat(connector): Add GitHub Actions data-source connector
#400
Closes #5742
Summary
Adds a GitHub Actions data-source connector for cognee-community, following the Notion connector conventions.
What's ingested
-
Workflow definitions — triggers, job names, step names,
uses:action references. Raw shell scripts and env/secrets are excluded. - Run attempts — branch, commit, event, actor, attempt number, status, conclusion, duration. Re-runs (attempt 2+) are separate documents.
- Jobs — step conclusions, check-run annotations (optional), ANSI-stripped log tail of the first failing step (optional).
Sync strategy
- Workflow files: blob SHA caching — unchanged files are never re-downloaded
- Runs: incremental merge over a configurable lookback window
- 1,000-result cap: automatic time-window subdivision
- Forget-on-delete: tombstones for removed workflows, deleted/expired runs, orphaned jobs
Package structure
packages/connector/github-actions/ ├── README.md ├── cognee_community_connector_github_actions/ │ ├── init.py │ └── github_actions.py ├── examples/ │ └── example.py ├── tests/ │ └── test_github_actions.py └── pyproject.toml
Tests
All tests use a fully mocked FakeGitHubClient — no live token required.
Checklist
- [x] Follows Notion connector package shape
- [x]
DOCUMENT_SOURCE_ATTRmarker set for document-mode routing - [x] Incremental sync with dlt state
- [x] Forget-on-delete via
_deletedhard-delete tombstones - [x] README with setup, token permissions, usage example
- [x] Runnable example under
examples/ - [x] Tests covering all acceptance criteria
I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.