hermes gateway platform for deltachat. With support for documents, voice messages, webxdc mini app generation and even voice calls.
  • Python 99%
  • Nix 0.7%
  • Makefile 0.3%
Find a file
Simon Laux 79cd8e81ad
Merge pull request #2 from fastfinge/fix/accept-is-reconnect-kwarg
fix: accept is_reconnect kwarg on connect()
2026-07-13 18:10:39 +02:00
docs chore: drop [LIFECYCLE] call diagnostics; document dedicated-loop fix 2026-06-08 14:14:36 +02:00
skills/webxdc-converter docs: clarify xdc must be ZIP not tar.gz 2026-06-05 19:55:08 +02:00
tests feat: voice calls (incoming + outgoing) via aiortc WebRTC bridge 2026-06-08 14:06:04 +02:00
vendor feat: voice calls (incoming + outgoing) via aiortc WebRTC bridge 2026-06-08 14:06:04 +02:00
.gitignore chore: rename plugin deltachat → deltachat-platform, drop result symlink 2026-06-05 05:25:17 +02:00
__init__.py feat: webxdc delivery via standard MEDIA pipeline 2026-06-05 19:10:26 +02:00
adapter.py fix: accept is_reconnect kwarg on connect() 2026-07-03 00:13:31 -04:00
Agents.md feat: working voice/image pipeline, read receipts, RPC tools, STT/TTS 2026-06-05 15:17:33 +02:00
call_handler.py chore: drop [LIFECYCLE] call diagnostics; document dedicated-loop fix 2026-06-08 14:14:36 +02:00
CLAUDE.md feat: working voice/image pipeline, read receipts, RPC tools, STT/TTS 2026-06-05 15:17:33 +02:00
deltachat-rpc-openrpc.json chore: rename plugin deltachat → deltachat-platform, drop result symlink 2026-06-05 05:25:17 +02:00
flake.lock initial commit 2026-06-05 03:26:08 +02:00
flake.nix feat: voice calls (incoming + outgoing) via aiortc WebRTC bridge 2026-06-08 14:06:04 +02:00
LICENSE initial commit 2026-06-05 03:26:08 +02:00
Makefile initial commit 2026-06-05 03:26:08 +02:00
plugin.yaml feat: working voice/image pipeline, read receipts, RPC tools, STT/TTS 2026-06-05 15:17:33 +02:00
README.md feat: voice calls (incoming + outgoing) via aiortc WebRTC bridge 2026-06-08 14:06:04 +02:00
setup.py fix: pass rpc_server path to IOTransport; guard close() before start() 2026-06-05 05:32:13 +02:00

Delta Chat × Hermes — Your AI Assistant

A Hermes Agent plugin that adds Delta Chat as a gateway channel — so you can reach your AI by text, voice message, or live voice call from a decentralized encrypted messenger that needs no phone number or sign-up.


Why Delta Chat?

Delta Chat is a decentralized private messenger with end-to-end encryption, and a great choice for running a personal AI assistant:

  • Private — instant onboarding with no phone number, email, or other personal data required
  • No API key dance — no BotFather, no token registration, no webhook setup; you own the account
  • End-to-end encrypted — audited encryption safe against network and server attacks
  • Every platform — Android, iOS, macOS, Windows, Linux (even mobile Linux phones and FreeBSD)
  • Sovereign — run it with your own email address or server, or use a public chatmail relay
  • FOSS — fully open source, built on internet standards

What can you do with it?

Talk to your AI like a person:

  • Send text messages and get AI replies
  • Send voice clips — automatically transcribed; the AI responds in text
  • Share images and files for the AI to analyze or process
  • Have full voice calls — call the AI, speak naturally, get a spoken response in real-time (WebRTC, Whisper STT, TTS)

Let the AI reach out to you:

  • Hermes has built-in cron scheduling — set this chat as your home channel and scheduled tasks deliver here: daily briefings, reminders, status updates, without any user prompt
  • The AI can place outgoing voice calls from those scheduled tasks — it will literally call you

Build things together:

  • Ask the AI to build an interactive webxdc mini-app (.xdc) and it delivers it straight into the chat — no app store, no install, runs locally inside Delta Chat
  • Send PDFs, HTML pages, or any file and the AI will handle them

Advanced:

  • Drop the agent into a group chat to assist everyone
  • Run multiple independent agents with their own Delta Chat accounts
  • Give the AI sandboxed access to the full Delta Chat JSON-RPC API to automate your messaging directly

Quick Start

Prerequisite: Hermes Agent must be installed first.

# 1. Install deltachat-rpc-server
pip install deltachat-rpc-server

# 2. Install aiortc (required for voice calls)
pip install aiortc

# 3. Clone plugin to Hermes
git clone https://github.com/Simon-Laux/hermes-deltachat-platform ~/.hermes/plugins/deltachat-platform

# 4. Enable plugin
hermes plugins enable deltachat-platform

# 5. Run setup — auto-detects your Hermes profiles, creates a Delta Chat account
python ~/.hermes/plugins/deltachat-platform/setup.py

