Mine coding-agent invocations from the git history of GitHub Actions workflows
cai-miner (Coding-Agent Invocations miner) mines the git history of GitHub Actions workflow files and finds the coding-agent invocations inside them: the steps that run Claude Code, Codex, Copilot, Gemini, Cursor, Aider and similar agents as part of a repository's continuous integration.
For every workflow file that invokes an agent at some point, it emits the file's whole history (before the agent arrived, while it was there, and after it was removed), one row per agent invocation, and repository-level denominators. It is the tool behind the GHAgentCI dataset.
Agent context files such as CLAUDE.md or AGENTS.md can be classified by path, since the filename names the agent. An agentic CI workflow cannot: it is an ordinary .github/workflows/whatever.yml, indistinguishable by name from a build or lint workflow. cai-miner therefore parses every revision of every workflow file, walks its jobs and steps, and matches each step against a catalogue of agents.
Not every mention of an agent is an invocation; a workflow that sets ANTHROPIC_API_KEY may just be feeding a test suite. Evidence is therefore tiered:
A revision counts as agentic only with strong evidence, unless you pass --include-weak.
cai-miner needs Python 3.11 or newer and git 2.30 or newer on the PATH. Its only Python dependency is PyYAML.
uv tool install cai-miner # recommended: an isolated, global command pipx install cai-miner # equivalent with pipx pip install cai-miner # into the current environment Or run it once without installing: uvx cai-miner --help.
cai-miner works on local clones. A size-capped partial clone without a working tree is the fastest way to get one (see cloning):
git clone --filter=blob:limit=64k --no-checkout --single-branch \ https://github.com/vitejs/vite.git clones/vite # Agent invocations across the whole history, as CSV on stdout cai-miner clones/vite # Full outputs for many clones, plus every distinct workflow revision cai-miner --from-file clones.txt -o out/ --content-dir out/content With -o out/ you get:
Every column is documented in the output reference.
cai-miner [options] [REPOSITORY ...] option effect -c, --config FILE detector catalogue (TOML); defaults to the bundled frozen catalogue --from-file FILE read clone paths from a file, one per line -o, --out-dir DIR write the four CSV files to DIR --content-dir DIR store each distinct workflow revision as DIR/ .yml --rev REV commit to start the history walk from (default HEAD) --since DATE ignore commits older than DATE, e.g. 2024-01-01 --include-weak let job, url and env evidence make a revision agentic --keep-all emit every workflow revision, not only agentic histories --no-prefetch disable the bulk blob prefetch on partial clones --repository OWNER/NAME name of the single repository given, instead of reading it from the clone's remote --fail-fast stop at the first repository that fails -q, --quiet suppress progress output --version print the version and exit python -m cai_miner is equivalent to cai-miner.
Agents and their patterns live in a TOML catalogue; adding an agent needs no code changes:
[agents.myagent] display_name = "My Agent" uses = ["myorg/my-agent-action"] run = ["myagent --run"] env = ["MYAGENT_API_KEY"] The bundled default is the catalogue GHAgentCI was mined with: a hand-written catalogue drawn from vendor documentation, merged with one generated from the GitHub Marketplace ai-assisted category. See the catalogue reference for the format, includes, aliases and overrides.
Files generated by GitHub Agentic Workflows are detected from the compiler's own header, with no catalogue involved, and their manifests are parsed in full; see gh-aw.
from cai_miner.config import load_config from cai_miner.detect import analyse from cai_miner.extract import extract_repository catalogue = load_config() # the bundled catalogue; or load_config("my.toml") # Classify one workflow revision facts = analyse(catalogue, open("ci.yml").read(), ".github/workflows/ci.yml") print(facts.strong_agents) # Mine one local clone result = extract_repository("clones/vite", catalogue) print(result.summary.n_agentic_files, len(result.steps)) The command line is the stable interface; the Python modules may change between minor versions before 1.0.
The GHAgentCI dataset and its replication package are archived on Zenodo at doi:10.5281/zenodo.24088832. This repository also holds the scripts and validation material behind it; they are not part of the installed package:
If you use cai-miner or GHAgentCI in research, please cite it; GitHub's "Cite this repository" button reads CITATION.cff.
Bug reports and pull requests are welcome. See CONTRIBUTING.md for the development setup.
Author: Daniel Ogenrwot, Jorge Gonzalo Delgado Cervantes, Woojoong Kim, John Businge
Both files in this release have provenance metadata.
mining software repositories github actions continuous integration coding agents llm dataset
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




