Automation

How AI Agents Are Quietly Rewiring the Way We Work

AI agents aren't just chatbots—they're autonomous workflows that think, decide, and act, and they've already started cutting through the busywork.
7 minutes to read1 month agoIgnasius Sevandri
July 7, 2026

I used to spend my mornings triaging a heap of documents. Invoices, contracts, support tickets—most of them looked different, carried different data, and needed to land in different inboxes. The manual routing ate two hours a day. Then I built an agent that could read, classify, extract, and dispatch all of it on its own. Two hours turned into two minutes. That’s not a productivity hack. That’s a rewrite of what work even means.

The Problem

Work is still shaped like factories from the 1920s: a series of handoffs between people, each doing a tiny piece of a process. That model breaks when the work isn’t repetitive and predictable. But here’s the thing—most knowledge work is repetitive and predictable at the micro level. You scan a document, pick out five fields, and paste them somewhere. You read a Slack message, decide it’s a billing issue, and assign a label. You check a dashboard, notice a number dropping, and send a Slack alert. Those micro-decisions are where time vanishes.

Automating them with rigid rules has never worked well. Rules fail when formats change, when the context shifts, when an email is phrased slightly differently. Traditional automation platforms are great at connecting apps but awful at thinking. AI agents bridge that gap: they’re software that can perceive, reason, and act with a degree of autonomy. Not just a script with a few if-this-then-that branches, but a system that can handle ambiguity, make judgment calls, and adapt.

I’ve been deep in this space for two years, building agents for clients in fintech, e-commerce, and logistics. The pattern is always the same: a messy human-in-the-loop process that nobody got around to automating because it required a bit of common sense. The solution isn’t a smarter chatbot. It’s an agent that sits inside the workflow like a new kind of operator.

The Solution

Let me walk through a concrete example. A client receives purchase orders via email. They come as PDFs, images, or sometimes just text in the email body. Each PO has a supplier name, a list of line items, a total, and a requested delivery date. The team was manually extracting that data and entering it into their ERP, then notifying the warehouse manager if the delivery was within three days.

We didn’t try to replace the entire process with one giant AI. Instead, we broke it into small, composable agent tasks—an architecture I call “agent cells.”

Cell 1 – Ingest & Classify
A lightweight agent watches the shared inbox, picks up unread emails with attachments, and classifies them: is this a purchase order, a vendor inquiry, or something else? The classification prompt is simple: “You are classifying incoming emails for a procurement team. Look at the subject and body. If it’s a purchase order with a list of items, respond PO. If it’s a question about an order, respond INQUIRY. Otherwise, OTHER.” Model: GPT-4o mini, cost: next to nothing.

Cell 2 – Extract
For emails classified as PO, we spin up a second agent with a structured output schema. The schema defines fields: supplier_name, po_number, line_items (array of objects), total_amount, delivery_date, and a confidence flag. The agent gets the email body and any attached file (after OCR if needed). It extracts everything, even tolerating typos in supplier names and date formats like “end of next week.”

Cell 3 – Validate
Validation is where most pure-LLM approaches fall over. So we add a deterministic layer. The extracted delivery_date is parsed with Python’s dateutil. If it’s ambiguous (“next Friday”), we have a small LLM call to resolve it relative to today, but then the date is validated programmatically. The total_amount is checked against the sum of line items; if there’s a mismatch over 1%, the confidence flag drops. This hybrid approach gives us the flexibility of LLMs with the reliability of code.

Cell 4 – Act
If confidence is high, the agent pushes the structured PO directly into the ERP via API. Low confidence? It drafts a summary and routes it to a human in Slack with the extracted data pre-filled, so all they do is confirm or tweak. That slashes manual effort even for edge cases. Finally, if the delivery date is within three working days, the agent posts a message in the warehouse channel with the details. No human needed to scan a calendar.

Implementation

The stack I use for this kind of workflow is deliberately boring:

  • n8n (self-hosted) as the orchestration layer. It’s visual, version-controlled via git, and has native webhook and API nodes.
  • OpenAI API for the language model calls, though I swap in Anthropic for tasks that require deeper reasoning.
  • Python microservices (FastAPI, running on Railway) for any heavy lifting like OCR (using Tesseract or Azure Document Intelligence) and deterministic validation.
  • PostgreSQL for audit logs—every agent decision is recorded with input, output, confidence, and timestamp. This is non-negotiable when you’re deploying agents in business processes.

Here’s the flow in n8n:

  1. Email Trigger (IMAP) – polls the inbox every 5 minutes.
  2. Function node – strips signatures, merges attachments, and prepares a single text blob for classification.
  3. OpenAI node (classify) – returns PO, INQUIRY, OTHER.
  4. Switch node – routes PO to extraction branch, INQUIRY to a simple auto-reply with FAQ links, OTHER to a review queue.
  5. Extraction branch: HTTP Request node calls a FastAPI endpoint that wraps the LLM call with structured output (using OpenAI’s response_format parameter with a JSON schema). The endpoint also does OCR if the attachment is an image.
  6. Validation function node – JavaScript code checks the date, total, and sets confidence.
  7. If node – confidence > 0.9? Send to ERP API via HTTP Request. Else, send Slack message with a pre-filled form.

Total development time: two days from idea to production. The client’s previous attempt with a traditional RPA tool had taken three weeks and still broke whenever a supplier changed their PO format.

A key design decision: each agent cell logs its output to a structured table, not just to n8n’s execution history. That gives us a dataset we can mine later—finding patterns in supplier behavior, common extraction failures, and cycle times. The logging itself becomes fuel for continuous improvement.

Results

Before the agent, the client’s two-person procurement team processed about 40 POs per day. Manual entry took 6 minutes per PO on average, including corrections and routing. That’s 4 hours of pure data entry daily. Mistakes (wrong line items, missed delivery alerts) happened about twice a week and often led to stockouts or rush fees.

After the agent:

  • 87% of POs are fully automated end-to-end (classified, extracted, validated, pushed to ERP).
  • The remaining 13% are low-confidence cases that still get pre-filled for human review, cutting their work to under 60 seconds per review.
  • Total daily processing time for the team dropped to 20 minutes.
  • Delivery alerts are now 100% on time, because the agent never forgets to check the calendar.
  • Error rate fell to near zero—the combination of LLM extraction and deterministic validation catches more mistakes than a tired human at 4 PM.

The biggest unseen win: the team now has the mental space to do actual supplier management instead of being data-entry clerks. One of them spotted a pricing discrepancy across three months of POs that nobody had ever had time to analyze before. That alone saved more than the cost of the agent.

Key Takeaways

  • Think cells, not monoliths. Break the agent into small, testable units that each do one thing well—classify, extract, validate, act. It’s easier to debug, upgrade, and hand off to someone else.
  • Deterministic guardrails are essential. Use code for things code is good at (math, date parsing, API calls) and LLMs for things code can’t do (reading messy text, making judgment calls). The hybrid approach gives you speed and reliability.
  • Human fallback isn’t failure. An agent that routes tricky cases to a human with a pre-populated form is still a massive win. Don’t aim for 100% automation on day one. 80% with smooth escalation is what actually gets adopted.
  • Log everything like an audit trail. Agents are probabilistic. You need to know why a decision was made, not just what happened. That data is gold for tuning prompts and models later.
  • Agents transform work by redefining roles. The goal isn’t to remove people; it’s to remove the part of the job that makes people feel like robots. When you free up that cognitive load, you get creativity, analysis, and actual human judgment back.

Newsletter

Automation Playbooks, Delivered

New playbooks and build logs on AI automation — no fluff, no cadence pressure. When something is worth sharing, it lands in your inbox.