# 6. Start gateway
hermes gateway start

The setup script prints an invite link for your new agent. Scan or tap it in the Delta Chat app on your phone — this is required because Delta Chat enforces end-to-end encryption, and the invite link carries the key fingerprint needed to establish an encrypted session. Adding the address alone won't work.


Features

Deep integration with Delta Chat's native features — voice messages, voice calls, mini-apps, and group chats all work out of the box.

Messaging

  • Bidirectional text, voice messages (auto-transcribed via Hermes STT), images, files, locations
  • Group chat support — drop the agent into any group
  • Read receipts
  • Bot mode: auto-accepts contact requests, no manual approval needed

Voice Calls (WebRTC)

  • Incoming calls: auto-answer, live speech-to-text → AI → text-to-speech pipeline
  • Outgoing calls: the AI can call you from a scheduled task (dc_start_call tool)
  • Barge-in support: interrupt the AI mid-sentence and it adapts
  • Per-call isolated AI session with optional model override and system prompt
  • Optional Voxtral cloud STT for fast (~12s) transcription

Proactive Messaging & Cron

Hermes has built-in cron scheduling. To route scheduled task delivery to a Delta Chat chat, set it as the home channel. From within the chat, type:

/sethome

Or set it manually via env var:

echo 'DELTACHAT_HOME_CHANNEL=<chat_id>' >> ~/.hermes/.env

From there you can schedule daily briefings, reminders, or any recurring task — and the AI can also place outgoing voice calls from those tasks.

Webxdc Mini-Apps

Ask the AI to build a small interactive app (a game, a form, a calculator, a data viewer) and it delivers a .xdc file straight into the chat. The app runs locally inside Delta Chat — no server, no install. Built-in webxdc-converter skill handles the packaging.

Raw Delta Chat API (Advanced)

Three tools are always available once the plugin is loaded:

Tool Description
dc_rpc_spec Full OpenRPC spec from the running server — all methods, params, types
dc_chat_rpc_spec Spec filtered to chat-scoped methods, destructive ops removed
dc_safe_rpc_call Call a chat-scoped method safely — accountId and chatId are injected from an opaque per-chat token; the AI cannot address a different chat

Set DELTACHAT_ENABLE_RAW_RPC=1 to also unlock dc_rpc_call (unrestricted access — only for trusted deployments).


Installation

1. Install dependencies

deltachat-rpc-server

pip (recommended):

pip install deltachat-rpc-server

From source:

git clone https://github.com/chatmail/core
cd core
cargo build -p deltachat-rpc-server --release
# Binary: target/release/deltachat-rpc-server

NixOS:

nix profile install nixpkgs#deltachat-rpc-server
echo 'DELTACHAT_RPC_SERVER=/home/work/.nix-profile/bin/deltachat-rpc-server' >> ~/.hermes/.env

aiortc (required for voice calls)

pip:

pip install aiortc

NixOS (add to your python3.withPackages in flake.nix):

(python3.withPackages (ps: with ps; [ deltachat2 aiortc ]))

aiortc brings in av (PyAV/libav for audio resampling), aioice, and Opus support — all required for the WebRTC call pipeline.

2. (Optional) Configure RPC server path

If the binary is not in PATH:

echo 'DELTACHAT_RPC_SERVER=/path/to/deltachat-rpc-server' >> ~/.hermes/.env

3. Enable Plugin

hermes plugins enable deltachat-platform

4. Create Account

python ~/.hermes/plugins/deltachat-platform/setup.py

The script auto-detects your Hermes profiles, lets you pick one, creates the DC account, and prints an invite link. Scan or tap it in Delta Chat — do not just add the email address manually, as the invite link is required for encrypted key exchange.

5. Start the gateway

hermes gateway start

Configuration

Variable Required Default Description
DELTACHAT_RPC_SERVER No deltachat-rpc-server Path to RPC binary
DELTACHAT_HOME_CHANNEL No Chat ID for cron/proactive delivery (or use /sethome in chat)
DELTACHAT_ENABLE_RAW_RPC No Enable unrestricted dc_rpc_call tool

Multiple Agents

Each Hermes profile gets its own Delta Chat account:

hermes profile create work
hermes profile create personal

hermes -p work gateway start
hermes -p personal gateway start

Documentation


Development

The deltachat2 Python package is vendored in vendor/ to avoid a manual install step. To update it:

  1. Fetch the latest from adbenitez/deltachat2
  2. Copy deltachat2/ contents to vendor/deltachat2/
  3. Test thoroughly — API changes can affect compatibility
  4. Update the minimum version check in adapter.py if needed

License

Mozilla Public License 2.0 (MPL-2.0)


Vibecoding

This project was built with heavy AI assistance — a mix of Claude, Mistral, and OpenCode models did most of the heavy lifting, with Mistral Medium 3.5 and Claude Opus doing the bulk of the work. The human role was management and quality assurance: directing, testing features, and catching what broke. It should be reasonably stable — but this is an experimental community project provided as-is, with no guarantees.


References