hermes - 💡(How to fix) Fix [Feature]: Support multiple QQ Bot instances in a single Hermes daemon [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#14031Fetched 2026-04-23 07:47:15
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Root Cause

Currently, the QQ Bot adapter only supports a single instance because:

  • Environment variables are singular (QQ_APP_ID, QQ_CLIENT_SECRET) — no way to configure a second bot
  • platforms.qq in config.yaml is a single config block, not an array

Code Example

platforms:
  qq:
    instances:
      - name: "bot-primary"
        app_id: "APP_ID_1"
        client_secret: "SECRET_1"
        home_channel: "OPENID_1"
      - name: "bot-secondary"
        app_id: "APP_ID_2"
        client_secret: "SECRET_2"
        home_channel: "OPENID_2"
RAW_BUFFERClick to expand / collapse

Problem or Use Case

I want to connect two different QQ Bot accounts (different App ID / App Secret) to the same Hermes instance, so I can have two independent sessions running in parallel — e.g., one bot for long-running tasks and another for interactive conversation.

Currently, the QQ Bot adapter only supports a single instance because:

  • Environment variables are singular (QQ_APP_ID, QQ_CLIENT_SECRET) — no way to configure a second bot
  • platforms.qq in config.yaml is a single config block, not an array

This is a general limitation that likely applies to other messaging platform adapters as well (Telegram, Discord, etc.).

Proposed Solution

Support multiple named instances per platform in config.yaml:

platforms:
  qq:
    instances:
      - name: "bot-primary"
        app_id: "APP_ID_1"
        client_secret: "SECRET_1"
        home_channel: "OPENID_1"
      - name: "bot-secondary"
        app_id: "APP_ID_2"
        client_secret: "SECRET_2"
        home_channel: "OPENID_2"

Each instance would:

  • Maintain its own WebSocket gateway connection
  • Have its own independent sessions and home channel
  • Be addressable by name for send_message targeting

Environment variables could follow a naming convention like QQ_APP_ID_1 / QQ_APP_ID_2, or QQ_APP_ID_PRIMARY.

Alternatives Considered

  1. Running two separate Hermes instances (different HERMES_HOME) — works but is operationally expensive: duplicate config, separate processes, no shared memory, double maintenance overhead.
  2. Single bot with session isolation — already works per-channel, but does not solve the parallel-interaction use case (user sees one bot window, not two).

Feature Type

Gateway / messaging improvement

Scope

Large (new module or significant refactor)

Contribution

  • I'd like to implement this myself and submit a PR

extent analysis

TL;DR

To support multiple QQ Bot accounts, modify the config.yaml to include multiple instances under the qq platform, each with its own configuration.

Guidance

  • Update the config.yaml file to include an instances array under the qq platform, as proposed in the issue.
  • Ensure each instance has a unique name, app_id, client_secret, and home_channel configuration.
  • Consider updating environment variables to follow a naming convention that supports multiple instances, such as QQ_APP_ID_1 and QQ_APP_ID_2.
  • Review the proposed solution and alternatives to determine the best approach for your specific use case.

Example

platforms:
  qq:
    instances:
      - name: "bot-primary"
        app_id: "APP_ID_1"
        client_secret: "SECRET_1"
        home_channel: "OPENID_1"
      - name: "bot-secondary"
        app_id: "APP_ID_2"
        client_secret: "SECRET_2"
        home_channel: "OPENID_2"

Notes

This solution requires a significant refactor of the existing codebase, and the implementation details may vary depending on the specific requirements and constraints of the project.

Recommendation

Apply the proposed workaround by modifying the config.yaml file to support multiple instances per platform, as this approach seems to be the most feasible and efficient solution for supporting multiple QQ Bot accounts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature]: Support multiple QQ Bot instances in a single Hermes daemon [1 participants]