Hermes in Zed via ACP
Wire Hermes Agent into the Zed editor as an ACP External Agent, so you get
Hermes's model/provider setup, memory, skills, and tools inside Zed's Agent
Panel — without Zed owning your credentials or config. This skill covers the
Zed-side wiring (External Agents, the agent_servers config, boundaries,
debugging) and the exact Hermes-side ACP launch config. It does NOT cover
Zed's native "Zed Agent", Terminal Threads, macOS/Windows paths, or general
Zed editing.
Dependency stance: requires Hermes installed with the acp extra
(agent-client-protocol), and Zed at/after the ACP External Agents release.
All Hermes credentials live in ~/.hermes/ as usual. Hermes-side ACP
internals (Buzz bridge, VS Code/JetBrains setup, the full approvals matrix,
HERMES_ACP_SKIP_CONFIGURED_MCP) live in the hermes-agent skill — load it
for those.
When to Use
- "Add Hermes to Zed" / "use Hermes inside Zed"
- "Configure Zed external agent for Hermes" / "agent_servers hermes"
- "Hermes ACP not showing in Zed" / "Zed can't find hermes acp"
- "ACP external agent Zed config" / wiring any custom ACP agent into Zed
Prerequisites
- Hermes installed and on your
PATH(command -v hermes). - ACP extra installed — invoke through the
terminaltool:cd ~/.hermes/hermes-agent && uv pip install -e '.[acp]'This enableshermes acp,hermes-acp, andpython -m acp_adapter. - Hermes provider credentials configured (Zed does NOT supply them):
hermes model(interactive), or set in~/.hermes/.env/~/.hermes/config.yaml. - Zed installed. Linux settings path (native install):
~/.config/zed/settings.json. - Zed as Flatpak (
dev.zed.Zed): settings live at~/.var/app/dev.zed.Zed/config/zed/settings.json, the file is JSONC (//comments + trailing commas), and the sandbox needs the absolute in-sandboxcommandpath~/.local/bin/hermes(sandbox PATH has no host binaries). Noflatpak overrideis needed — the manifest already grantshome+network. Full recipe + JSONC edit workaround inreferences/zed-flatpak-setup.md. Zed auto-reloads settings (no restart). - (Optional) ACP browser tools need Node + Chromium via
hermes acp --setup-browser(see Pitfalls /hermes-agentskill).
Zed ACP Concepts
Zed supports three agent paths: Zed Agent (Zed-native), External Agents (ACP process you own), and Terminal Threads (raw CLI/TUI). Hermes is an External Agent.
- External Agents run as a separate process, talking to Zed over ACP (stdio JSON-RPC). Zed hosts the thread UI; the agent owns runtime, auth, models, tools.
- Register a custom agent under
agent_serversin Zed settings. Zed auto-detects the file change — no restart needed. - Configuration boundaries (what Zed controls vs Hermes owns):
- Model/provider config → owned by Hermes
- Auth / API keys / subscriptions → owned by Hermes
- Zed Agent profiles → do NOT apply to Hermes
- Zed Skills → do NOT apply (Hermes uses its own skills)
- Zed MCP servers → MAY be forwarded to Hermes over ACP
- Native MCP config → Hermes may also read its own
- Tool permissions → Zed ACP/tool-forwarding permissions may apply
- See
references/zed-external-agents.md(load on demand —skill_view(name='zed-hermes-acp', file_path='references/zed-external-agents.md')) for registry install, common agents, per-agent auth, and thread import.
How to Run
Canonical flow: install the Hermes ACP extra, confirm it launches, then add the
hermes-agent entry to Zed's agent_servers and start a thread. Local
commands run through the terminal tool. The Zed settings edit uses
write_file/patch for native installs, but a tolerant JSONC-aware
edit for the Flatpak (see references/zed-flatpak-setup.md) — Hermes's
JSON-only writers reject Zed's // comments.
Quick Reference
- Install ACP extra:
cd ~/.hermes/hermes-agent && uv pip install -e '.[acp]' - Launch/check Hermes ACP:
hermes acp·hermes acp --version·hermes acp --check - Health:
hermes doctor·hermes status·hermes model - Optional browser tools:
hermes acp --setup-browser(or--yes) - Zed settings (native):
~/.config/zed/settings.json - Zed settings (Flatpak):
~/.var/app/dev.zed.Zed/config/zed/settings.json - Flatpak pre-flight (mimics Zed's spawn):
flatpak run --command=bash dev.zed.Zed -c '~/.local/bin/hermes acp --check' - Zed ACP debug: run
dev: open acp logsfrom the command palette (Ctrl+Shift+P) - Zed custom-agent config key:
agent_servers - Start thread: Agent Panel → new-thread menu → select hermes-agent
Procedure
-
Install the ACP extra (one time), through the
terminaltool:cd ~/.hermes/hermes-agent && uv pip install -e '.[acp]' -
Verify Hermes ACP launches (stdout is reserved for ACP JSON-RPC; logs go to stderr):
hermes acp --checkExpect a clean check with no errors. If it errors, run
hermes doctorandhermes status. -
Confirm credentials for the provider you want Hermes to use in Zed:
hermes model -
Add Hermes as a custom agent server in Zed. Merge this block under
agent_servers(the key is the label shown in Zed's new-thread menu — any name works):{ "agent_servers": { "hermes-agent": { "type": "custom", "command": "~/.local/bin/hermes", "args": ["acp"], "env": {} } } }- Native install (
~/.config/zed/settings.json): edit withread_filewrite_file/patch(plain JSON).
- Flatpak (
~/.var/app/dev.zed.Zed/config/zed/settings.json): the file is JSONC — Hermes'swrite_file/patchtools reject it (strict JSON validation fails on the//comments). Edit with a tolerant method instead (anchor-replace recipe inreferences/zed-flatpak-setup.md). ThecommandMUST be the absolute in-sandbox path~/.local/bin/hermes— barehermesis not on the sandbox PATH. Zed auto-detects the settings change — no restart required.
- Native install (
-
Start a Hermes thread. Open the Agent Panel, use the agent selector / new-thread menu, and pick hermes-agent. Zed connects over ACP; Hermes renders chat, tool activity, file diffs, terminal commands, approval prompts, and streamed thinking.
-
(Optional) Approve tool calls. On first runs Hermes raises permission requests in Zed. Choose:
allow_once— this one call onlyallow_session— all matching calls this ACP session (recommended default)allow_always— writes a permanent Hermes allowlist entrydeny— block this call
-
(Optional) Enable browser tools. ACP browser tools need the
agent-browsernpm package + Chromium, not in the Python wheel:hermes acp --setup-browser --yesInstalls Node 26 into
~/.hermes/node/,npm install -g agent-browser @askjo/camofox-browser, and Playwright Chromium (or uses a detected system Chrome/Chromium). Idempotent.
Pitfalls
- Zed can't find
hermes acp→ verifycommand -v hermesand that the ACP extra installed (hermes acp --version). The host command must behermeswith args["acp"]. - ACP starts then errors →
hermes acp --check,hermes doctor,hermes status. Logs are on stderr; stdout must stay clean for JSON-RPC. - Missing credentials in Zed → Zed does NOT pass its own keys to Hermes.
Configure via
hermes modelor~/.hermes/.envfirst. - Zed Agent profiles / Zed Skills don't apply to Hermes threads — Hermes uses its own profiles, skills, and MCP config. Don't expect Zed's skills or profiles to load.
- Browser tools absent until you run
--setup-browser; the ACP toolset includesbrowser_*only after that bootstrap. Distinct from Hermes's ownbrowsertoolset /use_gatewayconfig. - MCP not appearing → Zed MCP servers may be forwarded over ACP, but Hermes
also reads its own native MCP config. Check both. To stop Hermes from
auto-starting globally configured MCP servers in ACP, the host can set
HERMES_ACP_SKIP_CONFIGURED_MCP=1(host-set, not user.env). - ACP debug in Zed →
dev: open acp logsfrom the command palette shows Zed↔agent messages; include when reporting issues. - Linux settings path — native:
~/.config/zed/settings.json; Flatpak:~/.var/app/dev.zed.Zed/config/zed/settings.json(unless a customXDG_CONFIG_HOME). Not the macOS/Windows paths. - Zed settings.json is JSONC (Flatpak and native) — Hermes's
write_file/patchtools do strict-JSON validation and refuse to write it (the//comments fail the check). Edit with a tolerant method (python anchor-replace; seereferences/zed-flatpak-setup.md). Never use a JSON-only writer that would strip Zed's comments. - Flatpak
commandmust be an absolute in-sandbox path (~/.local/bin/hermes), not barehermes— the sandbox PATH is/app/bin:/usr/binwith no host binaries. Noflatpak overrideis required (manifest already grantshome+network).
Verification
Pre-flight the exact spawn Zed will use — works without a display:
flatpak run --command=bash dev.zed.Zed -c '~/.local/bin/hermes acp --check'
# expect: "Hermes ACP check OK"
Then confirm registration and connection in Zed:
- In Zed, open the command palette (
Ctrl+Shift+P) and rundev: open acp logs. - Start a hermes-agent thread from the Agent Panel and send a message (e.g. "list files in the current directory").
- The ACP logs show a successful
session/newhandshake with Hermes responding. If the thread appears and answers, the integration works.
References (on demand)
Load any with skill_view(name='zed-hermes-acp', file_path='references/<file>').
Linux-focused; macOS/Windows content was dropped during distillation.
references/zed-flatpak-setup.md— Flatpak path (dev.zed.Zed). Verified recipe: settings at~/.var/app/dev.zed.Zed/config/zed/settings.json, noflatpak overrideneeded (home+networkalready granted),commandmust be absolute in-sandbox~/.local/bin/hermes, the file is JSONC (Hermes'swrite_file/patchrefuse it — use the python anchor-replace workaround), and theflatpak run --command=bash dev.zed.Zed -c '... acp --check'pre-flight. Load when the user runs Zed as a Flatpak.references/zed-external-agents.md— Integration core. ACP registry vs custom-agent install, theagent_serversJSON shape, the Zed↔agent boundary table, per-agent auth, thread import, MCP forwarding, anddev: open acp logsdebugging. Load first when wiring or troubleshooting any custom ACP agent in Zed.references/zed-agent-paths.md— Contrasts Zed Agent (Zed-owned config) vs Terminal Threads (CLI-owned) vs Hermes-as-External-Agent (ACP, agent-owned viaagent_servers), with a decision rule for which path to use. Load when choosing or explaining the agent path.references/zed-agent-ui.md— How Hermes (External Agent) appears in the Agent Panel, Agent Settings (External Agents sub-page), and why Agent Profiles do NOT apply; which panel features (checkpoints, history restore, token display, steering, compaction) do/don't apply. Load when configuring or troubleshooting the panel.references/zed-tools-permissions.md— Zed's built-in tools, the tool-permission model (precedence, match inputs, Rust-regex rules), and OS sandboxing. Key finding: Zed's sandbox excludes External Agents like Hermes, so Hermes is gated only bytool_permissions, not bwrap. Load when locking down or reasoning about what Hermes can do.references/zed-mcp-skills-instructions.md— MCP server install/config, MCP forwarding to External Agents over ACP, the hard line that Zed Skills ≠ Hermes skills (Zed Skills are Zed-Agent-only), and the AGENTS.md instruction model. Load when a Zed MCP tool, Zed Skill, or AGENTS.md isn't reaching Hermes.references/zed-ai-features.md— Overview/quick-start/LLM-providers/parallel-agents/inline-assistant distilled into an apply-vs-does-not-apply matrix for Hermes threads. Load when explaining feature coverage.references/zed-ai-privacy.md— Data boundary: Hermes (External Agent) owns its provider data, feedback, and training under its own terms; Zed's rating/Edit-Prediction opt-ins apply only to Zed-hosted features. Load when asked whether Zed retains Hermes-thread prompts/code.references/zed-cli.md— Zed CLI reference for script/agent integration: opening files/dirs,line:colsyntax, window-control flags (-n,-w,-a,-r,--wait,--diff,--user-data-dir,--zed), stdin viazed -, URL handling, default-editor wiring, exit codes. Load when automating Zed from shell/agent scripts.
hermes-agent skill — Hermes-side ACP server internals (Buzz bridge, VS Code/JetBrains setup, the full approvals matrix, HERMES_ACP_SKIP_CONFIGURED_MCP). Load for anything beyond the Zed-side wiring.
