iMessage Agent

[IN PROGRESS]
December 19, 2024Python · Claude Agent SDK · SQLite · AppleScript · MCP Servers · Tailscale

A personal AI assistant that monitors iMessages and responds intelligently using Claude, running 24/7 on a Mac Mini.

Text yourself to talk to Claude.

The iMessage Agent is a macOS application that turns iMessage into a conversational AI interface. It monitors my Messages database in real-time, processes incoming texts with Claude, and sends responses back through the same thread.

How It Works

  1. Monitor - Polls the local SQLite Messages database every second for new messages
  2. Process - Sends messages to Claude via the Agent SDK with full tool access
  3. Respond - Sends responses back via AppleScript to the same chat thread

The agent is designed for self-texting - I message my own iCloud email to interact with it from any device.

Key Features

Session Continuity - The Claude SDK maintains conversation context automatically. No manual history injection needed.

Image Support - Native support for photos sent via iMessage, including HEIC to JPEG conversion.

Tool Access - Full capabilities including web search, file operations, codebase search across multiple repositories, and CRM data via MCP servers.

Proactive Messaging - Scheduled daily summaries, workout reminders, and weekly recaps.

Observability - Web dashboard for monitoring activity, tool usage, and debugging.

Infrastructure

Runs on a Mac Mini via LaunchAgent, synced from my laptop using Mutagen over Tailscale. All inference is powered by my Claude Max subscription using Claude Haiku for optimal speed and cost.

Ask about this site

Ask me anything about Connor's projects, posts, or curated links.