A Recursive AI Workflow

7 min read

The "unlock" that agentic AI brings is what I believe will keep the AI rally of the last few years going. Companies are starting to put agentic workflows to work, rather than using LLMs only as a thought partner.

Going a step beyond a single agentic workflow, what's really exciting is that recursive agentic workflows are now possible: agents that build other agents, hand work to their own helpers, and direct other AI tools. Each layer does its own job, and a human makes the calls at the points that matter.

Let's dive into an example that I built last week:

The problem: a monthly pile of reports

Every month, someone at a property management company had to read the financial reports for every property and spot what looked off. And it wasn’t 1 simple document per property, either. Each property had its own independent monthly review, which had an output of four reports:

  1. A 12-month profit and loss recap for each company
  2. A 12-month cash flow recap for each company
  3. A balance sheet for each property group, with both companies combined
  4. A budget-vs-actual comparison for each property group

For one 12-month window, the profit and loss and cash flow reports alone came to 104 reports with 2,768 account lines. Each line has 12 monthly figures, so that's 33,216 numbers to read.

Under those reports, the general ledger for the same 12 months has 170,644 transaction entry lines across all 52 companies.

A person used to go through all of that by hand, every month.

Layer 1: an agent that builds agents

I started by building the agent that would do the reviewing, and I had an agent do that too.

dr eggbot is a Grok Bot whose whole job is designing other Grok Bots. In its own words, it "designs high-quality Grok Bots. Asks a few preference questions, then creates them." Here’s a little bit more about its bot building architecture:

  • One job per agent. It gives every bot one job, one voice, and an explicit list of things it must never do. Agents with fuzzy, sprawling instructions go off the rails. Tight ones don't.
  • No leftover tools. A new bot gets only what its job needs.
  • It asks before it builds, and only when it needs to. It fills gaps with a few preference questions and acts once the job is clear. My notes were already detailed, so it went straight to building.
  • It thinks about safety for you. The login I pasted in my notes was in plain text. dr eggbot flagged it right away, kept it out of the new bot's instructions, and set the bot up to get the login from an encrypted vault. It also told me to change that password, since it had been in chat.

I gave dr eggbot my meeting notes: the client's goals, how the property companies are structured, the four reports, the date range, and the next steps. It came back with a new agent, whose instructions read like a job description for a sharp, calm controller:

  • The job: run the monthly financial review and hand me a flagged-anomaly report plus a budget-vs-actual summary, so the client only has to look at what gets flagged.
  • The method: sign in, build the property list, pull the four reports for the rolling 12 months, review every line, and deliver a ranked spreadsheet with a list of what was pulled and what wasn't.
  • The guardrails:
    • Treat the accounting system as strictly read-only. No edits, postings, reconciliations, journal entries, or settings changes, even though its user role technically allows some writes.
    • Never email or message the client. I send all client communication; it can draft.
    • Get logins from the vault only. Never write a password into a message, a file, or memory.
    • Never invent, estimate, or round numbers. If a report is missing or looks incomplete, list it as a gap instead of guessing.
    • Stay out of the quarterly work (investor letters, dividends, fees) until I say otherwise.

That's the first layer of recursion: an AI agent designed and created the AI agent that would do the work.

Layer 2: a thought partner that becomes the project lead

Next, I used the newborn agent as a thought partner to understand the task, the documents, and what the person doing this job was actually doing. I shared my idea for automating it, and we pressure-tested it. Then came everyone's favorite part: building it.

Since my agent has its own browser, it opened the accounting system and handed me the screen so I could sign in myself. Then it got to work:

  • It pulled the reports in batches. It exported the profit and loss and cash flow reports for every company. It checked that each one had the right company, dates, and accounting basis, and confirmed that each cash flow report's net income tied to its profit and loss, month by month.
  • It wrote and fixed its own tools. It wrote small programs to read the spreadsheet exports. When a report broke its assumptions, it found the cause and fixed the program. Some reports were missing whole sections, some put items in unexpected places, and one had headers but no data. After each fix, it re-ran everything to make sure nothing else broke.
  • It reviewed every line. There was no fixed threshold, so it used judgment. It looked for sudden spikes and drops, one-off charges, negative balances where none belong, cash that doesn't match between related companies, new debt, and so on. Every flag names the property, the company, the report, the line item, the month, the actual numbers, and a one-line reason.
  • It checked the ledger too. It pulled the full general ledger and the vendor expense report, then tied the ledger's expenses back to the profit and loss reports. That's more than 11,000 numbers with zero differences, and it let the agent rank 400+ vendors by what was actually paid to them.

The result was more than 260 flags across the portfolio, ranked high, medium, and low. They came in one Excel workbook with a ranked flags tab, a budget-vs-actual tab, and a coverage tab listing every report and its status.

It also did what a good analyst does: it said what it couldn't do yet. The balance sheet and budget comparison reports are run per property group, and before pulling those for the whole portfolio, it needed the client to confirm how some companies are grouped. So it listed them as pending instead of guessing.

Throughout all of this, my agent wasn't doing everything in one long thread. It acted like a project lead, breaking the work into pieces and handing them to its own helper agents: browser agents that click through websites, and background workers that crunch files and write drafts while it keeps track of the big picture. That's the second layer of recursion: an agent running its own team of agents.

Layer 3: an agent directing another AI

Once the review worked, I wanted more than a spreadsheet: a private dashboard where the client could see the flags, rank vendors and spending categories, and click from any flag to the original report.

For the website itself, my agent used my Claude Code Max plan, the AI coding agent that runs on my own laptop. Grok wrote the build spec, sent the instructions to Claude Code on my machine, checked the results, and sent follow-ups until it worked. Claude Code wrote the app and deployed it to Netlify, with invite emails sent through Resend.

After launch, Grok kept watching. It checked the login records to tell me who had actually signed in and when, and it ran a scheduled check every 15 minutes to let me know when an invited user finished setting up their account. It also told me plainly when its own logs couldn't answer a question.

The human in the loop is a feature

My thesis is that agents work best in companies today when they're human-centered. Here, I stayed at the decision points:

  • I signed in to the accounting system myself. The agent never saw the password, because logins live in a vault.
  • The agent never touched the books. Read-only was a hard rule.
  • Every email to the client came from me. The agent drafted, and I sent.
  • Spending and anything permanent waited for my OK. When we wrapped up, I asked it to take the site offline and pause the database without deleting anything. It backed everything up first.

The agents did the reading, checking, building, and following up. I did the judging and deciding. That split is what makes this trustworthy enough to use with real financial data.

Why this matters

Count the layers. An agent built an agent. That agent ran its own team of helper agents and directed a different AI coding agent on my laptop, which built and shipped a working website on top of a database the first agent had set up. A monthly job of reading more than 33,000 numbers became a ranked list of a few hundred items worth a human's attention.

That's the recursive part, and I think it's the real unlock. You don't need one perfect AI that does everything. You need AIs that know how to build, delegate to, and manage other AIs, with a person making the important calls.

Send Fadil a question