Docs · Get started

Agent harnesses

Install the harnesses your agents work through from the Terminal: Claude Code, Codex, Hermes Agent, pi, Gemini CLI, OpenCode and Kimi Code.

KyoubeAI 1.18.2 · · Source on GitHub (opens in a new tab)

Agents work through an agent harness: Claude Code, Codex, Hermes Agent, pi, Antigravity CLI, Gemini CLI, OpenCode or Kimi Code. You install the ones you want from the Terminal (the Workspace page, then Terminal, for company owners and admins), the same way you would on your own machine.

What you install stays:

  • Harnesses land in /kyoubeai/.local, on the kyoubeai-home volume, which comes first on the PATH of every agent and every Terminal shell.
  • Their logins (~/.claude, ~/.codex, ~/.hermes, ~/.pi, ~/.gemini, and so on) live on the same volume.
  • System packages you add with sudo apt install are put back automatically after a restart, an update or a core upgrade.

All of it survives docker compose down, ./update.sh and core upgrades, and scripts/backup.sh carries it to a new machine. The Terminal runs as the same user as your agents and has sudo, so treat Terminal access as root on the container (SECURITY.md).

kyoube harness install claude   # also: codex, hermes, pi, agy, gemini, opencode, kimi
kyoube harness list             # what is installed, which version, and whether it is yours

kyoube harness install runs the harness's official installer. The core image carries its own copies of Claude Code, Codex, Gemini CLI, Kimi Code and OpenCode as fallbacks; yours take precedence. Hermes, pi and the Antigravity CLI are not in the image: they can be chosen on an agent's Runtime tab straight away, but the agent's runs fail until you install them. kyoube doctor flags any harness your agents use that is not installed or no longer runs. KyoubeAI has no installer for Grok: install it from its own instructions so that grok lands in /kyoubeai/.local/bin.

How agents reach a model

  • AI connections hold a subscription sign-in or an API key centrally, and hand it to each run. You add one in Connectors or from an agent's Runtime tab, under AI connection. Claude Code, Codex, OpenCode and Grok can use them, Gemini CLI a Google (Gemini API key) connection, and Hermes a model gateway connection.
  • Model gateways are AI connections to OpenRouter, Amazon Bedrock or your own Responses, Messages or Chat Completions endpoint. Claude Code can run through OpenRouter, Bedrock or a Messages endpoint, Codex through OpenRouter or a Responses endpoint, and OpenCode and Hermes through OpenRouter or a Chat Completions endpoint. Pick the connection on the agent's Runtime tab; the model picker takes a model id you type.
  • The harness's own login, made in the Terminal, or provider keys in .env (ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY; docker compose up -d applies them). pi always works this way; the others do for agents that have no AI connection.

Claude Code

  1. kyoube harness install claude. This is the official native installer, and it keeps Claude Code up to date.
  2. Connect it, one of these ways:
    • Pro or Max subscription, as an AI connection. On the agent's Runtime tab, choose Claude Code, then add a Claude subscription under AI connection (or add it in Connectors). It shows a sign-in link: open it, sign in to Claude, and paste the code Claude shows back into the box under the link. Then click Connect. The connection holds a one-year token; connect it again once a year. No Terminal step is needed.
    • Anthropic API key: add it as an AI connection, or set ANTHROPIC_API_KEY in .env.
    • Just your own login: run claude in the Terminal and use /login. Agents without an AI connection use it, and Claude keeps it refreshed.
  3. Choose Claude Code and the connection on the agent's Runtime tab.

Claude subscription connections made before 1.1 hold an 8-hour token and stop working; connect them again once, as above. kyoube connect claude, the Terminal step of 1.1–1.14, is gone and says so.

Codex

  1. kyoube harness install codex.
  2. Add an OpenAI subscription (the page shows a device sign-in) or an OpenAI API key as an AI connection, or run codex login in the Terminal for agents without one.
  3. Choose Codex on the agent's Runtime tab. Keep Bypass sandbox on: Codex's own sandbox needs kernel features a container does not have, and the container is the sandbox.

Hermes Agent

  1. kyoube harness install hermes.
  2. Run hermes setup in the Terminal to pick a provider and model and enter keys (OpenRouter and others). Its settings, sessions and memory live in ~/.hermes.
  3. Choose Hermes on the agent's Runtime tab. It uses its own settings, or a model gateway connection (OpenRouter or a Chat Completions endpoint) picked there.

pi

  1. kyoube harness install pi.
  2. Run pi in the Terminal and use /login, or put provider keys in ~/.pi.
  3. Choose pi on the agent's Runtime tab. pi does not use AI connections.

Antigravity CLI

  1. kyoube harness install agy in the Terminal. Do this first: Antigravity shows on the Runtime tab with its models even before agy is installed, and its runs fail until it is. This is Google's official installer; it puts agy in /kyoubeai/.local/bin.
  2. Sign in, one of these ways:
    • Google account: run agy in the Terminal and choose Google OAuth. It prints a sign-in link; open it, sign in, and paste the code the page shows back into the Terminal. Then leave agy with Ctrl+D. The sign-in is kept in ~/.gemini/antigravity-cli.
    • Gemini API key: add "modelProvider": "gemini" to ~/.gemini/antigravity-cli/settings.json and set GEMINI_API_KEY in the agent's environment. The key alone does nothing.
  3. Choose Antigravity on the agent's Runtime tab and pick a model (the list comes from agy models once agy is installed). Test checks that agy is installed and signed in, and says what to do if not. Antigravity does not use AI connections, and there is no sign-in on the agent page: the core's sign-in panel is only for agents in a managed sandbox.

Antigravity is not one of the core's own adapters: KyoubeAI ships it in the image (packages/adapter-antigravity) and registers it with the core at every start. Agents keep their conversation across runs, and start a new one when their workspace moves.

Gemini CLI, OpenCode, Kimi Code

The core image carries a copy of each. kyoube harness install gemini (or opencode, kimi) installs your own, newer copy, which then takes precedence. Sign in from the Terminal as each one's documentation describes, or give Gemini CLI a Google connection (a Gemini API key) and OpenCode an OpenRouter one.

Switching an agent's harness

On the Runtime tab, pick the new harness and, in the same save, an AI connection that works with it, or none. The save is refused while the agent still has a connection for another provider. Test works before you save.

After an update or a core upgrade

kyoube doctor lists each installed harness and whether it still starts. One that no longer runs, for example after the core moves to a new Node.js, shows its reinstall command. It also reports the kept system packages, and fails if they could not be put back at the last start.