Most of What Your AI Agent Does Has Nothing to Do With AI
Everyone calls it an 'AI agent.' We call it a pipeline. The AI is just one node. Here's why that distinction changes everything about how you build.
When we build a client an "AI agent," about 20% of the logic is actual AI.
The other 80%? Databases, API calls, and bash scripts.
That's not a complaint. It's the whole idea.
The Email That Made This Click
We were building an email triage system for a client's info@ inbox. Simple brief: read emails, classify them, reply to the easy ones, escalate the hard ones.
Just feed it all to Claude, right?
That's not what we built.
The actual workflow:
- Fetch new emails — Gmail API call. No AI.
- Check if sender is in CRM — database query. No AI.
- Classify the email — Claude. First AI step.
- Apply classification rules — newsletter? Archive it. No AI.
- Draft a reply — Claude. Second AI step.
- Send draft to Telegram for approval — API call. No AI.
- Wait for human to approve — conditional gate. No AI.
- Send email + archive — Gmail API. No AI.
Two AI steps out of eight. Everything else is plumbing.
Why Pipeline-First Works
Build AI-first and every problem becomes a prompt engineering problem.
Email isn't parsing right? Add more instructions. Agent skipping a step? Prompt it harder. Something broke? Go debug the prompt.
That breaks constantly. And it gets expensive fast.
Build pipeline-first and the AI handles what it's actually good at: understanding context, generating language, making calls on messy inputs. Everything else — fetching data, querying databases, routing logic, sending notifications — runs as regular code.
Regular code is:
- Fast — no LLM latency on steps that don't need it
- Cheap — no tokens spent on things a WHERE clause handles in 2ms
- Debuggable — if step 3 fails, you know it was the database query, not a hallucination
- Predictable — same input, same output, every time
The Mindset Shift That Changed How We Build
The mistake most people make when they first pick up a workflow orchestration tool is treating it like a dev tool — something for code tasks and CI pipelines.
It's not. A good orchestrator lets you wire together LLM nodes, bash nodes, API calls, conditionals, parallel fanouts — whatever the job needs. The AI is just one type of node.
That shift in thinking changed how we build everything. Not by adding more AI. By being way more deliberate about where AI actually belongs.
Investor Follow-Up — What It Really Looks Like
We built an investor nurture system for a real estate syndication. The pitch was simple: "AI handles all your investor follow-up."
Here's what's actually running under the hood:
Before Claude sees anything:
- Check if this investor was contacted in the last 48 hours (if yes, skip)
- Check their current stage — pre-webinar vs. post-webinar is a completely different situation
- Fetch any deal questions they've sent in
- Pull relevant answers from a knowledge base
- Check if they've already booked a call
Claude's job (runs once):
- Read all that context
- Decide: skip, follow up, answer a question, or propose a call
- Write the message
After Claude finishes:
- Route the draft to Telegram for approval
- On approval: send via Gmail, log it, update CRM stage
- If it was a Q&A reply: mark the question resolved
Claude touches it once. Everything else is scheduled jobs and database logic. When something breaks, we know exactly which step it was.
How We Decide What Gets AI
Before adding AI to any workflow, we write out every single step. For each one, we ask: does this need judgment, language, or the ability to handle ambiguous input?
Yes → AI node.
No → API call, database query, or bash script.
Most of the time, AI should touch two or three steps. Not ten or fifteen.
The business rules — who qualifies, what happens next, when to escalate — live in code. Code doesn't hallucinate. It doesn't misread a status field. It doesn't decide a cold lead is "probably interested" because the subject line had an exclamation point.
The Question Worth Asking Any Vendor
If you're shopping AI tools or agencies, skip "how smart is the AI?"
Ask this instead: where exactly in the workflow does AI run?
If they can't answer that specifically — if the pitch is just "the AI handles it" — walk away. That's a black box. Black boxes fail in ways you don't see coming, can't audit after the fact, and can't fix without calling someone.
The systems that hold up in production are boring on the inside. Scheduled jobs, database queries, conditional logic, API calls. AI in the exact spots where it actually earns its keep.
We call it a pipeline because that's what it is.
The AI is just one of the steps.
We build AI-powered systems for lending companies, real estate operators, and professional services firms at azlabs.io.