hermes - 💡(How to fix) Fix 🚀 Feature Request: Multi-User Preference Memory [3 comments, 3 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#17254Fetched 2026-04-30 06:48:48
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×3
RAW_BUFFERClick to expand / collapse

项目: NousResearch/hermes-agent 现状 Hermes Agent 的 memory 工具有 user(用户档案)和 memory(我的笔记)两个分区,但整个会话共享一份用户档案,没有按用户 ID 做隔离。 在群组/频道场景下(Feishu、Discord、Telegram 等),多个用户同时与同一个 Agent 交互,Agent 知道谁在说话(每条消息带 user_id),但偏好记忆混杂在一起,A 的偏好可能影响对 B 的回复。 期望 按用户 ID 隔离偏好存档 — memory 工具支持 user_id 参数,不同用户的偏好互不干扰 每个用户独立存储 — 用户 A 的偏好(如"叫我小A,喜欢简短回复")不影响用户 B 的回复风格 按需存档 — Agent 可以选择只持久化特定用户的偏好,对临时用户仅做即时响应,不留存档 向下兼容 — 不设 user_id 时沿用当前单用户行为 收益 群组场景下每个用户获得一致的个性化体验 Agent 不会把张三的偏好套用到李四身上 适合家庭群、团队频道、客服等多用户场景 实现思路参考 在 memory 工具参数中增加可选的 user_id 字段 后端存储时附加 user_id 作为过滤条件(SQLite 加一列,或 Honcho/Mem0 按用户隔离) 调用时根据当前消息的 user_id 自动注入对应用户的偏好记忆

extent analysis

TL;DR

Modify the memory tool to include an optional user_id parameter for isolating user preferences.

Guidance

  • Add a user_id field to the memory tool parameters to allow for user-specific preference storage.
  • Update the backend storage to include the user_id as a filtering condition, such as adding a column to the SQLite database or using user-isolated storage with Honcho/Mem0.
  • Implement automatic injection of the corresponding user's preferences based on the user_id in the current message.
  • Ensure backward compatibility by defaulting to the current single-user behavior when no user_id is provided.

Example

# Example of modified memory tool function
def get_user_preferences(user_id=None):
    if user_id:
        # Fetch preferences from storage using user_id as filter
        preferences = storage.get_preferences(user_id)
    else:
        # Default to current single-user behavior
        preferences = storage.get_preferences()
    return preferences

Notes

The implementation details may vary depending on the specific storage solutions (e.g., SQLite, Honcho/Mem0) and the existing codebase.

Recommendation

Apply the workaround by modifying the memory tool to include the user_id parameter, as it provides a clear solution to the issue of shared user preferences in multi-user scenarios.

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 Request: Multi-User Preference Memory [3 comments, 3 participants]