Home › Agentic AI with Bunty › Lesson 7

Bunty's team: Planner, Worker, Checker

Agentic AI with Bunty, lesson 7. Simple English notes, free.

Open the interactive lessonWatch on YouTube

The idea

Bunty can plan, loop and remember. But a whole birthday party is too much for one agent: the cake, the guest list, the decoration, all at once!

So Raj gave Bunty a team of three agents. Each one has one clear job:

Here is the team at work. Bunty (the Worker) says: "Sir, the cake order is done!" The Checker says: "Wait! It was a chocolate cake, not vanilla." One agent's mistake is caught by another. That is an agent team.

One thing to remember: in a team, every agent's job must be clear. If two agents do the same thing, they get in each other's way.

The code: Bunty's team in Python

This is the same idea in a few lines of plain Python. Nothing to install and no AI model is needed. Save it as bunty_team.py:

# Bunty's team: a Planner, a Worker and a Checker (no AI model needed, just the idea)
WANTED = {"cake": "chocolate", "cards": 12}

def planner(goal):
    # Planner: split the big goal into small steps
    return [("cake", goal["cake"]), ("cards", goal["cards"])]

def worker(step, attempt):
    # Worker: does one step (the first cake order has a mistake, on purpose)
    kind, value = step
    if kind == "cake" and attempt == 1:
        return ("cake", "vanilla")
    return (kind, value)

def checker(step, result):
    # Checker: compares the result with what was wanted
    return step == result

for step in planner(WANTED):
    for attempt in (1, 2):
        result = worker(step, attempt)
        ok = checker(step, result)
        print(f"{step[0]}: Worker did {result[1]} -> Checker: {'OK' if ok else 'WRONG, try again'}")
        if ok:
            break
print("Party plan ready!")

Run it: python bunty_team.py

cake: Worker did vanilla -> Checker: WRONG, try again
cake: Worker did chocolate -> Checker: OK
cards: Worker did 12 -> Checker: OK
Party plan ready!

The first cake order is wrong on purpose. The Checker sees that vanilla is not chocolate, so the Worker tries again and gets it right. The cards step is right on the first try. This is a tiny example to show the idea. Real systems can be much more complicated.

Try it: change the code

Remember

An agent team splits the work: a Planner makes the steps, a Worker does them, a Checker catches mistakes. Next: Part 8, how the agents join their work together.

← Memory: write it down, read it next time

All lessons: Agentic AI with Bunty