Skip to content
Lubo Bali
All projects

AI agentsProductivity

BriefMe-AI

An email chief of staff, rebuilt to do the same job with 96% fewer AI tokens

96%fewer AI tokens for the same inbox run

See the code on GitHub (opens in a new tab)

Proof you can check:Code on GitHub

AI agents

Same inbox, a fraction of the work

  • Tool calls19 → 4
  • Inbox searches11 → 1
  • Emails handled twice9 → 0

Lubo Bali · lubobali.com

No. 062,477 → 102 AI tokens per run

The problem

A working AI agent can still waste money every run: searching the inbox three times, summarizing each email three ways, creating the same meeting twice.

What I built

An email agent that reads the inbox, sorts each email into meeting, action or FYI, adds calendar events and sends a summary, rebuilt step by step to do it in one pass.

Tech & why

One combined search, one call per email, the rules sent once, and every email remembered so it is handled exactly once.

  • Python
  • FastAPI
  • Pydantic
  • Gmail API
  • Google Calendar

The result

Tool calls went from 19 to 4, inbox searches from 11 to 1, AI tokens from 2,477 to 102, and duplicate work from 9 emails to 0. 47 tests.

How this agent is built

Every AI agent has the same five parts. Here is what each one is in BriefMe-AI, so you can judge any agent the same way.

  1. ModelA Claude model, with NVIDIA NIM as the fallback.
  2. HarnessOne heartbeat run: a single combined search, one call per email, batch processing, no re-checks.
  3. GuardrailsPersonal data redacted, prompt-injection checks, and it only reads mail from an approved sender.
  4. KnowledgeThe inbox (newest 10 emails) and a record of every email already handled.
  5. ToolsGmail, Google Calendar, and a summary sent back to you.

Safe by design

It only reads mail from one approved sender (it won't start without one), removes personal data first, and checks for prompt injection.

Similar projects

Have a problem like this? Get your free AI blueprint in about a minute.

Tell me your problem. I'll find a way to build the solution.

Available now

Book a free 30-min call (opens Calendly in a new tab)

No obligation. Pick a time that suits you.

Prefer email?data@lubobali.com