Skip to main content

hermes-yandex-calendar

PyPI version CI E2E (live) Coverage CodeFactor Ruff License: MIT

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, and the original goes only once the copy has been read back from the target and only if nobody changed it in between.
  • 🔑 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_CALENDARS applies to both target calendars and direct event operations (update, respond, move, and delete). 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 read unless 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-Match with the resource's ETag), 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. A move is conditional at the same point: the original is removed only if it still matches the copy that was just written, and if it changed in between the event is left in both calendars with a message saying so, rather than losing that 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.

  1. Open https://id.yandex.ru/security/app-passwords.
  2. Add a password with the Calendar (CalDAV) scope.
  3. 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

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 the ORGANIZER, so a plain alias of your own login silently disappears and the round-trip check fails. A +tag sub-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.

Part of a family of Yandex plugins for Hermes Agent:

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.2

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

Source distribution (sdist)

Source distribution for hermes-yandex-calendar 0.4.2
File Size Uploaded
hermes_yandex_calendar-0.4.2.tar.gz 46.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hermes-yandex-calendar 0.4.2
File Interpreter ABI Platform
hermes_yandex_calendar-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 77.0 kB

Release files / hermes_yandex_calendar-0.4.2.tar.gz

Download URL hermes_yandex_calendar-0.4.2.tar.gz
Size 46.3 kB
Tags Source
SHA-256 checksum
How to use checksums
74b0475203afb4e75bf27dd836ea0ffb6482de5c17e864cba3307bc88dd622e4
BLAKE2b-256 checksum
How to use checksums
88a8003859771999e5024bd6e781b9472d9dc7109b956047f9ac34264f640127
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

Release files / hermes_yandex_calendar-0.4.2-py3-none-any.whl

Download URL hermes_yandex_calendar-0.4.2-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7551178974862f2a8f50b4ebb571711891201756329a9e535d502f334755a5d3
BLAKE2b-256 checksum
How to use checksums
09dffeb7ba4489810488ade02acdaf73d625d7f0f478fdd46c2c19ae2b6eb602
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

Release history Release notifications | RSS feed

0.5.0

2 release files

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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