event
A calendar event: when it starts, how long it lasts, and whether and how it repeats.
At a glance
- Stored as: the value itself, written inline wherever it is used.
- Edited by: JSON Pointer operations.
Writing
Write an object with these keys; any other key is refused, with the list of the accepted ones:
start_datetime: the local start, in ISO 8601 without an offset (2026-01-05T08:00:00).timezone: the IANA time zone of the start (America/New_York). A city (New York) or an abbreviation (EST,PT) is stored as the zone it names,America/New_York, so it follows daylight saving time;UTCandGMTstay universal time. Leave it out only for an event that has none; whatever evaluates it then uses a zone of its own. Write a zone rather than an offset: a start with a whole-hour offset keeps it as a fixed offset, which does not follow daylight saving time, and any other offset (+05:30) is refused.duration_minutes: how long each occurrence lasts, a positive number. Leave it out only when nothing asks whether the event is on at a given moment: an inbound routing schedule needs it.rrule: how it repeats, as an iCalendar recurrence rule (FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR). Without one the event happens once.title,descriptionandlocation: optional text.
Instead of an rrule you can describe the repetition as Google Calendar does. The rule is built from these
keys and only the rule is stored:
repeat_frequency:does_not_repeat,minutely,hourly,daily,weekly,monthly,yearlyorevery_weekday, withrepeat_intervalfor every n-th period (minutelywith30is every half hour).repeat_on_weekdays(mondaytosunday) for a weekly event, by default the start's weekday;repeat_on_day_of_monthfor a monthly one, by default the start's day.end_type:never,on_datewithend_on_date, orafter_occurrenceswithend_after_occurrences. An end date or count given withoutend_typesets it.
Weekday hours from 8:00 to 18:30:
{"start_datetime": "2026-01-05T08:00:00", "timezone": "America/New_York", "duration_minutes": 630, "repeat_frequency": "weekly", "repeat_on_weekdays": ["monday", "tuesday", "wednesday", "thursday", "friday"]}
is stored as
{"duration_minutes": 630, "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start_datetime": "2026-01-05T08:00:00", "timezone": "America/New_York"}.
For a public holiday in the United States, give holiday instead of a rule, such as
{"name": "Thanksgiving Day"}. Loose spellings such as july 4th are accepted and stored under the
holiday's proper name. The event then repeats yearly on that day, at the start's local time, from the
start on. holiday_subdivision names a state, for state holidays, and holiday_observed picks actual
(the date itself), observed (the weekday it is observed on, when that differs) or either (the
default). A holiday cannot be combined with any other repetition.
A few other spellings of keys are accepted: start, tz, duration, interval, and recurrence,
frequency or repeat for repeat_frequency.
A sentence instead of an object ("every Monday from 9 to noon") is read into these keys by a model, which costs a model call. A field that holds a list of events takes a sentence with several windows ("Monday to Friday 8 to 12 and 1 to 5") as several events; a field that holds one event refuses such a sentence.
Written as
A JSON string or object whose schema format is event.
Reading
An entity's YAML shows an event as its stored keys. Through get_content it is its JSON on one line.
Querying
An event field holds the event's stored JSON and is compared as that text; it has no text or similarity search. A JSON object in a filter is first turned into the stored form, so equality matches however its keys were written. A sentence is compared as written: HQL never reads it as an event. To find events by how they repeat, match a pattern in the rule:
ScheduledJob | schedule like '%FREQ=WEEKLY%' AND active = true | select id, description, schedule, next_run_at
Every operator is in the HQL reference.
Editing
edit changes the stored keys with JSON Pointer ops:
{"op": "replace", "path": "/duration_minutes", "value": 600}. Change how it repeats at /rrule: a
stored event keeps its repetition there, and an edit that adds a Google Calendar key beside an rrule
is refused, pointing at /rrule. A key the event does not accept is refused.
In agent tools
An agent passes an event as an object with the keys above, or as a sentence, which a model reads.
Operations
Through the dtypes resource: