AI agentsProductivity
Sentinel-AI
An AI agent that sorts your inbox, and can never send or delete a thing
4safety layers before the AI touches an email
See the code on GitHub (opens in a new tab)
Proof you can check:Code on GitHub
AI agents

4 safety layers before the AI acts
- Allowlistonly senders you trust get in
- Injection guardemails that try to trick the AI are blocked
- AI sorts ita second provider if the first fails, then a no-AI backup
- Answer checkbroken or unsure means "needs review", never an action
- Meeting
- Action
- FYI
- Needs review
Lubo Bali · lubobali.com
The problem
An AI agent on a real inbox can be tricked by one bad email, act twice on the same message, or act on a broken answer. Most demos skip this part.
What I built
Sentinel triages a Gmail inbox: it sorts each email into Meeting, Action or FYI, adds a label and puts meeting requests on the calendar as tentative. When it isn't sure, it marks the email for a person to check.
Tech & why
Two AI providers plus a keyword sorter with no AI as the last backup, so it keeps working when a provider is down. FastAPI and Postgres keep it simple and auditable.
- Python
- FastAPI
- Gmail API
- PostgreSQL
- Docker
The result
Runs on a server with 181 tests at 93% coverage. It labels emails and holds meeting times, and it has no power to send or delete anything.
How this agent is built
Every AI agent has the same five parts. Here is what each one is in Sentinel-AI, so you can judge any agent the same way.
- ModelAn AI model from one provider, a second provider (NVIDIA) if it fails, and a keyword sorter with no AI as the last backup.
- HarnessA scheduled heartbeat: fetch, filter, sort, label, remember. Every email is handled once, even after a restart.
- GuardrailsSender allowlist, prompt-injection guard, fail-closed on bad AI output, and no send or delete ability at all.
- KnowledgeOnly emails from allowed senders, plus a Postgres record of every email already handled.
- ToolsGmail (read and label only) and Google Calendar (tentative events). Nothing else.
Safe by design
Only allowed senders reach the AI, tricks are blocked before it reads them, a bad answer means "needs review" instead of an action, and it has no power to send or delete.
Similar projects
- AI agentsBriefMe-AIAn email chief of staff, rebuilt to do the same job with 96% fewer AI tokens96% fewer AI tokens for the same inbox run
- AI agentsLubo AI PublisherAn AI content pipeline that writes in my voice from real sources, and waits for my one tap9 posts a week, live since June 2026
- AI agentsCitibike analytics agentAsk where the bikes need to go tomorrow morning, in plain English68% higher demand in November than in July
Have a problem like this? Get your free AI blueprint in about a minute.
