Open SourcePython / SQLite / MCP

Email Intelligence: local-first knowledge for agent workflows

EmailLocal FirstSecurity
View Repository
ProblemRaw IMAP gives agents messages, but not durable knowledge or safe action state.
ShapeMaildir source of truth, SQLite knowledge store, MCP tool surface.
StatusIn active development with tests, CI checks, and security guardrails.

Email Intelligence turns local mail into a continuously enriched knowledge base. Maildir stays the immutable source of truth. SQLite stores metadata, full-text search, embeddings, action items, facts, drafts, and append-only events. Agents query it through MCP.

The important distinction is level of abstraction. Agents should not only search messages. They should find decisions, waiting replies, open tasks, sender context, related threads, and safe draft workflows.

Why I built it

Email is full of operational knowledge, but most automation treats it as a mailbox API. That forces every agent to rediscover context from raw messages. The platform makes email state queryable, enriched, and writable without sending private data to a hosted inbox product.

What to inspect

  • Maildir ingestion into SQLite with FTS5 and vector search.
  • LLM enrichment for summaries, facts, entities, decisions, and action items.
  • Append-only event feed for reactive agents.
  • Draft-first outgoing mail and allowlist-guarded sending.
  • Prompt-injection and untrusted-content guardrails.

Why it belongs here

This is a practical example of agent infrastructure that respects local control, auditability, and security. It combines retrieval, enrichment, write-back, and operational safety in one inspectable system.