Runtime Labs home page
Runtime Labs
Search...
⌘K
Contact
Projects
Projects
Search...
Navigation
Integrations
iCalendar Integration
Documentation
Get Started
Introduction
Quickstart
Concepts
Export Calendar
Import Calendar
Calendar Embeddings
Tempo Tokens
Action Timing
Duration Estimation
Memory Tagging
Agent Runtime
Integrations
Google Calendar Integration
iCalendar Integration
Model Context Protocol
Examples
Prompt Example
API Reference
API Endpoints Overview
API Overview
Authentication and Headers
Calendar Event Schema
Context Export
Error Codes and Debugging
Function Calling Interface
Integration Guide: Google Calendar
Memory Trace Schema
Prompt payload schema
Response Structure
Tempo token spec
Temporal Agent Runtime and Profiling
Trace Profiling Schema
User profile schema
On this page
Overview
Requirements
Run the Sync Script
Python Module Overview
memory_trace_to_applescript(trace, calendar_name=“Home”)
create_event(trace, calendar_name)
sync_memory_file_to_mac_calendar(memory_json_path, calendar_name)
Security & Best Practices
Limitations
Integrations
iCalendar Integration
This guide explains how to sync memory trace data with the native macOS Calendar using AppleScript. This approach supports local iCloud-synced calendars without requiring API credentials or cloud setup.
Overview
This module enables local calendar integration on macOS:
Converts memory traces from JSON into AppleScript-formatted events
Writes directly to the local Calendar app (e.g., iCloud-synced “Home” calendar)
Requires no external API or OAuth setup
Requirements
macOS with Calendar app installed
Python 3.8+
AppleScript (osascript) available on macOS terminal
A local calendar named Home (or any custom calendar name you specify)
Run the Sync Script
From the project root:
python modules/calendar_io/sync_mac_calendar.py
This will:
Load a memory trace file (JSON format)
Parse each memory item
Convert to AppleScript and invoke via osascript
Log success or errors per event
Python Module Overview
memory_trace_to_applescript(trace, calendar_name=“Home”)
Parses a memory trace with a UTC timestamp
Formats start/end time in AppleScript-compatible string
Constructs a detailed event:
summary: Derived from trace type and content
description: Includes full trace content and metadata (task ID, importance, etc.)
Returns a valid AppleScript string to be executed
create_event(trace, calendar_name)
Runs osascript to create an event via AppleScript
Handles escaping and formatting internally
sync_memory_file_to_mac_calendar(memory_json_path, calendar_name)
Loads a full .json session (with list of memory traces)
Validates each trace using your schema
Creates events one-by-one
Logs number of successfully synced events and any failures
Example:
memory_path = Path(“data/conversation/raw/lab_manager_4-12.json”)
sync_memory_file_to_mac_calendar(memory_path)
Security & Best Practices
Events are only written to local calendars—no external access is required
Validate your calendar_name exists in macOS Calendar before syncing
Use validate_memory_trace() to guard against invalid input or format drift
Limitations
Only runs on macOS (due to reliance on AppleScript)
No two-way sync (events created in Calendar are not reflected back to memory traces)
Execution may be rate-limited by system AppleScript policies if abused
Google Calendar Integration
Model Context Protocol
Assistant
Responses are generated using AI and may contain mistakes.