by sawyer-shi · v0.0.1
Connect to your Hermes Agent for text、skill and image conversations with conversation-level or user-level context retention. 【Click Details for setup instructions】.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
A Dify tool plugin that connects Dify to a self-hosted Hermes Agent API Server through Hermes' OpenAI-compatible HTTP API. It supports text chat, conversation-level and user-level context retention, Dify uploaded image inputs, and interaction with Hermes Agent skills and tools.
Simplified Chinese documentation is provided through Dify Marketplace multilingual README support.
GET /v1/models/v1/responses tool invocationinput_imageEdit ~/.hermes/.env and add or merge the following API Server configuration. Replace YOUR_HERMES_API_SERVER_KEY with your own token:
API_SERVER_ENABLED=true
API_SERVER_KEY=YOUR_HERMES_API_SERVER_KEY
# Optional. Keep loopback when Dify and Hermes run in the same host process environment.
API_SERVER_HOST=127.0.0.1
API_SERVER_PORT=8642
Start Hermes Gateway:
hermes gateway
You should see a message similar to:
[API Server] API server listening on http://127.0.0.1:8642
Install the plugin package in Dify.
Configure provider credentials in Dify:
Base URL: Hermes API Server base URL 【default http://127.0.0.1:8642/v1,or http://host.docker.internal:8642/v1】API Key: Hermes API_SERVER_KEYModel: Hermes API Server model name, usually hermes-agentTimeout: optional request timeout, default 600Choose a tool:
hermes_chat: conversation-level contexthermes_user_chat: user-level contextSend text, optionally with Dify uploaded image files.
POST /v1/responses to interact with Hermes Agent.GET /v1/models.files image objects and forwards them as base64 input_image inputs.session_key, conversation_id, or user_id as LLM-controllable tool parameters.hermes_chat)Conversation-level Hermes context retention.
messageupload_files for images onlyhermes_user_chat)User-level Hermes context retention across Dify conversations.
messageupload_files for images onlyinput_textinput_imageBefore using this plugin, enable Hermes Agent API Server.
Required endpoint:
POST /v1/responsesRequired endpoint for Dify credential validation:
GET /v1/modelsOptional compatibility endpoint, not used by this plugin:
POST /v1/chat/completionsRecommended .env for Docker Desktop or controlled private-network access:
API_SERVER_ENABLED=true
API_SERVER_KEY=YOUR_HERMES_API_SERVER_KEY
API_SERVER_HOST=0.0.0.0
API_SERVER_PORT=8642
If Dify and Hermes run in the same host process environment, loopback is enough:
API_SERVER_ENABLED=true
API_SERVER_KEY=YOUR_HERMES_API_SERVER_KEY
API_SERVER_HOST=127.0.0.1
API_SERVER_PORT=8642
Use API_SERVER_HOST=127.0.0.1 when only local access is needed.
Use API_SERVER_HOST=0.0.0.0 or a private interface address only when Docker, LAN, VPN, tailnet, or another private ingress needs to reach Hermes.
Do not expose Hermes API Server directly to the public internet. The API server can access the agent's tools, so protect it with a strong API_SERVER_KEY and private networking.
| Field | Required | Example | Description |
|---|---|---|---|
Base URL | Yes | http://127.0.0.1:8642/v1 | Hermes API Server base URL. It may include /v1; the plugin normalizes it internally. |
API Key | Yes | YOUR_HERMES_API_SERVER_KEY | Hermes API Server bearer token configured as API_SERVER_KEY. |
Model | Yes | hermes-agent | Hermes API Server model name returned by /v1/models. |
Timeout | No | 600 | Request timeout in seconds. Valid range is 1-600; invalid values fall back to 600. |
Base URL examples by deployment:
| Deployment | Dify Base URL | Required Hermes API Server bind |
|---|---|---|
| Same host, no Docker | http://127.0.0.1:8642/v1 | API_SERVER_HOST=127.0.0.1 |
| Dify in Docker Desktop, Hermes on host | http://host.docker.internal:8642/v1 | API_SERVER_HOST=0.0.0.0 or host LAN/private address |
| Dify on another LAN machine | http://<Hermes-host-LAN-IP>:8642/v1 | API_SERVER_HOST=0.0.0.0 or Hermes host LAN IP |
| VPN / tailnet private deployment | http://<Hermes-private-name-or-IP>:8642/v1 | Hermes VPN/tailnet bind or reachable private address |
| SSH tunnel or reverse proxy | tunnel/proxy URL, for example http://127.0.0.1:<local-port>/v1 | Hermes can remain on API_SERVER_HOST=127.0.0.1 |
If Dify reports Failed to establish a new connection, Connection refused, or provider validation timeout, the Dify plugin runtime cannot reach the configured Base URL. The most common cause is using http://127.0.0.1:8642/v1 inside Docker while Hermes is running on the host loopback address.
Both tools expose the same parameters.
| Parameter | Required | Form | Example | Description |
|---|---|---|---|---|
message | Yes | llm | Summarize this project. | Current user message sent to Hermes. |
upload_files | No | llm | Dify uploaded image file objects | Uploaded images. The plugin sends them as base64 input_image Responses parts. |
The plugin does not expose session routing parameters as tool inputs. Hermes conversation keys are derived from Dify runtime metadata and sent through the Hermes Responses API conversation field with store=true.
Supported uploaded image MIME types:
image/jpegimage/pngimage/gifimage/webpimage/heicimage/heifUnsupported in this version:
Uploaded image validation before forwarding to Hermes:
8 uploaded images per tool call.10MB.12MB.Text:
message: Summarize what you can do in this Hermes workspace.
Direct Dify image upload:
message: Analyze the uploaded screenshot and list action items.
upload_files: <Dify uploaded image files>
requirements.txtstream=false through the Responses API.https://github.com/sawyer-shihttps://github.com/sawyer-shi/dify-plugins-hermes_agent_chatThis project is licensed under Apache License 2.0. See LICENSE file for full license text.
Ready to connect Dify with Hermes Agent?