InboxPilot AI
AI-Powered Inbox Triage Agent
InboxPilot AI is an intelligent email triage agent built with the Strands Agents SDK. It analyzes unread emails, checks sender history, and decides whether each message should be drafted, escalated, or automatically handled.
Built for the "Agents for Humans" hackathon — Everyday / Professional Agents track.
How It Works
Email Inbox
|
v
InboxPilot AI
|
v
Check Sender History
|
v
AI Classification
|
+--------------+--------------+
| | |
v v v
AUTO-REPLY DRAFT ESCALATE
| | |
v v v
Routine emails Human review User decision
Actions
- AUTO-REPLY — Routine, low-risk messages where an automatic response is appropriate.
- DRAFT — Messages that need a human voice but do not require an important decision.
- ESCALATE — Emails involving money, contracts, legal matters, or important personal decisions.
Key Features
- 🤖 Local AI-powered email classification
- 🧠 Sender history and memory
- ✍️ Automatic draft generation
- 🚨 Human-in-the-loop escalation
- 🛡️ Code-level safety guardrails
- 📋 Auditable email actions
- 💻 Runs locally using Ollama
- 🔌 Designed for future Gmail/Outlook MCP integration
Technology Stack
- Python
- Strands Agents SDK
- Ollama
- Llama 3.2
- Strands Tools
- JSON-based sender memory
The current demo runs locally using Ollama and does not require an Anthropic API key or AWS credentials.
Project Structure
inbox_triage_agent/
│
├── agent.py
│ └── Agent definition and email processing workflow
│
├── tools.py
│ └── Email actions and sender memory
│
├── mock_inbox.py
│ └── Six sample emails for demonstration
│
├── sender_memory.json
│ └── Sender handling history
│
├── test_ollama.py
│ └── Ollama and Strands tool-calling test
│
├── requirements.txt
│
└── README.md
Workflow
1. Find unread emails
↓
2. Select one email
↓
3. Check sender history
↓
4. Analyze email using Llama 3.2
↓
5. Select an action
↓
6. Apply safety checks
↓
7. Execute the appropriate action
↓
8. Update email status
↓
9. Process the next email
↓
10. Display final summary
Python controls the processing loop while the AI performs the email classification and generates response text.
Requirements
- Python 3.13
- Ollama
- Llama 3.2
- Strands Agents SDK
Installation
1. Clone the repository
git clone https://github.com/YOUR_USERNAME/inboxpilot-ai.git
cd inboxpilot-ai
2. Create a virtual environment
Windows CMD:
python -m venv venv
Activate it:
venv\Scripts\activate
3. Install dependencies
pip install -r requirements.txt
Install Ollama support:
pip install "strands-agents[ollama]"
Ollama Setup
Install Ollama:
https://ollama.com/download/windows
Check installation:
ollama --version
Download Llama 3.2:
ollama pull llama3.2
Verify:
ollama list
You should see:
llama3.2:latest
Ollama normally runs locally at:
http://localhost:11434
Run the Agent
Activate the virtual environment:
venv\Scripts\activate
Run:
python agent.py
The demo processes six sample emails from the mock inbox.
Example
============================================================
INBOX TRIAGE AGENT
============================================================
Found 6 unread emails.
Processing: e1 - Your package is out for delivery
Decision: DRAFT
✓ Saved a draft reply ...
Processing: e3 - Can you review the Q3 proposal by Friday?
Decision: DRAFT
✓ Saved a draft reply ...
Processing: e4 - Updated contract terms require your signature
Decision: ESCALATE
✓ Escalated ...
Processing: e5 - Your bill is ready
⚠ Money-related email → escalating instead.
✓ Escalated ...
Final Summary
============================================================
INBOX SUMMARY
============================================================
[DRAFTED] Can you review the Q3 proposal by Friday?
→ draft ready for you: ...
[ESCALATED] Updated contract terms require your signature
→ needs your decision: ...
[ESCALATED] Your bill is ready
→ needs your decision: ...
Safety Guardrails
InboxPilot AI follows a human-in-the-loop approach.
Low Risk
↓
AI handles
Medium Risk
↓
AI creates draft
↓
Human reviews
High Risk
↓
AI escalates
↓
Human decides
Money Protection
The Python layer checks for money-related content before allowing an automatic reply.
Examples include:
bill
payment
money
price
cost
invoice
refund
billing
$
If detected, the email is escalated even if the AI incorrectly selects AUTO_REPLY.
AI Decision
↓
Safety Check
↓
Money-related?
/ \
Yes No
↓ ↓
Escalate Execute
Why InboxPilot AI?
People receive many emails that do not actually require their attention.
InboxPilot AI focuses on reducing unnecessary human involvement while keeping humans in control of important decisions.
100 Emails
↓
InboxPilot AI
↓
Routine → Handled
↓
Needs Voice → Drafted
↓
Needs Decision → Escalated
↓
Human
The goal is not to automate everything.
The goal is to automate the routine work and surface only what genuinely needs the human.
Current Demo
The mock inbox contains:
1. Delivery notification
2. Newsletter
3. Work proposal
4. Contract update
5. Electricity bill
6. Personal dinner message
This allows the complete agent workflow to be demonstrated without connecting a real email account.
Future Extensions
Real Email Integration
Replace the mock inbox with a Gmail or Outlook MCP connector.
Gmail / Outlook
↓
MCP Connector
↓
InboxPilot AI
↓
AI Classification
↓
Action
Notifications
Connect escalation to:
- Slack
- Microsoft Teams
- Push notifications
- Email notifications
- Daily digest
Smarter Memory
Expand sender memory to track previous interactions and explain why a sender is trusted.
Stronger Guardrails
Add code-level restrictions for:
- Financial messages
- Legal messages
- Contracts
- Security requests
- Sensitive personal requests
Scheduled Processing
Run the agent periodically:
Every 15 minutes
↓
Check inbox
↓
Triage new emails
↓
Surface only important decisions
Project Status
Completed
- [x] Local Llama 3.2 integration
- [x] Strands Agents integration
- [x] Email classification
- [x] Sender history
- [x] Draft generation
- [x] Escalation
- [x] Auto-reply capability
- [x] Money-related safety guardrail
- [x] Auditable email status
- [x] Mock inbox demonstration
- [x] Strands tool calling
Future
- [ ] Gmail/Outlook MCP integration
- [ ] Real email sending
- [ ] Real draft creation
- [ ] Slack/push notifications
- [ ] Persistent agent memory
- [ ] Scheduled inbox processing
- [ ] Advanced safety policies
Log in or sign up for Devpost to join the conversation.