โ† Back to projects
Case Study โ€” Item 02

Intelligent Email Tracking Agent

An AI agent that works around the clock reading a purchasing inbox and proactively tracking purchase orders with suppliers, creating roughly eight hours a day of follow-up capacity that did not exist before โ€” without adding headcount.

๐Ÿ“„ Full case study ๐Ÿ“ arc42 architecture doc
In Production
Role Internal Solution Architecture, Development & Deployment
Project Type Production
Stack Python ยท FastAPI ยท React 19 ยท MySQL ยท Anthropic Claude
Sector Precision Manufacturing
01

The Challenge

The company's purchasing department operates with a team of two buyers responsible for placing and tracking purchase orders with external suppliers, largely through email correspondence. Timely follow-up on open purchase orders โ€” chasing order confirmations, shipping updates, and resolving delivery incidents โ€” is critical in a precision-manufacturing supply chain feeding the aerospace and oil exploration sectors, where delays cascade into production schedules.

Each buyer needed an estimated four hours a day to properly track open purchase order lines, on top of their core purchasing responsibilities. In practice that time was never available, so follow-up was chronically deprioritized, increasing the risk of undetected delays and incidents surfacing late. Hiring a third person dedicated exclusively to follow-up was evaluated and ruled out on budget grounds.

The problem was not a lack of process โ€” it was a lack of time. The solution had to create capacity, not add another manual step.
02

The Approach

Rather than adding headcount, the project explored whether an AI agent could continuously monitor the purchasing inbox and take over the repetitive parts of follow-up: reading supplier replies, classifying status and urgency, and drafting the next action.

Trust was treated as something to be earned incrementally. Every AI-suggested action was classified by risk, so low-risk actions could run unsupervised from day one while anything reaching a supplier stayed behind a human approval queue.

The system was delivered iteratively by a single internal owner, acting as both architect and developer, with the core MVP through a working frontend built in roughly one week and validated against real production data as it progressed.

The AI provider was abstracted from day one behind a gateway, so the model powering the analysis could change โ€” as it did, from a local model to a cloud provider โ€” without touching the rest of the system.

03

Architecture

As-Is

Two buyers manually monitored their Outlook inboxes for supplier replies related to open purchase orders, decided case-by-case whether a situation required action, and drafted follow-up or escalation emails themselves. There was no systematic tracking of a next-review date per purchase order line, no consolidated view of supplier status, and no automatic alerting when a line turned into an incident โ€” visibility depended entirely on a buyer having the spare time to look.

To-Be

A modular local agent sits between desktop Outlook and MySQL, orchestrating two business flows: reactive analysis of incoming emails, and proactive scheduled review of the purchase order portfolio. An AI Gateway abstracts the model provider so the Orchestrator, persistence, and frontend never depend on a specific AI vendor, and a configurable autonomy matrix decides which AI-suggested actions execute automatically versus which land in a human approval queue.

High-level architecture of the Intelligent Email Tracking Agent
04

The Solution

The resulting agent continuously reads the purchasing inbox, classifies and tracks every purchase order line, proactively reviews lines that are due, drafts supplier communications, and automatically notifies the buyer when a reference turns into an incident โ€” all while keeping a human approval queue for anything above a low-risk threshold.

Core Capabilities

  • Reads desktop Outlook without cloud mailbox integration.
  • AI-based email analysis with a validated, structured contract.
  • Proactive purchase-order portfolio and supplier tracking.
  • Configurable autonomy matrix per action type.
  • Human approval queue for AI-drafted replies and actions.

Supporting Capabilities

  • Multi-provider AI Gateway (cloud and local models).
  • Conversational query interface and live dashboard.
  • Automatic buyer notification on incident status.
  • Live-editable prompts, business rules, and autonomy matrix.
  • Per-supplier communication language for outgoing drafts.
05

Key Architecture Decisions

5.1

AI Gateway / Model Router

No component depends directly on a specific AI vendor; provider selection is a configuration change, not a code change. Flexibility
5.2

Autonomy Matrix

Every AI-suggested action is classified by risk, letting low-risk actions run automatically while trust in the agent builds incrementally for everything else. Risk
5.3

Desktop Outlook Integration (COM)

Reads the same mailbox a buyer already has open via COM automation, avoiding new cloud API permissions or IT approval overhead. Infrastructure
5.4

MySQL as the Sole System of Record

No external broker or vector store; deliberately minimal infrastructure matched to actual scale, with clean interfaces to allow scaling later if needed. Simplicity
06

Security & Risk

Security Controls

  • Secrets managed via system environment variables.
  • Intranet-only tool, no inbound exposure.
  • Autonomy matrix bounds unsupervised execution.
  • Human approval queue for external-facing communication.

Risk Mitigation

  • AI Gateway allows falling back to a local model via configuration.
  • Autonomy matrix reviewed periodically as trust in the agent grows.
  • Activity log provides traceability for processed emails and actions.
  • Duplicate-notification protection on automated buyer alerts.
07

Business Impact

~8h Follow-up capacity created per day
2 Buyers freed from manual inbox triage
0 Additional headcount required

Before

  • ~4 hours/day per buyer needed for PO follow-up, never available.
  • Follow-up chronically deprioritized behind core buying work.
  • A dedicated follow-up hire evaluated and ruled out on budget.
  • No systematic next-review tracking per purchase order line.

After

  • Purchasing inbox monitored continuously, 24/7 while the host machine is on.
  • Every PO line reviewed on schedule, not only when time allows.
  • Buyers start from an already-analyzed, already-tracked case.
  • Incidents flagged and routed automatically at the moment of detection.

The equivalent of roughly eight hours a day of follow-up capacity was created across the two-person buying team โ€” capacity that did not exist before โ€” without hiring, and without reducing the quality of tracking.

08

Lessons & Next Evolution

Lessons Learned

  • Abstracting the AI provider from day one paid off almost immediately when the primary model was swapped during development.
  • An autonomy matrix is a better adoption strategy than deciding upfront whether an agent should be fully autonomous.
  • Storing prompts and business rules in the database instead of code made behavior tuning possible without a deployment.
  • Keeping infrastructure minimal matched the actual problem size and let one person ship a production system in about a week.

Next Evolution

  • Introduce automated regression testing for prompt/rule changes.
  • Add lightweight observability as email and action volume grows.
  • Periodically tighten the autonomy matrix as more actions prove reliable.
  • Evaluate Microsoft Graph if the system needs to run PC-independent.
Confidentiality Notice: This case study has been anonymized. The company name, supplier names, and any proprietary data, credentials, or infrastructure details have been removed or generalized.