


Proposed Solution: MAILPILOT.AI (POC)
AI-Powered Email Automation &Lead Intelligence System


Objective
MailPilot.AI was conceived to address a critical bottleneck in modern business communication: the volume of inbound emails far exceeds the bandwidth available to manually triage, prioritise, and respond to each one
— especially for sales teams, founders, and business development professionals.
The primary objective of this proof of concept is to demonstrate that an intelligent, browser-based system can:
– Automatically connect to a user & live Gmail inbox via secure OAuth authentication
– Ingest, parse, and analyse incoming emails for commercial relevance and lead potential
– Assign a quantified lead score to each email based on detected buying signals, sender profile, and
message context
– Generate contextually accurate, personalised reply drafts using a large language model (Claude by Anthropic)
– Enable one-click dispatch of AI-generated replies directly through Gmail — with no third-party relay
– Surface actionable sales intelligence per lead, giving users a strategic edge before they respond
Secondary Objectives
– Validate the feasibility of in-browser LLM-powered workflows without a backend server
– Demonstrate real-time Gmail API integration (read + send) with OAuth token-based auth
– Establish a reusable lead scoring framework based on natural language signal detection
– Provide a foundation that can be extended into a full SaaS product
The PoC targets professionals who receive 50–200+ emails per day and need a system that filters
Methodology
The system was designed using a modular, layered methodology that separates concerns across authentication, data ingestion, intelligence generation, and user action.
Architecture Philosophy
MailPilot.AI is a fully client-side application — there is no backend server, no database, and no persistent
storage of email content. All processing occurs in the user& browser session. This design choice was deliberate:
– Maximises privacy — email data never leaves the user& machine
– Eliminates infrastructure overhead for the PoC phase
– Demonstrates the viability of edge-AI workflows using modern browser APIs
– Reduces time-to-value: no deployment pipeline, no environment configuration
Gmail Integration via OAuth 2.0
Email access is established through Google& OAuth 2.0 flow using the Gmail REST API. The PoC guides users through Google& OAuth Playground to obtain a short-lived access token, which is used exclusively in- browser.
API calls made:
– GET /gmail/v1/users/me/profile — retrieves authenticated user identity
– GET /gmail/v1/users/me/messages — fetches the 30 most recent inbox message IDs
– GET /gmail/v1/users/me/messages/{id}?format=full — retrieves full message payload per email
– POST /gmail/v1/users/me/messages/send — dispatches AI-generated reply as a MIME-encoded
message within the original thread.
All API calls are made with the Bearer token passed in the Authorization header. No email content is
cached, logged, or transmitted to any server other than Google's own API endpoints and the
Anthropic inference API.
Email Parsing & Signal Extraction
Each fetched email is parsed to extract headers (From, Subject, Date), body text (decoded from base64 MIME
parts), sender domain, and display name. A regex-based signal detection engine then scans the combined
subject and body text against ten predefined pattern categories:


Lead Scoring Algorithm
Each detected signal contributes 18 points to the email& lead score. An additional 10 points are awarded
when the sender & email domain identifies a non-generic (corporate) organisation. The score is capped at 99
and mapped to a four-tier classification:
– HOT (≥70) — Multiple strong buying signals; immediate follow-up recommended
– WARM (≥40) — Meaningful intent present; qualify and nurture
– COOL (≥15) — Low-level signals; worth monitoring but not priority
– COLD (&15) — No commercial signals detected; informational or generic
This lightweight scoring approach was chosen for the PoC to be transparent, auditable, and fast — running client-side in under 1ms per email with no API call required.
AI Reply Generation (Claude API)
When a user selects an email and triggers reply generation, the system makes a call to Anthropic & Claude API (claude-sonnet-4-20250514) with a structured prompt that includes the sender& name, email address, subject, and full body text. The model is instructed to:
– Write a concise, warm, and highly personalised response
– Match the tone and formality of the original email
– Include a concrete next step or call to action
– Avoid generic or templated language
– Sign off as The Team &
The generated reply is presented as an editable draft before sending, preserving human oversight and
editorial control.
AI Sales Intelligence Brief
For emails scoring 15 or above, a parallel API call to Claude generates a 3–4 sentence sales intelligence brief.
This brief covers:
– Buying signals detected and their likely significance
– Probable pain points based on message context
– Recommended approach and tone for the reply
– Risk factors or caution points the user should be aware of
This brief loads asynchronously alongside the email view, providing strategic context before the user composes or approves a reply.
Reply Dispatch via Gmail API
Upon user approval, the edited reply is encoded as a base64url-formatted MIME message and sent via
Gmail & send endpoint. The threadId is preserved so the reply appears correctly threaded in both the sender's
and recipient & inbox. The dispatched email appears in the user's Gmail Sent folder as a native sent message
— indistinguishable from a manually written reply.
Project Summary
MailPilot.AI successfully demonstrates that a sophisticated email automation and lead intelligence workflow
can be built as a lightweight, server-free React application — without compromising security, usability, or output quality.
What Was Built
The following functional components were delivered as part of this proof of concept:
– OAuth Token Connection Screen — step-by-step guide with inline token input and validation
– Live Gmail Inbox Fetch — real-time loading of the 30 most recent inbox emails via Gmail API
– Automated Signal Detection — 10-category regex engine scanning every email on load
– Lead Scoring Engine — instant 0–99 numeric score with HOT / WARM / COOL / COLD classification
– Hot Leads Tab — filtered, sorted view of all emails scoring 40 or above
– AI Sales Intelligence Panel — async Claude-powered brief for every qualifying email
– AI Reply Generator — one-click personalised draft generation with full edit capability
– Gmail Send Integration — direct reply dispatch via Gmail API, preserving thread context
– Pipeline Overview Panel — live stats for inbox size, hot leads, warm leads, and replies sent
– Refresh & Disconnect controls — session management with token expiry awareness
Key Outcomes
The system reduces the time required to triage, analyse, and respond to a high-value email from an average of 8–12 minutes to under 60 seconds — while improving consistency and strategic quality of responses.
Emails processed per session: Up to 30 (expandable)
Lead detection accuracy: Signal-based; transparent and auditable
Reply generation time: ~3–6 seconds per email
Send latency: 1 second via Gmail API
Data privacy: No backend; all processing in-browser
Infrastructure required: None — fully client-side
Limitations & Scope Boundaries
As a proof of concept, the following are acknowledged limitations to be addressed in subsequent development phases:
– OAuth tokens expire after approximately 1 hour and require manual re-entry (a production system would implement refresh token flows)
– The scoring model is rule-based; a production version would benefit from ML-based intent classification trained on domain-specific data
– Inbox fetch is currently limited to 30 emails; pagination and filtering (by label, date range, sender) would be added in v2
– The system operates on unthreaded individual messages; full conversation thread analysis would improve context fidelity
– No persistent state — refreshing the page resets the session (addressed via persistent storage in production)
Roadmap for Production
– Phase 2 — Refresh token integration, multi-account support, and persistent inbox sync
– Phase 3 — ML-based lead scoring model trained on CRM conversion data
– Phase 4 — CRM integrations (HubSpot, Salesforce, Zoho) for one-click lead creation
– Phase 5 — Automated follow-up sequences, reply scheduling, and team collaboration features
– Phase 6 — Multi-channel expansion: LinkedIn, WhatsApp Business, and support ticketing systems
Primary Objectives
-Provide instant, scripture-grounded responses to personal problems and spiritual questions, available 24/7 without human gatekeeping.
- Bridge the gap between technology and faith by delivering theologically accurate Biblical guidance through a conversational AI interface.
- Enable voice-based interaction so that users can speak their burdens aloud and hear the Word of God read back to them — mirroring the oral tradition of Scripture.
- Build an embedded Bible knowledge base that guarantees accurate verse citation and contextual application even without live internet access.
- Serve marginalised, isolated, or spiritually searching individuals who may not have immediate access to a pastor, church, or counsellor.
✝ Core Guiding Principle
"Come to me, all who are weary and burdened, and I will give you rest." — Matthew 11:28. This verse encapsulates the agent's entire purpose: to be a digital doorway that leads people to the rest and peace found in Christ.


THE SHEPHERD'S VOICE
Biblical AI Guidance Agent
OBJECTIVE
The Shepherd's Voice is an AI-powered Biblical guidance agent designed to serve as a compassionate, always-available spiritual companion. Its core objective is to address the real, daily hardships that individuals face — anxiety, grief, loneliness, financial stress, broken relationships, spiritual doubt, and more — by responding with the living wisdom of Scripture, practical Biblical remedies, and personalised prayer.


