Skip to content

Agents: installing and signing in

Besides the default Claude Code, the panel can switch to any CLI that supports ACP (Agent Client Protocol). Switching agents, installing the CLI and signing in are all done in Settings (⚙ in the header) > Connection > Agent card.

AgentWhat you sign in withUsing an API keySteps
Claude Code (default)A Claude subscription (recommended)Environment variable ANTHROPIC_API_KEYSigning in to Claude Code
CodexA ChatGPT account (recommended)Environment variable CODEX_API_KEY or OPENAI_API_KEYSigning in to Codex
Grok BuildA SuperGrok / X Premium+ account (recommended)Environment variable XAI_API_KEYSigning in to Grok Build
Gemini CLIGemini Code Assist Standard / EnterpriseGEMINI_API_KEY or ~/.gemini/.envSetting up Gemini CLI
Other ACP-compatible CLIs (Qwen Code, Kimi CLI and so on)Depends on the CLIDepends on the CLIOther ACP agents
  1. Under Settings > Connection > Agent, choose the agent to use in “Agent” (up to v0.55.1 this was under Settings > CLI). The chosen agent is used from the next connection.
  2. If the CLI is not installed, press “Install” on the same card (anything installed through npm needs Node.js; the command that will run is shown before you press).
  3. If sign-in is needed, press “Log in” (Claude Code) or “Sign in” (others) and authenticate in the browser. When it finishes the panel reconnects, and the card shows the method actually used.

The card is in one of these 4 states. The status pill at the right end of the heading (“Signed in” and so on) shows it too.

StateWhat the card showsWhat you can do
Signed out“Not connected.” and sign-in guidance“Sign in” starts the login command
Signing in“Waiting for the … sign-in in your browser…”, the sign-in URL and the CLI output“Open browser”, “Copy”, “Cancel”
Connecting“Connecting to …”Wait
Connected“Connected to …” and the sign-in method used“Switch account”
  • The panel does not store API keys. Put them in an OS environment variable or in each CLI’s own settings file.
  • OS environment variables take effect only after you restart the editor (and Unity Hub too, if you launch from Unity Hub).

Permission cards, chips and attachments, Unity tools, the script validation gate, thinking blocks, the history browser, in-panel login and the subagent model settings work the same with every agent. There are five differences.

  • History: the panel itself saves ACP agent conversations under UserSettings/AgentPanel/Sessions/, and they appear in the same list as Claude Code sessions (labeled with the agent name). An agent that does not support session/load starts a new session on resume and receives the earlier conversation log along with your next message (a note about this appears in the conversation).
  • Subagent model settings: “Force subagent model” and “Per-type overrides (advanced)” are sent as instructions at the start of a new session (they cannot be passed through environment variables or .claude/agents as with Claude Code). They are followed when the agent can choose subagent models.
  • The script validation gate hook (the PreToolUse hook) is Claude Code only. With ACP, only the panel-side uap_scripts_commit gate applies.
  • Unity tool list: it defaults to “Compact”, and tools outside the core are used through uap_tools / uap_call (see “Tool list mode” in Unity tools).
  • Agents without HTTP MCP support: the Unity tools are handed over as an HTTP MCP server. For an agent that does not advertise HTTP and supports only stdio, the panel builds a small relay program with the .NET runtime and compiler bundled with Unity and hands the tools over through stdio (the first time, a build of a few seconds runs, and the result is stored in Library/UnityAgentPanel/McpStdioRelay/; a connection that could not wait for it gets the tools from the next connection). If neither works, a note to that effect appears in the conversation right after the connection.

Available models vary with the CLI, authentication method and account; choose one in the header’s model picker (Choosing a model). Real examples for each agent are in Agent usage examples.