~/.gpr/agents.json is an optional launch config for the daemon. It is not created by install or gpr setup. If the file is missing, the built-in catalog is used.
Override the location with GPR_HOME. The file is then $GPR_HOME/agents.json.
What it provides
The catalog already knows how to spawn Cursor, Claude Agent, Codex, and other ACP agents.agents.json is the local override when that default is not enough.
Use it to:
- Inject environment into the agent process. The daemon runs as a background service (LaunchAgent on macOS, equivalent startup service on Linux and Windows). It does not load
.zshrc,.bashrc, or PowerShell profiles. Keys you export in a terminal never reach Claude or Codex unless you put them here or in the service environment. - Pin the command and args. Point at a custom ACP binary, a non-PATH location, or extra flags.
- Register agents that are not in the catalog. Names you add are advertised to the app on connect, so you can select them on a workspace.
- Override a catalog agent. A key such as
claudeorcursorfully replaces that catalog launch spec. - Set
workspaceRoot. Fallback session sandboxes when the relay does not supply a cwd (default~/.gpr/sessions).
When to use it
Schema
On Windows the same file is
%USERPROFILE%\.gpr\agents.json.
Replace, do not merge
If you define a catalog id (claude, codex, cursor, …), that spec replaces the catalog entry. The daemon does not fill in catalog defaults.
That means:
- You must set
command. An env-onlyclaudeblock fails withagent "claude" has no command. - Catalog-only env such as
CLAUDE_CODE_EXECUTABLEandCODEX_PATHis not copied in. Set those yourself if the adapter needs them.
Apply changes
The daemon reads the file at startup.gpr logs if restart fails.
Related: GPR_AGENT_CMD
default. It does not change claude or codex. Prefer agents.json when you need per-agent env, extra agents, or a durable config that survives a new shell.
Secrets
Keep API keys in this local file, not in the repo you are working in.gpr uninstall --purge deletes ~/.gpr, including agents.json.