BLUEPRINT

Build your autonomous agent company

The capstone: a group of collaborating agents that runs a business itself.


Goal: after this module you have a running system of collaborating agents that independently
processes jobs, checks them, delivers, and tracks revenue โ€” with you as the owner at the right
checkpoints. This is the destination the whole course works toward.

Companion code: code/agent_company.py.


Honest first: what "autonomous" means here

You're building a largely autonomous business: the agents do the work, you approve the risky moments (money, delivery to customers). That isn't a limitation but a strength โ€” it keeps your quality high and you legally safe (modules 10 & 11). "100% human-free, guaranteed income" does not exist; a running system with human checkpoints does. This is what you have after this module.


The architecture: a small company of agents

                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   Jobs โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ โ”‚  COORDINATOR             โ”‚  pulls work, drives the
   (inbox / form /       โ”‚  (the orchestration,     โ”‚  pipeline, watches the budget
    jobs.json)           โ”‚   in code)               โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚ per job
                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ–ผ                     โ–ผ                     โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚  WRITER       โ”‚ โ”€โ”€โ–ถ โ”‚  REVIEWER     โ”‚ โ”€โ”€โ–ถ โ”‚ CLIENT COMMS โ”‚
        โ”‚  (agent)      โ”‚ โ—€โ”€โ”€ โ”‚  (agent, QA)  โ”‚     โ”‚ (delivery mail)โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ revise โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            makes deliverable   approves/rejects             โ”‚
                                                             โ–ผ
                                                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                                  โ”‚  HUMAN (approval) โ”‚ โ—€ guardrail
                                                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                           โ–ผ
                                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                             โ”‚ Delivery + LEDGER         โ”‚
                                             โ”‚ (revenue, cost, margin)   โ”‚
                                             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Four agent roles, one human checkpoint, and a ledger that tracks your revenue. Together they form a company that does a day's work with a single command.


How this ties all the modules together

Part of the companyComes from module
The agents and their prompts04 (first agent), 01 (what is an agent)
Tools & actions05
The autonomous loop + revision06
Budget, human-in-the-loop, logging10
Multiple collaborating agents07 (Managed Agents / multi-agent)
Price, revenue, ledger08
Delivery, email, payment09
The 7-day path to your first customerWorked example

The code: agent_company.py

The script implements exactly the architecture above:

daily budget, and sends each job through the pipeline.

revision if needed (up to MAX_REVISIES).

Run it:

python code/agent_company.py            # with human approval per delivery
python code/agent_company.py --auto      # unattended (for scheduled runs)

You'll watch the agents collaborate: write โ†’ review โ†’ revise if needed โ†’ deliver โ†’ book. The deliverables land in code/outputs/, the log in code/company.log, the revenue in code/grootboek.json.


Running it 24/7

A business that only runs when you start the script by hand isn't autonomous yet. Schedule it:

Linux / Mac (cron) โ€” every morning at 8:00:

crontab -e
# add (adjust the paths):
0 8 * * *  cd /path/to/project && /path/to/.venv/bin/python code/agent_company.py --auto >> code/cron.log 2>&1

Windows: use Task Scheduler โ†’ daily task โ†’ start python code/agent_company.py --auto.

In the cloud / 24/7 without your own PC: run it on a small server, or move to Managed Agents (module 07), which run entirely on Anthropic's infrastructure.

๐Ÿ’ก Only switch to --auto once you've checked the output for a while. Run supervised first, then
let go gradually โ€” autonomy is earned step by step (module 10).


Scaling into a bigger company

real email tool (module 09) and payment (Stripe/Gumroad).

needed when (module 07).


Definition of done โœ…

After this module you have:

That's a real, running AI-agent business. What it earns is up to your niche, your price and your distribution (module 08 & the worked example) โ€” but the machine is in place.


Your assignment

  1. Run agent_company.py and follow the collaboration between the agents.
  2. Replace the prompts and PRIJS_PER_OPDRACHT (price per job) with your own business's.
  3. Connect jobs.json to a real source of jobs, and delivery to email/payment.
  4. Schedule it with cron or Task Scheduler and let it run supervised for a week first.

Congratulations โ€” you haven't just learned how agents run a business, you have one running. Head
to the worked example for the path to your first paying customer.


โ˜ฐ All modules