Skip to main content

Multi-user RBAC for Hermes

This plugin keeps per-platform, per-channel roles and preferences so Hermes can enforce owner/user/guest permissions and personalize responses. It stores all state in ~/.hermes/plugins/multi-user-rbac/data/users.db and wires hooks/tools/commands following the Hermes plugin guide.

Installation

  1. Copy this directory to ~/.hermes/plugins/multi-user-rbac/.
  2. Optional: install the Python dependencies (Hermes already bundles sqlite3, but you need PyYAML for owner configuration):
    pip install pyyaml
    
  3. Restart Hermes. You should see multi-user-rbac in /plugins and a new set of tools/commands.

Configuration

Create ~/.hermes/plugins/multi-user-rbac/config.yaml to tell the plugin who the owners are:

owner:
  telegram:
    - 123456789  # replace with your Telegram ID
  discord:
    - 987654321  # replace with your Discord ID

Owner IDs are promoted automatically on first interaction. No config file means everyone starts as guest.

Tools

Tool Description Role access
identify_user Returns the current session user identity (platform, display name, role). Everyone
get_user_preference Reads a preference (global or channel-scoped) for the caller. Owner/User
set_user_preference Stores a preference for the caller (optional channel_id). Owner/User
set_channel_preference Owners set channel-wide defaults. Owner only
list_channel_users Lists channel members and their roles; auto-refreshes membership when users join. Owner/User
promote_user / demote_user Owner-only tools to change another member’s role. Owner only

Hooks

  • on_session_start: identifies who is speaking, auto-promotes owners, records channel membership.
  • pre_llm_call: injects a short summary of the current user + recent preferences into every turn.
  • post_tool_call: logs all tool usage, records denied access attempts for auditing.
  • on_session_finalize: clears per-session context so new sessions start clean.

Commands

  • /users: owner-only list of channel members (mirrors list_channel_users).
  • /promote <platform_user_id>: owner-only; promotes the chosen member to user.
  • /demote <platform_user_id>: owner-only; demotes the chosen member to guest.
  • /set-for <platform_user_id> <key> <value>: owner-only; set preferences on behalf of someone else.

Testing

Run the bundled tests with pytest tests. The suite covers storage, permission checks, and the tool handlers so you can safely refactor the RBAC rules.

Packaging & release

  1. Run ./build_release.sh (or python3 -m build --outdir dist) from the plugin root; a wheel and sdist land in dist/.
  2. Install the release locally with pip install dist/multi_user_rbac-0.1.0-py3-none-any.whl or publish dist/ to PyPI/Nexus.
  3. Hermes auto-discovers the plugin when multi-user-rbac is installed via an entry point ([project.entry-points."hermes_agent.plugins"] in pyproject.toml). Restart Hermes after installation.

Next steps

  1. Wire the plugin into your agent by placing it under ~/.hermes/plugins/ and restarting Hermes.
  2. Keep config.yaml in sync with the owners you trust; the plugin auto-promotes them on first use.
  3. Extend tools/commands if you need more automation (e.g., CLI commands or skills).

Metadata

Release files for multi-user-rbac 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multi-user-rbac 0.1.1
File Size Uploaded Provenance Actions
multi_user_rbac-0.1.1.tar.gz 11.6 kB Without provenance Details for multi_user_rbac-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multi-user-rbac 0.1.1
File Interpreter ABI Platform Actions
multi_user_rbac-0.1.1-py3-none-any.whl Python 3 none any Details for multi_user_rbac-0.1.1-py3-none-any.whl

Total release size: 22.4 kB

Release files / multi_user_rbac-0.1.1.tar.gz

Download URL multi_user_rbac-0.1.1.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5bf894488632754e40485897140000b378d6af68847576d5617f4895d5beb4a3
BLAKE2b-256 checksum
How to use checksums
4792f8dbc7a7f99b336fe7f549586029658b22085bf8a5962f7dd06142908d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / multi_user_rbac-0.1.1-py3-none-any.whl

Download URL multi_user_rbac-0.1.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7592da347241221a4daef72759c8c165f0329a289def30a49c9dcc6729be3fc
BLAKE2b-256 checksum
How to use checksums
c76ef7888dd220c1bff80fff2d3c8d9ba065dc1e28b325a3da562ecc61caeff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for multi-user-rbac 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page