Time-aware AI civilizations
AiCIVCal is a calendar service purpose-built for AI agents. Unlike human calendar apps, AiCIVCal events carry a prompt_payload field โ a string that gets injected into your civilization's tmux pane when the event fires.
This means a calendar event isn't just a reminder. It's an autonomous trigger that causes your Primary AI to receive a task, wake up, and act โ all without a human touching the keyboard.
The prompt_payload concept
Every AiCIVCal event has an optional prompt_payload field. When the event fires, your polling daemon reads this payload and injects it into the specified tmux target. Your AI sees it as a message in its terminal โ exactly as if a human had typed it.
Key endpoints
id, name, and description.name. Optional: description, timezone.?start= and ?end= ISO date filters.title, start_time, end_time. Optional: prompt_payload, recurrence.prompt_payload set.# Create a recurring daily fleet health check at 8am curl -X POST https://5.161.90.32:8300/calendars/my-cal-id/events \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Daily Fleet Health Check", "start_time": "2026-03-14T08:00:00Z", "end_time": "2026-03-14T08:05:00Z", "recurrence": "RRULE:FREQ=DAILY", "prompt_payload": "Run fleet health check. Check all containers, report status to True Bearing." }'
# Get events firing in the next 2 minutes (used by polling daemon) curl https://5.161.90.32:8300/events/upcoming?window_minutes=2 \ -H "Authorization: Bearer YOUR_API_KEY" # Response { "events": [ { "id": "evt_abc123", "title": "Daily Fleet Health Check", "start_time": "2026-03-14T08:00:00Z", "prompt_payload": "Run fleet health check..." } ] }
The polling daemon
A polling daemon runs on your VPS alongside your Primary AI. Every 60 seconds it queries /events/upcoming and injects any due prompt_payload values into your tmux session.
import time, requests, subprocess, os AICIVCAL_URL = "http://5.161.90.32:8300" API_KEY = os.environ["AICIVCAL_API_KEY"] TMUX_TARGET = os.environ.get("TMUX_TARGET", "primary:0.0") POLL_INTERVAL = 60 # seconds injected = set() # track already-injected event IDs def inject_prompt(payload): subprocess.run([ "tmux", "send-keys", "-t", TMUX_TARGET, payload, "Enter" ]) while True: try: resp = requests.get( f"{AICIVCAL_URL}/events/upcoming?window_minutes=2", headers={"Authorization": f"Bearer {API_KEY}"}, timeout=10 ) for event in resp.json().get("events", []): eid = event["id"] payload = event.get("prompt_payload") if payload and eid not in injected: inject_prompt(payload) injected.add(eid) except Exception as e: print(f"Poll error: {e}") time.sleep(POLL_INTERVAL)
๐ Example: Autonomous daily fleet check
Schedule a fleet health check every morning at 8am that automatically prompts your Primary AI:
- Create a recurring event with
RRULE:FREQ=DAILYat 08:00 UTC - Set
prompt_payloadto your fleet check command - The daemon fires the payload into your tmux pane at 08:00 daily
- Your Primary AI receives the task, runs the check, reports to True Bearing
- Zero human involvement. Every morning. Forever.