الأكاديمية ← ميزات Hermesتوثيق رسمي · إرشاد عربي

ربط Hermes بالمحررات عبر ACP

ACP Host Integration

متوسط إلى متقدم12 دقيقة قراءةالدرس 294 أسئلة✓ 2026-08-18
قبل أن تقرأ

ما هذه الصفحة، وماذا تحتوي.

التشغيل البرمجي: استعمال Hermes من داخل برنامج آخر بدل الكتابة له في المحادثة. يتيح إدخاله في أنظمتك: موقع، سكربت، خط إنتاج بيانات. ستستعمل هنا hermes acp وhermes model، والقراءة نحو 12 دقيقة. انتبه: الواجهة المفتوحة على الشبكة تحتاج مصادقة. لا تتركها بلا حماية ولو على جهازك.

11أقسام
14أمثلة برمجية
2جداول
4أوامر
1,979كلمة من المصدر
الوصف الرسمي في سطر

Use Hermes Agent inside ACP-compatible editors and collaboration platforms

ماذا ستستطيع بعدها

نتائج مأخوذة من هذه الصفحة، لا من قالب.

  • تعرف ما التشغيل البرمجي ولماذا قد تحتاجه.
  • تنفّذ hermes acp وhermes model وتفهم ما يحدث بعدها.
  • تقرأ الجدول وتأخذ منه السطر الذي يخصّك فقط.
  • تضبط BUZZ_RELAY_URL في المكان الصحيح.
ما ستقابله من أسماء

كما تظهر تمامًا داخل Hermes.

الأوامر
  • hermes acp
  • hermes model
  • hermes update
  • hermes doctor hermes status
متغيرات البيئة
  • BUZZ_RELAY_URL
  • BUZZ_PRIVATE_KEY
  • BUZZ_API_TOKEN
  • BUZZ_ACP_AGENT_COMMAND
  • BUZZ_ACP_AGENT_ARGS
  • BUZZ_ACP_RELAY_OBSERVER
  • BUZZ_ACP_AGENT_OWNER
خريطة الصفحة

انتقل مباشرة إلى ما تحتاجه.

  1. 01What Hermes exposes in ACP mode
  2. 02Installation
  3. 03Launching the ACP server
  4. 04Host setup
  5. 05Configuration and credentials
  6. 06Host integration
  7. 07Session behavior
  8. 08Working directory behavior
  9. 09Approvals
  10. 10Troubleshooting
  11. 11See also
الصفحة الرسمية كاملة

بلا اختصار أو حذف.

النص أدناه منقول من المصدر الرسمي بالإنجليزية حتى تبقى الأوامر والأسماء دقيقة كما هي. قبل كل قسم شرح عربي يوضّح ما بداخله.

Hermes Agent can run as an ACP server, letting ACP-compatible hosts talk to Hermes over stdio. Editors can render:

  • chat messages
  • tool activity
  • file diffs
  • terminal commands
  • approval prompts
  • streamed thinking / response chunks

Other hosts can use the same protocol to route collaboration events into Hermes. ACP is a good fit when you want Hermes to keep its existing identity, provider setup, memory, skills, and tools while another application owns the conversation transport.

What Hermes exposes in ACP mode

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه. تذكير: استعمال Hermes من داخل برنامج آخر بدل الكتابة له في المحادثة.

Hermes runs with a curated hermes-acp toolset designed for editor workflows. It includes:

  • file tools: read_file, write_file, patch, search_files
  • terminal tools: terminal, process
  • web/browser tools
  • memory, todo, session search
  • skills
  • execute_code and delegate_task
  • vision

It intentionally excludes things that do not fit typical editor UX, such as messaging delivery and cronjob management.

Installation

خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes acp.

Install Hermes normally, then add the ACP extra from the install checkout:

Shellسطر واحد
cd ~/.hermes/hermes-agent && uv pip install -e '.[acp]'

This installs the agent-client-protocol dependency and enables:

  • hermes acp
  • hermes-acp
  • python -m acp_adapter

Launching the ACP server

أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes acp.

Any of the following starts Hermes in ACP mode:

