Agentic Research

Hermes Agent Installation and Lark Integration Configuration

2026/05/0918 min readBryan Chan閱讀中文原文
TopicsHermesTools

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

  1. Open the Feishu Open Platform
  2. Create a custom app for your enterprise
  3. Obtain the App ID and App Secret
  4. In Permissions & Scopes, add the required permissions:
    • im:message, send and receive messages
    • im:message.p2p_msg:readonly, read direct messages
    • im:chat:readonly, read group chat information
    • contact: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 messages
    • im.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:

  1. Recursively scan the OpenClaw directory
  2. Read key files (README, configuration files, source code structure)
  3. Build a project map and store it in memory
  4. 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


Troubleshooting

IssueSolution
Bot does not reply to messagesCheck whether the event subscription URL of the Feishu Open Platform is reachable
Insufficient permissionsConfirm that the application has obtained the necessary permissions such as im:message
Hermes cannot read OpenClawCheck whether the projects.openclaw.path path is correct
Feishu Webhook timeoutConfirm that the server firewall allows Feishu IP ranges