Hermes Agent Installation and Lark Integration Configuration
What Is Hermes Agent?
Hermes Agent is a multi-channel AI communication agent that supports platforms such as Feishu/Lark, WhatsApp, WeChat, Telegram, and others. In a three-layer framework, it serves as the communication layer.
Step 1: Install Hermes Agent
# Via Homebrew (Recommended)
brew install hermes-agent
# Or via npm
npm install -g hermes-agent
Verify the installation:
hermes --version
Step 2: Initialize Configuration
hermes init
This creates a configuration directory under ~/.hermes/:
~/.hermes/
├── config.yaml # Main configuration
├── auth.json # Authentication information
├── profiles/ # Multi-identity configuration
├── skills/ # Custom skills
└── sessions/ # Conversation records
Step 3: Configure the Feishu Lark Bot
3.1 Create an App in the Feishu Open Platform
- Open the Feishu Open Platform
- Create a custom app for your enterprise
- Obtain the App ID and App Secret
- In Permissions & Scopes, add the required permissions:
im:message, send and receive messagesim:message.p2p_msg:readonly, read direct messagesim:chat:readonly, read group chat informationcontact:user.id:readonly, read user information
3.2 Configure Event Subscriptions
In the Feishu Open Platform, go to Event Subscriptions:
- Request URL:
https://your-server.com/hermes/webhook - Subscribed events:
im.message.receive_v1, receive messagesim.message.reaction.created_v1, emoji reactions
3.3 Configure the Feishu Channel in Hermes
Edit ~/.hermes/config.yaml:
channels:
lark:
enabled: true
app_id: "cli_xxxxxxxxxxxx"
app_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxx"
verification_token: "xxxxxxxxxxxx"
encrypt_key: "xxxxxxxxxxxx" # Optional
bot_name: "Junze Think Tank Agent"
Step 4: Launch Hermes Agent
# Run in the foreground (development mode)
hermes serve --channel lark
# Run in the background
hermes serve --channel lark --daemon
# Enable multiple channels at the same time
hermes serve --channel lark,whatsapp,wechat
After successful startup, find your Bot in Feishu and send /ping to test:
You: /ping
Bot: pong! Hermes Agent v1.x.x, channels: lark
Step 5: Have Hermes Read the OpenClaw Project
This is a critical step that enables Hermes Agent to understand OpenClaw's project structure so it can later serve in an operations and maintenance role.
5.1 Configure the Project Path
In ~/.hermes/config.yaml:
projects:
openclaw:
path: "/path/to/OpenClaw"
description: "OpenClaw main project: AI Agent orchestration framework"
watch: true # Watch file changes
5.2 Trigger Hermes to Read the Project
Send in Feishu:
Please read all files and structure of the OpenClaw project in detail; I need you to understand this project for subsequent maintenance work.
Hermes Agent will:
- Recursively scan the OpenClaw directory
- Read key files (README, configuration files, source code structure)
- Build a project map and store it in memory
- Reply with confirmation: "I have read the OpenClaw project, with X files and Y directories in total. I understand the project's core architecture."
5.3 Verification
Send a test question:
What is OpenClaw's configuration entry file?
How does OpenClaw manage Skills?
Hermes should be able to answer accurately, indicating that it has successfully "understood" the project.
Step 6: Set Up Daily Communication
Shortcuts
Configure common shortcuts in Hermes:
shortcuts:
status:
command: "hermes status"
description: "View Agent status"
projects:
command: "hermes project list"
description: "List known projects"
memory:
command: "hermes memory search"
description: "Search memory"
Scheduled Reports
Configure Hermes to send scheduled status reports in the Lark group:
cron:
- schedule: "0 9 * * *"
channel: "lark"
chat_id: "oc_xxxxxxxxxxxx"
message: "Good morning! Today Agent status is normal. Yesterday, X tasks were processed."
Example Use Cases
Scenario 1: Feishu Group Chat AI Assistant
Deploy Hermes Agent in Feishu group chats, allowing team members to ask questions at any time while the AI automatically responds to common questions, queries data, and generates reports.
Scenario 2: Automated Morning Report
Trigger Hermes Agent via cron on a schedule to send a daily status report to a Feishu group, including task completion status and to-do items.
Scenario 3: Automatic Knowledge Base Updates
Hermes Agent listens for Feishu document change events, automatically updates the knowledge base index, and generates a change log.
Reference Resources
- Feishu Open Platform Documentation, Feishu API and event subscription guide
- Hermes Agent Source Code, Hermes Agent configuration and extensions
- OpenClaw Feishu Plugin, OpenClaw Feishu integration documentation
Troubleshooting
| Issue | Solution |
|---|---|
| Bot does not reply to messages | Check whether the event subscription URL of the Feishu Open Platform is reachable |
| Insufficient permissions | Confirm that the application has obtained the necessary permissions such as im:message |
| Hermes cannot read OpenClaw | Check whether the projects.openclaw.path path is correct |
| Feishu Webhook timeout | Confirm that the server firewall allows Feishu IP ranges |
More in Tools
- PaddleOCR in Practice: Extracting Hong Kong Stock Annual Report Financial Data in 83 Seconds
- Webb-Site: The Essential Hidden Treasure for Hong Kong Stock Research, a One-Click Tool to Get Annual Report PDFs for All Listed Companies
- Academic Research Skills Deep Technical Breakdown: How 45+ Agents Collaborate to Complete the Full Workflow from Literature Review to Peer Review
- AI Engineering from Scratch Deep Dive: 435 Lessons × 20 Stages