Shellسطر واحد
hermes acp
Shellسطر واحد
hermes-acp
Shellسطر واحد
python -m acp_adapter

Hermes logs to stderr so stdout remains reserved for ACP JSON-RPC traffic.

For non-interactive checks:

Shellسطران
hermes acp --version
hermes acp --check

Browser tools (optional)

Browser tools (browser_navigate, browser_click, etc.) depend on the agent-browser npm package and Chromium, which aren't part of the Python wheel. Install them with:

Shellسطران
hermes acp --setup-browser           # interactive (prompts before ~400 MB download)
hermes acp --setup-browser --yes     # accept the download non-interactively

This is the standalone command. The terminal-auth flow (hermes acp --setup) also offers the browser bootstrap as a follow-up question after model selection, so most users never need to run --setup-browser directly.

What it does:

  • Installs Node.js 26 into ~/.hermes/node/ if missing
  • npm install -g agent-browser @askjo/camofox-browser into that prefix (no sudo needed — npm's --prefix points at the user-writable Hermes-managed Node)
  • Installs Playwright Chromium, or uses a detected system Chrome/Chromium when available

The bootstrap is idempotent — re-running it is fast and skips work that's already done.

Host setup

خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes model، hermes acp.

Buzz channels (relay bridge)

Buzz ↗ is a Nostr-based collaboration platform for people and agents. Its buzz-acp harness connects Buzz channels to any ACP agent over stdio:

Textسطر واحد
Buzz relay <-- WebSocket --> buzz-acp <-- ACP over stdio --> Hermes Agent

This is a transport integration, not a second Hermes installation. The subprocess launched by buzz-acp uses the same Hermes configuration, credentials, memory, skills, and state as hermes on that host.

(This is distinct from Buzz Desktop's managed runtime ↗, which spawns Hermes locally as a preset harness. The relay bridge is for joining Buzz channels as an agent identity, typically on a server.)

Prerequisites:

  • Complete the ACP installation and hermes acp --check above.
  • Build buzz-acp and the buzz CLI from the Buzz repository ↗ (cargo build --release -p buzz-acp).
  • Mint a dedicated Nostr keypair for Hermes (buzz-admin generate-key) and register it as a relay member (buzz-admin add-member). Every agent needs its own identity — do not reuse a human keypair.
  • Add that identity to the intended Buzz channels.

Start a bridge with:

Shell7 أسطر
export BUZZ_RELAY_URL="wss://community.example.com"
export BUZZ_PRIVATE_KEY="..."
export BUZZ_API_TOKEN="..."
export BUZZ_ACP_AGENT_COMMAND="hermes"
export BUZZ_ACP_AGENT_ARGS="acp"

buzz-acp

BUZZ_API_TOKEN is needed only when the relay enforces token authentication. Do not commit or paste the private key or API token.

For a persistent server deployment, run buzz-acp under a service manager as the same operating-system user that owns the intended Hermes home. Setup, key generation, channel discovery, and per-agent options are documented in the buzz-acp README ↗.

The bridge discovers every Buzz channel where the Hermes identity is a member and automatically subscribes when it is added to another channel. Buzz channel membership therefore remains the access boundary; Hermes does not need a separate channel list in its own configuration.

To expose Hermes ACP activity in the owner's Buzz Desktop, add:

Shellسطر واحد
export BUZZ_ACP_RELAY_OBSERVER="true"

This publishes encrypted kind 24200 observer frames addressed to the agent's owner (Buzz's NIP-AO). Desktop renders the live lifecycle, tool, response, and usage stream in the agent's Activity log. The relay treats these frames as ephemeral, so Desktop must be online before the turn starts; its local observer archive is the durable owner-side history.

Headless bridges answer ACP permission requests themselves because no editor is present to show approval dialogs — see Keep Buzz agents owner-only ↗. Treat the bridge as privileged automation: use a dedicated operating-system account, restrict which Buzz users can prompt the agent (buzz-acp supports an owner-only respond gate via BUZZ_ACP_AGENT_OWNER), and grant membership only in channels where Hermes is expected to work.

VS Code

Install the ACP Client ↗ extension.

To connect:

  1. Open the ACP Client panel from the Activity Bar.
  2. Select Hermes Agent from the built-in agent list.
  3. Connect and start chatting.

If you want to define Hermes manually, add it through VS Code settings under acp.agents:

JSON8 أسطر
{
  "acp.agents": {
    "Hermes Agent": {
      "command": "hermes",
      "args": ["acp"]
    }
  }
}

Zed

Configure Hermes as a custom agent server in Zed settings:

  1. Open the Agent Panel.
  2. Add a custom agent server with the following configuration:
JSON9 أسطر
{
  "agent_servers": {
    "hermes-agent": {
      "type": "custom",
      "command": "hermes",
      "args": ["acp"]
    }
  }
}
  1. Start a new Hermes external-agent thread.

Prerequisites:

  • Configure Hermes provider credentials first with hermes model, or set them in ~/.hermes/.env / ~/.hermes/config.yaml.

JetBrains

Use an ACP-compatible plugin and point it at hermes acp or hermes-acp.

Buzz Desktop

Buzz ↗ ships Hermes Agent as a preset runtime. With Hermes installed the normal way, Buzz discovers it automatically — open Settings → Runtimes and Hermes appears under your runtimes.

If discovery fails (older installs), make sure the ACP launcher resolves on a login-shell PATH:

Shellسطر واحد
command -v hermes-acp || command -v hermes

Recent installs write both hermes and hermes-acp launchers into ~/.local/bin; running hermes update adds the hermes-acp launcher to older installs. As a manual fallback, configure Buzz's agent command as hermes with args ["acp"].

Model picker

Buzz Desktop (v0.5.1+) renders Hermes' full model menu in the agent's runtime settings. The list comes from Hermes itself over ACP: it shows every model from providers you have authenticated in Hermes (the same inventory behind hermes model and the /model command), so a model missing from the menu means its provider has no credentials configured on the Hermes side.

Entry IDs take the form provider:model (e.g. openrouter:z-ai/glm-5.1), or custom:<name>:<model> for custom OpenAI-compatible endpoints defined in config.yaml. Picking a model applies to that agent's session; it does not change your Hermes-wide default — use hermes model for that.

Keep Buzz agents owner-only

Buzz creates every agent with Who can talk to this agent set to Owner only. Leave it there when the runtime is Hermes.

Two behaviors combine on this path. The hermes-acp toolset includes terminal and execute_code, and Buzz's ACP bridge answers Hermes' permission requests itself with allow_once rather than surfacing them. A Hermes agent in Buzz therefore runs shell commands on the host without prompting. I asked one to run rm -rf against a scratch directory and it deleted it, no prompt anywhere.

Selecting Anyone hands that same shell access to every author who can reach the channel. Buzz does not warn when you pick it.

Neither of the obvious mitigations works today:

  • approvals.mode: manual does make Hermes raise the permission request, but Buzz auto-approves it and the command still runs.
  • platform_toolsets.acp does not narrow the ACP toolset, so it cannot be used to drop terminal.

!shutdown from the owner stops the agent in any mode, and Buzz ignores that command from everyone else.

Configuration and credentials

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

ACP mode uses the same Hermes configuration as the CLI:

  • ~/.hermes/.env
  • ~/.hermes/config.yaml
  • ~/.hermes/skills/
  • ~/.hermes/state.db

Provider resolution uses Hermes' normal runtime resolver, so ACP inherits the currently configured provider and credentials. Hermes also advertises a terminal auth method (--setup) for first-run ACP clients; this opens Hermes' interactive model/provider setup.

Host integration

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

These variables are set by an ACP host process (an editor or another agent harness) on the Hermes subprocess it spawns. They are not user configuration — do not set them by hand in .env or config.yaml.

VariableValueEffect
HERMES_ACP_SKIP_CONFIGURED_MCP1Skip starting the globally configured MCP servers from config.yaml before the ACP JSON-RPC loop begins.

Hermes normally starts every MCP server configured in config.yaml before it enters the ACP JSON-RPC loop. A host that owns MCP itself — passing the session's servers explicitly through session/new — does not need that global startup, and an unrelated slow or interactive MCP server would otherwise delay initialize. Setting the marker to exactly 1 lets such a host skip it.

Only the global config.yaml discovery is skipped. **MCP servers supplied by the ACP session through session/new are still registered**, so a host loses no capability it asked for. Any other value (unset, empty, 0, false) keeps the default behavior, so an unrelated truthy-looking string cannot silently disable MCP.

Session behavior

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

ACP sessions are tracked by the ACP adapter's in-memory session manager while the server is running.

Each session stores:

  • session ID
  • working directory
  • selected model
  • current conversation history
  • cancel event

The underlying AIAgent still uses Hermes' normal persistence/logging paths, but ACP list/load/resume/fork are scoped to the currently running ACP server process.

Working directory behavior

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

ACP sessions bind the editor's cwd to the Hermes task ID so file and terminal tools run relative to the editor workspace, not the server process cwd.

Approvals

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

Dangerous terminal commands can be routed back to the editor as approval prompts. ACP approval options are simpler than the CLI flow:

  • allow once
  • allow always
  • deny

Whether you actually see a prompt is up to the host. A host is free to answer the request programmatically instead of showing it to you, in which case these options exist on the wire but never reach a human. Buzz Desktop does this, so treat that path as unattended execution regardless of your approvals setting.

On timeout or error, the approval bridge denies the request.

Session-scoped edit auto-approval

ACP exposes a third tier between allow once and allow always: Allow for session. Picking it from the editor's permission prompt records the approval inside the current ACP session only — every subsequent matching command in that session goes through without prompting, but a new ACP session (or restarting the editor) resets the slate and re-prompts the first time.

OptionEditor labelScopePersisted across restarts
allow_onceAllow onceThis one tool callNo
allow_sessionAllow for sessionAll matching calls in this ACP sessionNo — cleared when the session ends
allow_alwaysAllow alwaysAll future sessionsYes (written to the Hermes permanent allowlist)
denyDenyThis one tool callNo

allow_session is the right default for an editor workflow where you trust an agent for the duration of a task but don't want to grant a long-lived allowlist entry. The safety trade-off is straightforward: the broader the scope, the less the editor will interrupt you, and the more damage a misbehaving agent (or prompt injection) can do before you notice. Start with allow_once for unfamiliar commands; promote to allow_session once you've seen the agent run the same pattern correctly a few times; reserve allow_always for truly idempotent commands you trust forever (e.g. git status).

The ACP bridge maps these options onto Hermes' internal approval semantics — allow_always writes a permanent allowlist entry the same way the CLI does, while allow_session only affects the in-process approval cache for the current ACP session.

Troubleshooting

قسم لحل المشكلات. ابحث فيه عن العطل الذي يشبه حالتك بدل قراءته كاملًا. الأوامر هنا: hermes acp، hermes model.

ACP agent does not appear in the editor

Check:

  • For manual/local development, verify the host command points to hermes acp.
  • Hermes is installed and on your PATH.
  • The ACP extra is installed (cd ~/.hermes/hermes-agent && uv pip install -e '.[acp]').

ACP starts but immediately errors

Try these checks:

Shell4 أسطر
hermes acp --version
hermes acp --check
hermes doctor
hermes status

Missing credentials

ACP mode uses Hermes' existing provider setup. Configure credentials with:

Shellسطر واحد
hermes model

or by editing ~/.hermes/.env. The terminal auth flow (hermes acp --setup) can also trigger the interactive provider/model setup.

See also

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

اختبار الفهم

4 أسئلة إجاباتها كلها في هذه الصفحة.

كل خيار اسم حقيقي من توثيق Hermes. حتى الخيارات الخاطئة حقيقية، لكنها من صفحات أخرى.

1. في جدول هذا الدرس، ما «Editor label» المقابل لـ«allowonce»؟
2. أي متغير بيئة من التالي يظهر فعليًا في هذا الدرس؟
3. أي عنوان من التالي لا يظهر في هذا الدرس؟
4. أي مفتاح إعداد يظهر في أمثلة هذا الدرس؟