answered from live GitHub & Hugging Face data
How do I create a separate GitHub account for my custom AI coding agent like QwenLM?
Use a GitHub App, not a second account, for a custom agent. A machine account is allowed, but GitHub limits you to one.
I could not retrieve live maintenance signals for QwenLM/qwen-code because the GitHub lookup was rate-limited. This answer covers the account rules and identity options only.
What the Terms of Service allow
GitHub's Terms of Service say the following about machine accounts:
- A human must create the account and accept the Terms on its behalf.
- The account needs a valid email address. The human is responsible for its actions.
- A machine account is used exclusively for automated tasks.
- You may keep no more than one free machine account in addition to your personal account.
Several agents that share one machine account all act as the same user. That does not give each agent its own identity.
Options compared
| Option | Separate identity per agent? | Token lifetime | Repo scope | Fit |
|---|---|---|---|---|
| GitHub App (recommended) | Yes. Each app is its own actor. | Installation tokens expire after 1 hour, per GitHub docs | You can limit tokens to chosen repositories and permissions. | Best for one or more agents |
| Machine account | Only one. A second one exceeds the limit. | Depends on the token you create | Depends on the token | Good for one agent |
| Your personal credentials | No. Actions appear as you. | Depends on the token | Depends on the token | Avoid for agents |
Steps: create a GitHub App for your agent
- Register a new GitHub App under your account or organization settings.
- Set only the permissions the agent needs, such as Contents and Pull requests.
- Install the app on one repository, not on all repositories.
- Generate a private key and store it in your agent's secret store.
- At run time, sign a JWT and request an installation access token for that repository.
- Pass the token in the
Authorization: Bearerheader.
Per the installation token docs, API requests made with an installation token are attributed to the app. The token also works for HTTP Git access with the Contents permission.
Steps: create a machine account (if you need a named user)
- Create a new GitHub account with a mailbox you control.
- Turn on two-factor authentication.
- Use it only for automated tasks.
- Add it to the repositories it needs.
- Keep the account to one. You already hold a free personal account.
Recommendation
Choose a GitHub App if you run more than one agent or want short-lived, repo-scoped tokens. Choose a machine account only if your project needs an actual user name for the agent.
If you want each agent's commits to show the agent as author and name the accountable human, githug does this. Its hug init --repo owner/repo command sets it up for Claude Code, Codex, Cursor, or any agent that runs git. Each agent gets its own key, which mints one-hour tokens for one repository. It is in beta and free for now.