hermes-yandex-calendar
Let your Hermes Agent run your Yandex Calendar. "What's on my calendar next week?" — "Move the standup to Thursday and invite Ann." — "Decline the 4pm." The agent reads and writes real events on your real calendar, over CalDAV, with no third-party service in the middle.
- 📅 Seven tools, one toolset — list, create, update, RSVP, move between calendars, delete, and enumerate the calendars themselves.
- 🔒 You choose what it may touch — restrict it to specific calendars, and to
specific actions (
read,read,write, …). A disallowed action is not in the toolset at all. - 🛟 Careful with your data — recurrence rules, alarms, and properties this plugin does not model survive every edit; an edit that would overwrite someone else's concurrent change is refused; moves copy the resource byte for byte; an event is deleted only after its copy is safely in place.
- 🔑 App password, not your account password — scoped to CalDAV, revocable in one click.
Tested against Hermes 0.19.x, Python 3.11–3.13.
Quick start
# 1. Install into Hermes (alternatively: pip install hermes-yandex-calendar)
hermes plugins install akinfold/hermes-yandex-calendar --enable
# 2. Add your credentials — the app password comes from
# https://id.yandex.ru/security/app-passwords (scope: "Calendar (CalDAV)")
(umask 077 && printf 'YANDEX_CALENDAR_LOGIN=%s\nYANDEX_CALENDAR_APP_PASSWORD=%s\n' \
'you@yandex.ru' 'your-app-password' >> ~/.hermes/.env)
chmod 600 ~/.hermes/.env
Then enable it in ~/.hermes/config.yaml (third-party plugins are off by default):
plugins:
enabled: [yandex_calendar]
That's it. Ask the agent "what do I have tomorrow?" and it will tell you.
The backward-compatible default exposes every action, including delete. For a new or untrusted agent setup, start with
YANDEX_CALENDAR_ACTIONS=read— see Security boundaries.
The tools
Up to seven standalone tools, in the yandex_calendar toolset:
| Tool | Purpose |
|---|---|
yandex_calendar_list_calendars |
List the calendars the plugin can use (name + href). |
yandex_calendar_list_events |
List events in a time range (summary, start/end, location, description, attendees, busy status, and an href). |
yandex_calendar_create_event |
Create an event (summary, start, optional end/location/description/all-day, attendees, busy status, target calendar). |
yandex_calendar_update_event |
Edit an event by href: change fields, add/remove attendees, toggle busy/free. Recurrence rules and alarms are preserved, and a concurrent change by someone else is refused rather than overwritten. |
yandex_calendar_respond_event |
Respond to a meeting invitation — accept, decline, or tentatively accept. |
yandex_calendar_move_event |
Move an event to another calendar, contents intact. |
yandex_calendar_delete_event |
Delete an event by href. |
Yandex Calendar has no public REST API, so this plugin speaks CalDAV
(https://caldav.yandex.ru) directly — the same protocol Yandex's own docs point
third-party clients at. Nothing is proxied through anyone else's servers.
Multiple calendars
Every tool that reads or writes events takes an optional calendar argument — a
calendar name (as returned by yandex_calendar_list_calendars) or its href.
Omit it to use the default (first) calendar. update, move, and delete identify
the event by its href, which already encodes the calendar it lives in.
Restrict which calendars the plugin may touch with YANDEX_CALENDAR_CALENDARS; the
first one in that list becomes the default.
Configuration
| Env var | Required | Default | Meaning |
|---|---|---|---|
YANDEX_CALENDAR_LOGIN |
yes | — | Yandex login / email. |
YANDEX_CALENDAR_APP_PASSWORD |
yes | — | App password for CalDAV — an account password will not work. |
YANDEX_CALENDAR_BASE_URL |
no | https://caldav.yandex.ru |
HTTPS override for self-hosted / testing. |
YANDEX_CALENDAR_CALENDARS |
no | (all) | Comma-separated allow-list of calendar names, e.g. Work,Personal. The first is the default calendar. |
YANDEX_CALENDAR_ACTIONS |
no | (all) | Comma-separated allow-list of actions the agent may perform — see below. |
Credentials are read from the environment first, then from ~/.hermes/.env, so they
work in gateway and subprocess runs. Secret values are never logged.
Dates and times are ISO 8601 (2026-07-25 or 2026-07-25T14:00:00+03:00); a datetime
without an offset is treated as UTC.
Restricting what the agent can do
YANDEX_CALENDAR_ACTIONS decides which of the seven tools are registered at all.
A disallowed action is not merely refused at call time: the tool never appears in
the agent's toolset, so it cannot be invoked, and the model is not tempted to try.
Accepted values, comma-separated and case-insensitive — individual actions
(list_calendars, list_events, create_event, update_event, respond_event,
move_event, delete_event), full tool names (yandex_calendar_delete_event), or
the shorthands:
| Shorthand | Expands to |
|---|---|
read |
list_calendars, list_events |
write |
create_event, update_event, respond_event, move_event |
delete |
delete_event |
all |
everything (the default) |
# Look, but don't touch:
YANDEX_CALENDAR_ACTIONS=read
# Full scheduling, but the agent can never delete anything:
YANDEX_CALENDAR_ACTIONS=read,write
# Just enough to answer invitations:
YANDEX_CALENDAR_ACTIONS=list_events,respond_event
Leave it unset for all seven tools. A name that matches nothing is ignored, so a typo can only ever withhold a tool, never grant one — and a value that names nothing recognisable therefore registers nothing at all. The list is applied when the plugin loads: restart Hermes after changing it.
Security boundaries
- CalDAV credentials are sent only to the HTTPS origin configured by
YANDEX_CALENDAR_BASE_URL. Event hrefs pointing to HTTP or another origin are rejected before a request is made. Cross-origin redirects do not receive the authorization header. YANDEX_CALENDAR_CALENDARSapplies to both target calendars and direct event operations (update,respond,move, anddelete). Event paths are canonicalized before the allow-list check and the same canonical path is sent; moves validate both the source and destination calendar.- Calendar titles, descriptions, locations, and attendee names are untrusted input.
A capable agent can still act on misleading event content, so use
readunless the agent and every calendar writer are trusted. Attendees supplied to a tool must be mailbox addresses, while server-provided calendar addresses are preserved for compatible invitation updates. Line breaks are rejected during serialization to prevent CRLF property injection. - Edits are conditional. The plugin writes an event back only if it still matches
the version it read (
If-Matchwith the resource'sETag), so an agent cannot silently overwrite a change you made meanwhile in the Yandex web UI, on a phone, or from another client. When that happens the tool says so and the agent can re-read the event and reapply its change. - The action allow-list limits the tools exposed to Hermes; it does not reduce the privileges of the Yandex app password itself. Use a dedicated app password and, for stronger isolation, a dedicated Yandex account.
The default remains all for compatibility with existing installations. This is a
trusted-agent mode, not the recommended starting point for a new deployment.
Getting the app password
CalDAV does not accept your normal account password.
- Open https://id.yandex.ru/security/app-passwords.
- Add a password with the Calendar (CalDAV) scope.
- Copy it into
YANDEX_CALENDAR_APP_PASSWORD— it is shown only once, and you can revoke it at any time without touching your account password.
If a tool answers "Authentication failed", this is almost always the cause.
Installing the plugin into Hermes
Option A — from Git (recommended)
hermes plugins install akinfold/hermes-yandex-calendar --enable
Option B — pip
pip install hermes-yandex-calendar
Hermes discovers it through the hermes_agent.plugins entry point; add
yandex_calendar to plugins.enabled.
Option C — drop-in directory
Unzip the release archive into ~/.hermes/plugins/ so you end up with
~/.hermes/plugins/yandex_calendar/plugin.yaml, then enable it the same way.
Development
python -m venv .venv && source .venv/bin/activate
pip install -e '.[dev]'
ruff check . && ruff format --check .
pytest # unit tests, no network
Running the live E2E tests
The e2e-marked tests hit a real Yandex account and are deselected by default.
They create, edit, and then delete a throwaway event 400 days out, so a successful
run leaves nothing behind — but the attendees they invite do receive an invitation,
so use addresses you own.
Locally
YANDEX_CALENDAR_LOGIN=you@yandex.ru \
YANDEX_CALENDAR_APP_PASSWORD=xxxx \
YC_E2E_ATTENDEES=you+guest@yandex.ru \
pytest -m e2e
YC_E2E_ATTENDEES is the comma-separated list of addresses the throwaway event
invites, and each one really is emailed an invitation — so list mailboxes you own.
Omit it and the suite falls back to a +e2e sub-address of the account itself,
which lands in your own inbox. Two constraints, both learned the hard way against
the live server:
- The addresses must exist. A made-up one (
guest@example.com) bounces back into your mailbox. - They must not resolve to the account itself. Yandex canonicalises addresses
(
@ya.ru→@yandex.ru) and drops an attendee that equals theORGANIZER, so a plain alias of your own login silently disappears and the round-trip check fails. A+tagsub-address is delivered to the same mailbox but stays a distinct attendee.
Or keep all three out of the command line, in ~/.yandex-calendar-login,
~/.yandex-calendar-app-password, and ~/.yandex-calendar-attendees, and just run
pytest -m e2e — see tests/e2e/conftest.py.
On GitHub Actions
The E2E (live) workflow is manual (workflow_dispatch). It reads
YANDEX_CALENDAR_LOGIN, YANDEX_CALENDAR_APP_PASSWORD, and YC_E2E_ATTENDEES
from a GitHub Environment named yandex-calendar-e2e.
Related Hermes plugins
Part of a family of Yandex plugins for Hermes Agent:
- hermes-yandex-disk — browse, read, write, and share files on Yandex Disk (REST API).
- hermes-yandex-mail — search, read, flag, move, and delete Yandex Mail messages (IMAP).
- hermes-yandex-search-api — Yandex web search backend and generative, cited answers for Hermes (Yandex Search API).
Contributing
Issues and PRs are welcome — see CONTRIBUTING.md for the layout, the plugin contract rules worth knowing, and the release process.
License
MIT — see LICENSE.
Release files for hermes-yandex-calendar 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hermes_yandex_calendar-0.4.1.tar.gz | 44.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hermes_yandex_calendar-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.5 kB
Release files / hermes_yandex_calendar-0.4.1.tar.gz
| Download URL | hermes_yandex_calendar-0.4.1.tar.gz |
|---|---|
| Size | 44.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de642f793bb52d7bc17d88d4198410e254937b5abb2b23fe268a5b76ff02ac49
|
|
BLAKE2b-256 checksum How to use checksums |
14743ccec7ee15d913d3fcc45f8a4880b25caa3b19294ef1215c39d394e7787f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / hermes_yandex_calendar-0.4.1-py3-none-any.whl
| Download URL | hermes_yandex_calendar-0.4.1-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc5fc8658f3c34dc93ba1fe5d6c8b4e2a7c23b379ffc13436b1336b8c7d8ee88
|
|
BLAKE2b-256 checksum How to use checksums |
c759bfc8ef08cd6ccffb6cf61bab419dd160622a3cad2b0e7cf1d8ca8fa5a5a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log