Hermes Agent plugin — Discord user identity cards for the orchestration harness. Provides tools to look up, create, and update user card metadata based on Discord user IDs.
Find a file
BarnacleBoy 254fd34577 fix: auto-create user cards from sender_id kwarg in pre_llm_call hook
The hook was reading from a nonexistent 'messages' positional arg and
trying to find user_id in message dicts. The actual invocation from
agent/turn_context.py passes sender_id as a keyword argument.

- Extract on_pre_llm_call to module level for testability
- Accept **kwargs and read sender_id, user_message, conversation_history
- Auto-create card for sender if unknown
- Resolve @mentions in both user_message and conversation_history
- 4 new tests covering sender creation, known-sender skip,
  mention resolution, and no-sender-id graceful handling
2026-08-28 14:40:08 +00:00
tests fix: auto-create user cards from sender_id kwarg in pre_llm_call hook 2026-08-28 14:40:08 +00:00
.gitignore Initial commit: Hermes Agent plugin for Discord user identity cards 2026-06-30 18:49:26 +00:00
__init__.py fix: auto-create user cards from sender_id kwarg in pre_llm_call hook 2026-08-28 14:40:08 +00:00
plugin.yaml Auto-create stub cards for unknown Discord users (#1) 2026-07-08 21:00:47 +00:00
README.md Auto-create stub cards for unknown Discord users (#1) 2026-07-08 21:00:47 +00:00

discord-user-cards

Hermes Agent plugin — Discord user identity cards for the orchestration harness.

Provides tools to look up, create, and update user metadata by Discord user ID. Cards are stored as JSON at ~/.hermes/data/discord-user-cards/cards.json.

New in 1.1.0: Cards are auto-created for unknown users when they're encountered in conversation. The pre_llm_call hook now:

  • Detects the message sender and creates a stub card if they're unknown
  • Resolves all @mentions in the message text, creating stub cards for any unknown IDs
  • Injects resolved identities into the LLM context before every turn

This means cards "happen automagically" — you only need to manually create/update cards when you want to add descriptive prose about a user.

Tools

Tool Description
lookup_user Look up a user's identity card by Discord user ID
create_user_card Create a new identity card for a user
update_user_card Update fields on an existing card
search_users Search user cards by keyword
list_all_users List all known users (summary)

Card Format

{
  "user_id": "376744299783651331",
  "username": "jezzzzzzzzzz",
  "display_name": "Jez",
  "type": "human",
  "card": "Prose description...",
  "maintained_by": "discord-user-cards",
  "version": 1,
  "updated_at": "2026-06-30T00:00:00Z"
}

Development

Clone from Forgejo and symlink into ~/.hermes/plugins/:

git clone git@git.jezzahehn.com:KrustyPlanet/discord-user-cards.git
ln -s $(pwd)/discord-user-cards ~/.hermes/plugins/discord-user-cards

Restart Hermes and enable the plugin:

hermes plugins enable discord-user-cards