Agents Lab

A model-agnostic, local agentic system wired into my Gmail, Calendar, and Drive to explore safe, useful automations.

Agents Lab screenshot

The spark

My inbox kept filling up, and my "strategy" was a mix of blocking, unsubscribing, and bulk deleting. I knew there had to be a better way than manually triaging dozens of messages every day, so I started building local agents to help manage the load.

What it is

  • A model-agnostic, local agentic system wired into my Gmail, Google Calendar, and Google Drive.
  • An email agent that processes the inbox into staging folders based on intent, urgency, and type (receipts, marketing, personal, etc.).
  • A learning bot that watches what I ultimately do with each message—archive, file, delete, or respond—and uses that behavior to improve future classifications.
  • A set of workflows that can be triggered on a schedule via n8n or on demand from the terminal/Cursor.

Stack

  • n8n, self-hosted in Docker, as the automation and orchestration engine.
  • Mix of local and cloud LLMs (ChatGPT Agent Kit, Google Gemini, Ollama-backed models) chosen per task for cost, speed, and privacy.
  • LlamaIndex to catalog and retrieve knowledge across email, documents, and notes.
  • Google APIs for Gmail, Calendar, and Drive integration.
  • Firebase/Firestore and Supabase for structured storage, queues, and logs.
  • An Obsidian vault in iCloud where agents write Markdown files that serve as a long-term, human-readable knowledge store.

What I learned

  • Design for platform and model agnosticism early. It's much easier to swap models and providers when you're not tightly coupled to any one vendor.
  • Markdown files are a surprisingly powerful primitive for agents: they help decompose tasks, make "team of experts" approaches more transparent, and keep token usage under control.
  • Running local LLMs and self-hosting automations (like n8n on Docker) is more work up front, but it pays off in control, privacy, and long-term flexibility.