Help Center/ Huawei Cloud Flexus_Huawei Cloud Flexus L Instance/ Best Practices/ Deploying Hermes Agent/ Building a Personal AI Assistant with Hermes Agent (WhatsApp)
Updated on 2026-05-29 GMT+08:00

Building a Personal AI Assistant with Hermes Agent (WhatsApp)

Scenarios

Hermes Agent is an open-source autonomous AI agent developed by Nous Research and is available under the MIT license. It remembers across sessions, extracts and reuses skills on its own, and switches seamlessly across platforms and models. More than that, it adapts continuously to your habits and iterates its own capabilities.

This section describes how to deploy the Hermes Agent application image on a FlexusL instance and integrate it with Telegram to quickly build a personal AI assistant.

Step 1: Deploy a FlexusL Instance with the Hermes Agent Application Image

You can deploy the Hermes Agent application image on a new or an existing FlexusL instance.

  1. Go to the FlexusL instance purchase page.
  2. Specify required parameters for the FlexusL instance.

    Parameter

    Example

    Description

    Region

    CN-Hong Kong

    For low network latency and quick resource access, select the region nearest to your target users. After a FlexusL instance is created, the region cannot be changed. Exercise caution when selecting a region.

    Application Images

    Hermes Agent

    Select the Hermes Agent application image.

    Instance Specifications

    2 vCPUs | 2 GiB of memory and 60 GiB system disk

    Select appropriate instance specifications based on your service requirements.

    Instance Name

    Hermes-Example

    Enter a custom instance name that is easy to identify, for example, Hermes-Example.

    Associated Services (Optional)

    • Data Disk: 10 GiB
    • Host Security
    • Cloud Backup Vault: 70 GB

    You can associate EVS data disks, HSS (basic edition), and cloud backup vaults with your FlexusL instances as needed and set specifications as needed.

    Required Duration

    1 month

    Set the duration of your subscription in the range of 1 month to 3 years.

    Auto-renew is enabled by default, which means the purchased FlexusL instances will be automatically renewed before they expire. If you do not enable auto-renew during the purchase process, you can still enable it later after the instances are created. For more information about auto-renewal rules, see Auto-Renewal Rules.

    Quantity

    1

    Set the number of FlexusL instances to be purchased.

  3. Click Next: Confirm.

    On the displayed page, confirm the order details, read and select the agreement, and click Submit.

  4. Select a payment method and complete the payment.
  5. Go back to the FlexusL console and view the purchased FlexusL instance.
  1. Log in to the FlexusL console and check whether the target FlexusL instance is running the Hermes Agent application image.

  2. Choose > Change OS on the target resource card. Select the Hermes Agent application image and complete the OS change as instructed. After the change is complete and the FlexusL instance status is running, go to the next step.

    Changing the OS clears the data in all partitions of the system disk, including the system partition. Back up data in advance.

Step 2: Integrate WhatsApp into Hermes Agent

  1. Log in to the FlexusL console.
  2. Reset the password for the FlexusL instance.

    A FlexusL instance does not have an initial password. If you want to log in to a FlexusL instance, set a password for it first. If you have already set a password, skip this step.

    On the target resource card, choose > Reset Password to reset the password as instructed.

    For details, see Resetting the Password for a FlexusL Instance.

  3. On the target resource card, click Remote Login. In the displayed dialog box, click Log In via CloudShell.

    The following uses CloudShell as an example. You can also use other remote login tools to connect to the FlexusL instance. For more login methods, see Login Modes.

  4. Enter the username and password to log in to the server. The username is root, and the password is the one set in 2. The following uses EIP as an example.

    Ensure that the remote port (default SSH port: 22) of the CloudShell proxy IP address is allowed in the security group. The CloudShell proxy IP address varies depending on the region. The actual proxy IP address will be displayed on the CloudShell configuration page.

    • If the port is not allowed, perform 5 and then click Connect.
    • If the port is allowed, click Connect. After the connection is successful, go to 6.

    For more information about CloudShell login, see Logging In to a Linux FlexusL Instance Using CloudShell.

  5. Locate the target FlexusL instance card and choose > Configure Security Group Rule. In the displayed dialog box, click Add Rule. Add a rule to allow traffic from the CloudShell proxy IP address to pass through port 22.

  6. After the connection is successful, configure Hermes Agent.
    su - hermes
    hermes setup

    After running this command, use the keyboard to complete the subsequent configurations: use Arrow keys to navigate, Space to select, and Enter to confirm.

  7. Select Quick setup.

  8. Under Select provider, select Custom endpoint (enter URL manually).

  9. Set parameters of the AI model to be configured and press Enter to confirm the settings.
    • API base URL: The API address of the model. Obtain it from the model provider, for example, https://api.openai.com/v1.
    • API key: Used for API authentication. The API key is not displayed after you enter it. Press Enter to go to the next configuration item.
    • Selecting a model: Enter the number or name of the model.
    • Setting the context length. Press Enter to retain the default setting. You can also set the context length as required.
  10. Select Set up messaging now (recommended).

  11. Enter 9 to select the WhatsApp platform and press Enter.

  12. Press Enter again to confirm.

  13. Enter y to enable WhatsApp.

    Enter y to confirm the gateway restart.

  14. Enter y to confirm the session start.

  15. In the session window, if the configured model is returned and the reply is normal after you enter hello, the configuration is complete.

  16. Enter /exit to exit the session.
  17. Configure WhatsApp.
    hermes whatsapp
  18. Select an account setting mode. In this example, enter 2 and press Enter to use your personal WhatsApp account.

  19. Enter the phone number linked to your WhatsApp account.

  20. Use WhatsApp on your phone to scan the QR code.

  21. After the scanning is complete, check the gateway status and restart the gateway.
    hermes gateway
    hermes gateway restart

Step 3: Verify the Bot Conversation

  1. Search for your phone number in WhatsApp.

  2. After finding your account, click Chat to enter the chat box.

  3. Check whether the bot can have a conversation with you. If yes, the integration with WhatsApp is successful.

    Your first conversation with the bot automatically gives you a pairing code.

  4. Return to the server CLI and replace the pairing code with the one sent by the bot.
    Run the following command as the hermes user. If not, use su - hermes to switch to the hermes user.
    hermes pairing approve whatsapp pairing-code

  5. After the pairing is successful, check whether the bot can have a conversation with you. If yes, the integration with WhatsApp is successful.

    If the bot replies with "No home channel is set for Whatsapp", send /sethome in the chat box.