Two Grok accounts.
One AgentsRoom. Zero logout.
Run a personal Grok Build login on one project and a work login on another, in the same window, at the same time. Pin one Grok account per project, per folder or per agent. Sign in straight from the Settings panel: no GROK_HOME to export by hand, no extra tool to install.
GROK_HOME~/.grok-work~/.grokOne directory per Grok account, pointed at by GROK_HOME. Both accounts stay signed in, both run at once.
Why use several Grok accounts
Real reasons developers run more than one Grok Build account, in plain words.
Keep work and personal cleanly separated
Your employer's Grok account stays on the work repositories. Your personal xAI account stays on your weekend projects. No work credentials on a side project, no personal sessions recorded on the company account, and nothing to remember before you type a prompt.
Bill consumption per client
When a client gives you access to their Grok Build account, the sessions for that client run on it. Their quota is spent, not yours. Each account keeps its own history, so what belongs to whom stays readable months later.
Avoid quota collisions
If your work account is on a tight plan, a long agent run on a personal project should not eat into it. Two accounts means two sets of limits and two usage histories, instead of one shared budget you keep bumping into.
Run a test account next to a prod account
Keep a second Grok account for noisy experiments, throwaway agents and prompt drafts, and leave the main account clean. Switching between them is a pick in a list, per project or per agent.
Different orgs, different policies
A company account can be tied to an enterprise team with its own logging and retention rules. Keeping a personal account beside it means your personal coding stays on your own terms, with credentials, configuration and sessions isolated at the directory level on disk.
Two developers, one workstation
When two developers share a machine, each signs in with their own Grok account. AgentsRoom remembers both and starts the right one depending on the project or the agent, instead of whoever logged in last winning.
Built directly into AgentsRoom
No external switcher, no shell wrapper, no logout and login dance.
One Grok account per project
Pin a Grok account on a project and every agent in it inherits that account. Open a work project and a personal project in the same window: each one runs on its own Grok login underneath.
Override per agent
Need one agent on a different account? Edit the agent, pick another Grok account, save. The override applies to that agent only, the rest of the project keeps the project account.
One account per folder of projects
Pin a Grok account on a sidebar folder and every project filed under it starts on that account, sub-folders included. A work folder on the work account, a personal folder on the personal one. A project, or a single agent, can still override it.
Global default account
Mark one Grok account as the default. Every new project starts on it unless something more specific says otherwise. Change the default later and every project that pins nothing follows automatically.
Sign in inside the app
Add an account and AgentsRoom opens a small embedded terminal running grok login with the right GROK_HOME already set. Finish in the browser, come back: the badge flips to signed in as soon as auth.json lands in that directory.
Strict on-disk isolation
Each account lives in its own directory: auth.json, config.toml and sessions. Two accounts never share an identity, and removing an account from AgentsRoom never touches another account's data.
A colour per account
Give each Grok account its own colour. It shows as a dot on the agent avatar, on the terminal header and on the project tile, so which account is running is readable at a glance instead of being looked up.
Keep going past a usage limit
When the account an agent runs on exhausts its quota, AgentsRoom can hand the work to another Grok account you are already signed in to. Any account can be kept out of that pool with one switch.
Point at a directory you already have
An account is just a path. Let AgentsRoom create and manage one, or type the path of a Grok home you already set up by hand, including your default ~/.grok. Nothing is moved or rewritten.
How it works under the hood
Built on the environment variable Grok Build documents itself.
GROK_HOME drives everything
The grok CLI reads its whole local state from one directory: credentials, configuration and sessions. Default is ~/.grok, and GROK_HOME moves it somewhere else. One directory is one signed-in account, so binding an agent to an account is binding it to a directory.
Each account is a directory
When you add an account, AgentsRoom creates a directory under its own home and signs in there. You can also point an account at any Grok home you already have by entering its path. Both are the same thing to the CLI: a value for GROK_HOME.
Sign-in is embedded in Settings
AgentsRoom starts a small terminal running grok login with GROK_HOME set to the new directory. The browser step is the usual one. AgentsRoom watches for auth.json in that directory, so the signed-in badge appears by itself once the file is written.
The account is resolved at launch
When an agent starts, AgentsRoom walks the cascade in order: agent override, project pin, nearest folder that pins an account, global default, then the CLI's own home. The matching GROK_HOME is placed in the agent's environment before grok is launched.
Alternatives to AgentsRoom
Other ways to handle several Grok accounts, and what AgentsRoom does differently.
Exporting GROK_HOME by hand
The direct route: export GROK_HOME=/some/path before launching grok. It works, and it stops working the moment you open a second terminal tab and forget which account that one is on. AgentsRoom sets the same variable for you, per project and per agent, and shows the active account in the interface.
Setting XAI_API_KEY
The trap almost everyone falls into. A key does not switch account: Grok uses it only as a fallback when no session is active, and a stored session token wins. Anyone who has run grok login once, which is everyone, keeps running on the first account while believing the key moved them. The directory is the only lever that actually switches accounts, and it is the one AgentsRoom drives.
Logging out and back in each time
Run grok login on the other account, then again to come back. The command replaces the cached session for the whole machine, so it is global and destructive: every other project switches with you, and any running session is disturbed. AgentsRoom keeps every account signed in at once and switches with a pick in a list.
Two machines or two OS user sessions
Some teams keep a separate machine, or a separate operating system user, per Grok account. It is heavy and slow, and it still cannot run a work agent and a personal agent in parallel. AgentsRoom runs both at the same time, on the same machine, in the same window.
What AgentsRoom does that the others do not
AgentsRoom treats several Grok accounts as a first-class concept: a pin per project, a pin per folder, an override per agent, an embedded sign-in that runs grok login for you, and a status badge per account. Grok accounts sit next to Claude, Codex and Cursor accounts in the same panel, so a work Grok agent, a personal Grok agent and a Claude agent can all run side by side.
FAQ
How many Grok accounts can I add to AgentsRoom?
There is no hard limit. An account is a directory on disk, so add a work account, a personal account, one per client and a test account if you want. They are all listed in the Settings panel and any of them can be picked for a project, a folder or a single agent.
Do I need an extra tool to run two Grok accounts?
No. AgentsRoom drives GROK_HOME, the variable the grok CLI documents itself. There is no external switcher, no shell wrapper and no extra dependency. The sign-in flow runs the official grok login command in a terminal embedded in Settings.
Can two agents run on two different Grok accounts at the same time?
Yes, and that is the point. Each agent gets its own environment, so the account is decided agent by agent. A project pinned on the work account can hold one agent overridden onto the personal account, and both run in parallel in the same window.
Does setting XAI_API_KEY switch my Grok account?
No, and this is the part that surprises people. Grok uses the API key only as a fallback when no session token is active. Once you have signed in interactively, the stored session takes precedence and the key is ignored, silently. Since everyone has run grok login at least once, a key-based switch fails without any error message. Separate directories are the only reliable way.
What happens if I delete an account some agents still point at?
Nothing breaks. Those agents quietly fall back to the next account in the cascade, and the directory itself is left on disk in case you want to point another account at it later. You can rebind the orphaned agents whenever you like.
Are my Grok credentials sent to a server?
No. Every account directory stays on your machine. AgentsRoom never reads, copies or transmits credentials, and there is no AgentsRoom account in the middle. The sign-in runs the official grok login CLI locally and the browser step happens between you and xAI, as usual.
Can I pin a Grok account to a whole group of projects?
Yes. Sidebar folders carry their own defaults, and the Grok account is one of them. Pin the work account on the folder holding your work repositories and every project inside starts on it, including projects added later and projects in sub-folders. The order is: agent override, project pin, nearest folder, global default, then the CLI's own home.
Can I mix Grok accounts with Claude, Codex and Cursor accounts?
Yes. Accounts are held per provider, in the same Multiple Accounts panel. A single project can pin one Grok account and one Claude account at once, and each agent uses the account of the provider it runs on. Nothing is shared between providers.
What exactly lives in a Grok account directory?
The same things ~/.grok holds: auth.json with the session for that account, config.toml with its settings, and the session files for the conversations run on it. Two accounts are two of these directories, which is why they can be signed in at the same time without interfering.
What happens when one Grok account runs out of quota?
AgentsRoom can hand the work over to another Grok account you are already signed in to, instead of leaving the agent stuck until the window resets. Accounts you would rather keep out of that pool can be excluded one by one. The full behaviour is described on the account auto-switch page.
You may also like: Cursor Multi-Account
Several Grok accounts give you two xAI logins in one app. Cursor Multi-Account does the same for the cursor-agent CLI, with the same pins and the same isolation. Both live in the Multiple Accounts panel, next to Claude and Codex.
See the Cursor Multi-Account featureYour agent hits a usage limit. It keeps working anyway.
When the Claude or Codex account an agent runs on exhausts its quota, AgentsRoom hands the same conversation to another account you are already signed in to, and the work continues.
See how it worksFurther reading
AgentsRoom Now Supports Grok Build
Grok Build, xAI's terminal coding agent, is now a first-class provider in AgentsRoom. Run it next to Claude, Codex, Antigravity CLI, OpenCode and Aider, and switch mid-conversation.
Claude Code Keeps One Login at a Time. Here Is How to Run Several.
A field guide to running a work account and a personal account on the same machine: the one environment variable that decides which login is active, why the shell approach breaks once you have more than two terminals, and how to pin an account per project.
Antigravity CLI Keeps One Google Login Per Machine. Here Is What Works Instead.
Why you cannot alternate two Google AI Pro subscriptions on the Antigravity CLI, where it actually stores your login, what the account switchers really do to your system keyring, why a family plan does not double your quota, and the one approach that genuinely runs several accounts in parallel.
Stop logging out of Grok. Pick the account from a list.
Run a work Grok account, a personal one and a client account in AgentsRoom, side by side, today.
Companion app: monitor your agents on the go
Bring your own: Claude, Codex, Antigravity CLI, or other AI provider.
Push bugs and requests straight to your public backlog.
A glimpse of AgentsRoom in action.