Skip to main content

πŸ€” 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

β†’ GitHub PR Agent β†’


🟑 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)

β†’ Commit CLI Agent β†’


🟣 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

β†’ Repo CLI Agent β†’


πŸ“Š Agent Comparison Table​

AgentTriggerTarget ScopeSCM SupportBest For
GitHub PR AgentPR opened/updatedChanged filesGitHub onlyGitHub-native PR automation
CLI PR AgentPR-based jobsChanged filesGitHub, BitbucketPR workflows in non-GitHub CI
CLI Commit AgentCommit pushChanged filesGitHub, BitbucketCommit-driven CI (Jenkins, GitHub)
CLI Repo AgentManual / CronWhole foldersAll (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 testing
  • generate-commit β†’ broader but still scoped to what changed
  • generate-folder β†’ strategic coverage upgrade for legacy areas

πŸ“Ž Next Steps​