METHODOLOGY USED
The development of The Shepherd's Voice followed a layered, resilience-first methodology — combining a structured Biblical knowledge base, AI language model integration, and browser-native audio APIs into a single unified React-based application. Each layer was designed to function independently, ensuring the agent delivers value even when external services are unavailable.










PROJECT SUMMARY
The Shepherd's Voice represents a successful proof of concept demonstrating that AI technology can be meaningfully deployed in the domain of faith-based pastoral guidance. The project achieves its stated objective of delivering scripture-grounded, empathetic, and practically actionable responses to real human hardship — through both text and voice.


Technical Outcomes
The proof of concept validated the following technical hypotheses:
- A structured domain knowledge base dramatically improves Biblical accuracy compared to prompting an LLM with no context.
- Browser-native Speech APIs (SpeechRecognition + SpeechSynthesis) are sufficient for a functional voice-in / audio-out experience without any third-party voice service.
- A single-file React component with CSS-in-JS can deliver a polished, production-quality UI without build tooling or external dependencies.
- A graceful API fallback strategy ensures 100% uptime of core guidance functionality regardless of network conditions.


Potential Impact
The Shepherd's Voice has clear applicability across multiple ministry and social impact contexts. For organisations such as Kolahal Theatre Workshop — which uses creative arts as a therapeutic and rehabilitative tool for marginalised communities — a faith-based AI companion of this nature could serve as a powerful supplementary resource: offering round-the-clock spiritual support to community members between sessions, reinforcing healing narratives with Scripture, and providing accessible pastoral guidance to those who may face barriers to traditional church engagement.




Gita Speaks-AI-Agent
Ancient Wisdom -Modern Struggles


Objective
The Gita Speaks AI Agent is a proof-of-concept application designed to make the philosophical and spiritual wisdom of the Bhagavad Gita — one of Hinduism's most revered scriptures — accessible, practical, and personally relevant to people navigating the challenges of modern life.
Specifically, the project seeks to:
· Democratise Access: Provide anyone — regardless of their background in Sanskrit, Hinduism, or philosophy — with instant, contextual guidance drawn from the Gita's 700 shlokas across 18 chapters.
· Bridge Ancient and Modern: Translate 5,000-year-old scriptural wisdom into practical, actionable advice applicable to contemporary struggles such as anxiety, career failure, relationship conflict, grief, and loss of purpose.
· Demonstrate AI for Cultural Preservation: Serve as a proof of concept for using artificial intelligence responsibly to preserve, interpret, and disseminate cultural and spiritual heritage.
· Enable Self-Directed Healing: Empower individuals with a private, non-judgmental space to seek guidance, reducing the barrier between a person in distress and meaningful spiritual counsel.
· Validate Knowledge-Embedded AI: Prove that meaningful, domain-specific AI experiences can be built without live API dependency, using a well-curated embedded knowledge base that functions entirely offline.
Methodology Used
The development of the Gita Speaks agent followed a structured methodology that combined scriptural research, intelligent knowledge design, semantic matching, and user experience engineering. The following phases outline the approach:
Scriptural Knowledge Curation
The foundational step involved manually selecting and curating the most contextually relevant verses from the Bhagavad Gita. Each entry in the knowledge base was built to include:
· Sanskrit Shloka: Original verse in Devanagari script, preserving linguistic and spiritual authenticity.
· Chapter & Verse Reference: Precise citation enabling users to locate and study the verse in full context.
· English Translation: Clear, plain-language rendering of the verse meaning.
· Contextual Wisdom: A modern interpretation explaining how the verse applies to specific life challenges.
· Practical Exercise: A grounded, actionable practice derived from the verse's teaching, implementable in daily life.
A total of 22 curated verse entries were developed, spanning 14 distinct life-problem categories — from anxiety and grief to ego, procrastination, and spiritual seeking.
Problem Taxonomy & Semantic Tagging
Each knowledge entry was assigned a rich set of semantic tags — between 8 and 14 keywords per entry — representing the emotional states, psychological conditions, and situational contexts a user might describe when seeking help. This tag vocabulary was designed to be conversational and colloquial rather than theological, so that phrases like 'I feel like giving up' or 'I can't stop comparing myself to others' would correctly surface the relevant verse.
Matching Algorithm
A weighted keyword-scoring algorithm was implemented to match user input to the most relevant knowledge entry. The mechanism works as follows:
· Input Normalisation: The user's free-text input is lowercased and processed as a raw string.
· Tag Intersection Scoring: Each knowledge entry's tag list is iterated. When a tag appears as a substring in the user's message, its character-length is added to that entry's score — rewarding longer, more specific keyword matches over shorter generic ones.
· Best-Match Selection: The entry with the highest cumulative score is selected and returned to the user.
· Fallback Logic: When no tags match (score = 0), the agent gracefully falls back to the universally applicable Karma Yoga verse — Bhagavad Gita 2:47 — ensuring no user receives a null response.
This approach delivers relevance accuracy sufficient for a proof-of-concept, with no dependency on vector databases, embeddings, or third-party AI APIs.
Response Generation & Personalisation
To avoid robotic, templated outputs, each AI response is composed dynamically from four components:
· Empathy Statement: Randomly selected from a pool of five empathetic opening lines — acknowledging the user's pain with warmth before introducing scripture.
· Verse Block: The matched Sanskrit shloka, chapter/verse reference, and English translation, displayed in a visually distinct callout block.
· Wisdom Paragraph: Contextual interpretation connecting the verse to the user's specific situation in plain, compassionate language.
· Practical Exercise: A concrete, implementable action the user can take — ranging from journaling exercises to breathing practices and mindfulness prompts.
· Closing Message: A randomly selected uplifting closing line, drawing on the Gita's universal message of hope and resilience.


