Always-on AI agent that picks up GitHub issues, implements them, and creates PRs for human review.
Project description
PhoenixGitHub
PhoenixGitHub is an always-on AI agent that picks up labeled GitHub issues, implements code changes in a branch, runs validation, and opens a pull request for human review.
What You Get
- Hands-free issue pickup using labels (
ai:ready,ai:revise). - Structured pipeline: plan, implement, test, PR.
- Automatic state transitions on issues (
ai:in-progress,ai:review,ai:failed,ai:done). - Retry and revise flow for failed runs.
- Interactive first-time setup with
phoenixgithub init.
Requirements
- Python
3.11+ - A GitHub Personal Access Token (PAT)
- Access to an LLM provider/API key (Anthropic/OpenAI-compatible via config)
Quick Start (Pip Users)
1) Install
pip install phoenixgithub
2) Configure interactively
phoenixgithub init
This creates a .env in your current directory and prompts for required credentials, hiding secret inputs.
3) Confirm configuration
phoenixgithub status
4) Start the watcher
phoenixgithub watch
How The Workflow Runs
When an issue has ai:ready (or ai:revise), PhoenixGitHub:
- Moves the issue to
ai:in-progress. - Prepares a working branch (
phoenix/issue-<number>). - Plans changes with the planner agent.
- Applies code updates with the coder agent.
- Runs validation/tests with the tester agent.
- Commits and pushes changes.
- Creates or reuses a PR.
- Moves the issue to
ai:reviewon success, orai:failedon failure.
Label State Machine
ai:ready / ai:revise -> ai:in-progress -> ai:review -> ai:done
-> ai:failed -> ai:revise (optional auto-revise)
Only one AI state label is kept on the issue at a time.
CLI Commands
phoenixgithub init- interactive setup wizard that writes.env.phoenixgithub watch- daemon mode; continuously polls and dispatches issues.phoenixgithub run-issue <number>- one-shot run for a single issue.phoenixgithub status- show watcher state and recent runs.phoenixgithub reset-issue <number>- clear local dispatch lock for an issue.
Configuration Reference
Most users should run phoenixgithub init. If you prefer manual setup, copy .env.example and fill the values.
Core variables:
GITHUB_TOKEN- GitHub PAT used for issue/PR/label operations.GITHUB_REPO- target repository inowner/repoformat.LLM_PROVIDER- model provider, for exampleanthropic.LLM_MODEL- model identifier accepted by your endpoint.LLM_API_KEY- API key for the selected provider/gateway.POLL_INTERVAL- watcher polling interval in seconds.MAX_CONCURRENT_RUNS- max watcher dispatches (execution is serialized per local clone).
Agent behavior variables:
TEST_COMMAND- command run by tester (defaults to pytest command).AUTO_REVISE_ON_TEST_FAILURE- enables automatic relabel toai:revise.AUTO_REVISE_MAX_CYCLES- cap for auto-revise loops.NO_PROGRESS_ROOT_CAUSE_REPEAT_LIMIT- stops repeated root-cause loops sooner.REVISE_INCREMENTAL- incremental branch/worktree handling for revise runs.ALLOW_NO_TESTS- treats pytest exit 5 as pass when enabled.VALIDATION_PROFILE-auto,python,frontend, orgeneric.
Tracing variables:
LANGCHAIN_TRACING_V2LANGCHAIN_API_KEYLANGCHAIN_PROJECT(commonlyphoenix-${GITHUB_REPO})
GitHub Token Permissions
Use a token that can read/write issues, pull requests, and repository contents. If you use fine-grained PATs, ensure:
- Repository contents: read/write
- Issues: read/write
- Pull requests: read/write
- Workflows: read/write (if installing workflow helpers)
- Metadata: read-only
Common Usage Pattern
- Create or choose an issue in your repo.
- Add label
ai:ready. - Run
phoenixgithub watch. - Review the created PR once issue becomes
ai:review. - Merge PR and move issue to done (or use your merge workflow automation).
Troubleshooting
- Missing config: run
phoenixgithub initagain or check.env. - Issue not picked up: verify issue has
ai:readyorai:revise. - Unauthorized API calls: re-check token/API key and scopes.
- Stuck dispatch state: run
phoenixgithub reset-issue <number>. - Local workspace confusion after many runs: clean
WORKSPACE_DIRand restart watcher.
Safety and Guardrails
- AI state labels are mutually exclusive.
- Path traversal protection blocks writes outside the repo root.
- New folder guardrail requires a meaningful
README.md. - Failure analyst posts guidance when runs fail and can trigger controlled revise cycles.
Project Structure (for contributors)
src/phoenixgithub/
cli.py # CLI commands
config.py # environment configuration model
github_client.py # GitHub + git operations
orchestrator.py # plan/implement/test/pr pipeline
watcher.py # polling + dispatch
state.py # local run/watcher state
agents/ # planner/coder/tester/pr/failure analyst
Maintainer Docs
Release and package publishing instructions live in RELEASING.md.
Internal operations and architecture runbook lives in INTERNAL_README.md.
Documentation index lives in docs/README.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phoenixgithub-0.1.1.tar.gz.
File metadata
- Download URL: phoenixgithub-0.1.1.tar.gz
- Upload date:
- Size: 33.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14390580f04ad94179046d408f9a59a360d13bbdc7fbd3009a67454f7cc2c67
|
|
| MD5 |
acd235acb471a433f20896466c48e318
|
|
| BLAKE2b-256 |
517a1d42c62e88257720db8b9ca92d9aa2a239a9617726e6881729691db96873
|
Provenance
The following attestation bundles were made for phoenixgithub-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on kkipngenokoech/phoenixgithub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phoenixgithub-0.1.1.tar.gz -
Subject digest:
f14390580f04ad94179046d408f9a59a360d13bbdc7fbd3009a67454f7cc2c67 - Sigstore transparency entry: 1006432545
- Sigstore integration time:
-
Permalink:
kkipngenokoech/phoenixgithub@cb832060efe3ef880f1aa2981bede8a416f03644 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kkipngenokoech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cb832060efe3ef880f1aa2981bede8a416f03644 -
Trigger Event:
release
-
Statement type:
File details
Details for the file phoenixgithub-0.1.1-py3-none-any.whl.
File metadata
- Download URL: phoenixgithub-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be608cd802c0e1e99cd55c84fdaaf8cc6eee86e3325b5e2de10186cb24d6bdbf
|
|
| MD5 |
8a3fa3253cdbcff51568075faab2f743
|
|
| BLAKE2b-256 |
f727e26afb701abf257ae9a69c384a128d50353855c1797bc83a9973cf39c8be
|
Provenance
The following attestation bundles were made for phoenixgithub-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on kkipngenokoech/phoenixgithub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phoenixgithub-0.1.1-py3-none-any.whl -
Subject digest:
be608cd802c0e1e99cd55c84fdaaf8cc6eee86e3325b5e2de10186cb24d6bdbf - Sigstore transparency entry: 1006432552
- Sigstore integration time:
-
Permalink:
kkipngenokoech/phoenixgithub@cb832060efe3ef880f1aa2981bede8a416f03644 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kkipngenokoech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cb832060efe3ef880f1aa2981bede8a416f03644 -
Trigger Event:
release
-
Statement type: