Inspiration

Modern inboxes are overloaded with newsletters, automated updates, and low-priority messages, making it easy to miss genuinely important conversations. While many AI tools can draft replies, they still require users to manually sift through emails and provide context every time. We wanted to build something closer to a real assistant—one that understands past interactions, identifies what truly matters, and reduces the mental load of email management.

What it does

InboxSentinel AI is a memory-driven email workflow assistant that monitors incoming emails, identifies high-priority messages using AI classification, and generates context-aware reply drafts based on past conversations. Instead of acting as a simple text generator, it retrieves relevant communication history, adapts tone and context, and sends draft responses to the user through Telegram for approval. The user stays in control while the system handles triage, drafting, and memory updates automatically.

How we built it

We developed the system in Python using IMAP to ingest emails and SMTP to send responses. A local JSON-based memory store preserves past interactions, enabling lightweight retrieval without requiring external databases. The workflow uses an LLM via OpenRouter to classify importance and generate replies enriched with historical context. A Telegram bot serves as the human-in-the-loop interface, allowing users to review, edit, or approve responses instantly. The architecture focuses on being local-first, transparent, and easy to deploy without complex infrastructure.

Challenges we ran into

One major challenge was transforming raw email data into usable contextual memory. Email bodies often contain HTML, signatures, and noise, so we built a preprocessing pipeline to clean and normalize text before storing it. Another challenge was balancing automation with trust—we designed a human approval step to prevent unintended responses while keeping the workflow fast. Ensuring the system stayed lightweight without vector databases or heavy infrastructure also required careful design decisions.

Accomplishments that we're proud of

We created a fully working AI-driven workflow that goes beyond generating text and instead performs continuous monitoring, decision-making, and contextual drafting. The project demonstrates that meaningful AI assistance can be achieved using a simple, privacy-friendly architecture without relying on expensive cloud services. We are proud that the system runs end-to-end, adapts to communication history, and provides real productivity value rather than being just a demo.

What we learned

This project taught us how to design AI systems as workflows instead of isolated prompts. We learned practical techniques for building retrieval-style memory without complex ML infrastructure, handling real-world messy data, and integrating multiple services into a cohesive automation loop. We also gained insight into human-in-the-loop design—AI is most useful when it augments decisions rather than replacing them.

What's next for InboxSentinel AI — A Memory-Driven Email Workflow Assistant

Future improvements include smarter prioritization using richer signals, scalable memory indexing for larger datasets, and analytics that show communication trends and response insights. We also plan to expand integrations beyond email to unify multiple communication channels, making InboxSentinel a broader personal productivity agent while keeping its local-first, privacy-conscious philosophy.

Built With

  • beautifulsoup4
  • gmail
  • google-colab-(for-testing/deployment)
  • imap
  • imap-(imap-tools)
  • json-(local-persistent-storage)
  • large-language-models-(arcee-ai/trinity-large-preview)
  • openrouter-api
  • python
  • python-dotenv
  • smtp
  • telegram-bot-api-(pytelegrambotapi)
Share this project:

Updates