diff --git a/config.toml.example b/config.toml.example index 20ccff34..759500f5 100644 --- a/config.toml.example +++ b/config.toml.example @@ -53,14 +53,17 @@ args = ["acp", "--trust-all-tools"] working_dir = "/home/agent" # [agent] -# command = "claude" -# args = ["--acp"] +# command = "claude-agent-acp" +# args = [] # working_dir = "/home/node" +# # Install the adapter first (requires Node >= 20): +# # npm install -g @agentclientprotocol/claude-agent-acp +# # Auth: run `claude auth login` once, or set CLAUDE_CODE_OAUTH_TOKEN. # ⚠️ SECURITY WARNING: Any env var listed here is accessible to the agent. # A user could trick the agent into leaking these values via prompt injection. # All supported backends support OAuth login — prefer that over env var API keys. # Note: env vars here can override baseline vars (HOME, PATH, USER) if needed. -# env = { ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" } +# env = { CLAUDE_CODE_OAUTH_TOKEN = "${CLAUDE_CODE_OAUTH_TOKEN}" } # # By default, the agent subprocess only inherits these baseline vars: # Linux/macOS: HOME, PATH, USER diff --git a/docs/config-reference.md b/docs/config-reference.md index 907c122c..c8a31ff4 100644 --- a/docs/config-reference.md +++ b/docs/config-reference.md @@ -89,7 +89,7 @@ The AI agent subprocess that OpenAB spawns to handle messages via ACP. | `command` | string | *required* | Agent binary (e.g. `kiro-cli`, `claude`, `codex`, `gemini`, `copilot`, `opencode`, `cursor-agent`). | | `args` | string[] | `[]` | CLI arguments passed to the agent. | | `working_dir` | string | `"/tmp"` | Working directory for the agent process. | -| `env` | map | `{}` | Extra environment variables (e.g. `{ ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" }`). | +| `env` | map | `{}` | Extra environment variables (e.g. `{ OPENAI_API_KEY = "${OPENAI_API_KEY}" }`). | | `inherit_env` | string[] | `[]` | Env var names to inherit from the OAB process (e.g. vars injected via K8s `envFrom`). Keys in `env` take precedence. | > **Default inherited vars:** After `env_clear()`, the agent always receives `HOME`, `PATH`, and `USER` (on Windows: `USERPROFILE`, `USERNAME`, `PATH`, `SystemRoot`, `SystemDrive`). Use `inherit_env` to pass additional vars beyond this baseline. @@ -105,10 +105,10 @@ working_dir = "/home/agent" # Claude Code [agent] -command = "claude" -args = ["--acp"] +command = "claude-agent-acp" +args = [] working_dir = "/home/node" -env = { ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" } +env = { CLAUDE_CODE_OAUTH_TOKEN = "${CLAUDE_CODE_OAUTH_TOKEN}" } # Codex [agent]