shawn 3ddf8170f8 feat: Matrix connector core — rooms, messaging, sync
- rooms: create, join, leave, forget, list, resolve alias, get info/members,
  invite/kick/ban/unban, set name/topic. RoomInfo/MemberInfo/PowerLevels dataclasses.
- messaging: send text (with HTML, reply, thread), notice, emote, image, file,
  sticker, edit, redact, react, typing, read receipts, fully-read markers.
- sync: SyncEngine with event-type/room/global handler dispatch,
  incremental sync with backoff retry, SyncFilter, paginated message history.
- CLI: rooms (list/create/join/leave/info/members/invite), send (text/image/file),
  sync (listen with filters).
- 182 tests pass (60 existing + 122 new).
2026-05-23 12:07:10 -04:00

Matrix-Hermes

Matrix authentication and client integration for Hermes Agent.

Overview

matrix-hermes provides authentication, client connectivity, and bridge utilities for integrating Hermes Agent with the Matrix protocol. Works with any Matrix homeserver (self-hosted or matrix.org).

Features

  • Authentication: Login with password or access token, device registration
  • Client: Async Matrix client wrapping mautrix SDK
  • CLI: Command-line tools for authentication setup and token management
  • Config: .env-based configuration compatible with Hermes gateway

Quick Start

pip install -e .
matrix-hermes login --homeserver https://matrix.org --user @bot:matrix.org

Environment Variables

Variable Description
MATRIX_HOMESERVER Homeserver URL
MATRIX_ACCESS_TOKEN Access token (preferred)
MATRIX_USER_ID Full user ID (@user:server)
MATRIX_PASSWORD Password (alternative auth)
MATRIX_DEVICE_ID Stable device ID for E2EE
MATRIX_ENCRYPTION Enable E2EE (true/false)

Project Structure

matrix-hermes/
├── pyproject.toml
├── README.md
├── src/
│   └── matrix_hermes/
│       ├── __init__.py
│       ├── auth.py       # Login, token, device management
│       ├── client.py     # Async Matrix client wrapper
│       ├── config.py     # Configuration from env/file
│       └── cli.py        # CLI entry point
└── tests/
    ├── conftest.py
    ├── test_auth.py
    └── test_client.py

License

MIT

S
Description
Matrix-Hermes authentication & client
Readme 96 KiB
Languages
Python 100%