π€ When to Use Which Agent
Early AI offers multiple agents β each optimized for different code lifecycle events.
This guide helps you quickly determine which one fits your use case based on:
- π§ͺ What triggers the generation?
- π How frequently do you want tests to be generated?
- βοΈ Which CI/CD platform are you using?
- π§± Do you want PR-based coverage or repo-wide?
π Quick Decision Guideβ
π’ Use the GitHub PR Agent if:β
- You're using GitHub Actions
- You want test generation to run automatically on every PR
- You prefer a zero-config GitHub-native experience
π‘ Use the CLI PR Agent if:β
- You work with pull requests, but not in GitHub Actions
- You're using Jenkins, CircleCI, or another CI system
- You want to run test generation on PR creation or update
β CLI PR Agent β
π΅ Use the CLI Commit Agent if:β
- You want to trigger generation on each commit
- Youβre using push-based pipelines (e.g.
on: push) - You're not working with PRs (e.g., internal repos, trunk-based development)
π£ Use the CLI Repository Agent if:β
- You want to raise coverage across a folder or legacy area
- You want to run it weekly or on-demand
- You want a one-shot coverage boost
π Agent Comparison Tableβ
| Agent | Trigger | Target Scope | SCM Support | Best For |
|---|---|---|---|---|
| GitHub PR Agent | PR opened/updated | Changed files | GitHub only | GitHub-native PR automation |
| CLI PR Agent | PR-based jobs | Changed files | GitHub, Bitbucket | PR workflows in non-GitHub CI |
| CLI Commit Agent | Commit push | Changed files | GitHub, Bitbucket | Commit-driven CI (Jenkins, GitHub) |
| CLI Repo Agent | Manual / Cron | Whole folders | All (GitHub, Bitbucket, GitLab planned) | Coverage boost across entire areas |
π§ Common Questionsβ
What if I use Bitbucket?β
Use CLI PR, CLI Commit, or Repo CLI β all support Bitbucket via --scm-provider bitbucket.
Can I use multiple agents in the same repo?β
Yes!
For example:
- Use PR-based agents for daily dev
- Use the Repo agent weekly to backfill missing coverage
How do I choose between generate-pr, generate-commit, and generate-folder?β
Depends on your workflow:
generate-prβ fine-grained, change-specific testinggenerate-commitβ broader but still scoped to what changedgenerate-folderβ strategic coverage upgrade for legacy areas