hermes - 💡(How to fix) Fix [Feature Request] Support profile isolation via separate MySQL databases in memory-tencentdb

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…

Fix Action

Fix / Workaround

Current workaround

RAW_BUFFERClick to expand / collapse

Problem

The memory-tencentdb plugin currently supports only a single MySQL database + single data directory. When Hermes runs with multiple profiles, each profile may want to use memory-tencentdb but they end up sharing the same database and gateway, causing port conflicts and data mixing.

Current workaround

Users must either:

  • Use different memory providers for different profiles
  • Run multiple gateway processes on different ports (resource-heavy)
  • Manually manage data directory isolation

Proposed solution: Per-profile MySQL database isolation

Instead of one database per Hermes installation, use one database per profile:

  • Single gateway process: One Node gateway process serves all profiles on a single port
  • MySQL database per profile: memory_<profile> (e.g., memory_main, memory_tinka)
  • Profile-aware connection string: Gateway reads HERRMES_PROFILE env var to select database
  • Backward compatible: Default profile uses existing database name

Implementation sketch

  1. Gateway startup: detect HERMES_PROFILE env var (defaults to main)
  2. On connect: use memory_<profile> as the MySQL database name
  3. Each profile's L1/L2/L3 data lives in its own database — fully isolated
  4. No port juggling needed — single gateway, single port

Benefits

CurrentWith this change
Gateway processesN profiles = N processes1 process for all profiles
Port usageOne per profileSingle port
Data isolationFile/directory levelDatabase level
Resource usageO(profiles)O(1)
Management分散Centralized

Alternative considered (per-profile gateway)

Separate gateway per profile with different ports. More resource-intensive and harder to manage — the per-database approach above is cleaner.

Use case example

  • Main profile: connects to MySQL database memory_main
  • Profile "tinka": connects to MySQL database memory_tinka

Both share the same gateway binary and port, but are fully isolated at the database level.

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