Project Summary
Gita Speaks is an AI-powered spiritual guidance agent that answers one of the most universal human questions: "What does the Bhagavad Gita say about what I am going through?"
The agent was conceived as a response to a growing need: millions of people are drawn to the Gita's wisdom but lack the scriptural literacy, time, or access to a teacher who can translate ancient Sanskrit verses into guidance for their specific, personal situation. Gita Speaks fills that gap — acting as a compassionate, always-available digital companion rooted in sacred text.
What Was Built
· Curated Knowledge Base: A structured dataset of 22 verse entries drawn from 14 chapters of the Bhagavad Gita, each paired with semantic tags, translations, contextual interpretations, and practical exercises.
· Intelligent Matching Engine: A lightweight, offline-capable algorithm that identifies the most relevant verse for any user-expressed life challenge without requiring machine learning infrastructure.
· Conversational Interface: A full-featured chat UI with message history, category shortcuts for 10 common life challenges, a typing indicator, and a responsive design suitable for desktop and mobile.
· Aesthetic Identity: A distinctive visual language — deep backgrounds, saffron and gold typography, Sanskrit callout blocks, lotus motifs — that honours the Gita's sacred origin while feeling modern and accessible.
· Offline-First Architecture: The entire application — knowledge, logic, and interface — is self-contained in a single React JSX file, requiring no server, no API key, and no internet connection to function.
Sample Agent Output
The following is a representative example of how the agent responds to a user expressing failure and despair:
तस्मात्त्वमुत्तिष्ठ यशो लभस्व
Bhagavad Gita · Chapter 11, Verse 33
"Therefore arise, and attain glory."
Arjuna himself — the greatest warrior of his age — collapsed on the battlefield of Kurukshetra, trembling, unable to function, ready to walk away. Yet this darkest moment became the threshold of his greatest transformation. The Gita does not say 'it is okay to remain seated.' It says: arise. Every failure is a teacher, not a verdict.
Practice: List three things this failure has taught you. Then identify one small step forward you can take tomorrow.
Impact & Future Development
As a proof of concept, Gita Speaks demonstrates the viability of a broader platform. Potential future enhancements include:
· Full 700-Verse Index: Expanding the knowledge base to cover all 18 chapters and 700 shlokas of the Bhagavad Gita with full verse-level tagging.
· Voice Interface: Adding Sanskrit text-to-speech so users can hear the original shloka as it was meant to be chanted.
· Multi-Language Support: Delivering wisdom responses in Bengali, Hindi, Tamil, and other Indian languages for regional accessibility.
· Personalised Journeys: Tracking a user's recurring challenges over time and offering progressively deeper Gita teachings as their understanding grows.
· Integration with Kolahal Theatre Workshop: Embedding the agent within theatre therapy programmes, where participants can explore Gita wisdom as part of their creative healing journey.
Community & Sharing: Allowing users to save, share, and reflect on verses that have resonated with them, building a community of modern Gita practitioners






