0%
⭐ 0 XPMap
Chapter 6 · Final quest · 40 XP

Your Party

🎉 Final quest! Everything comes together here: system prompts, plans, loops, memory and a team. Pick a job you care about (a party, a story, a clean room, anything) and build a three-bot team for it.

The checker doesn't mind which job you pick. It checks that your team is built the way real agent teams are: three members with their own system prompts, a plan, the steps shared out in turn, a memory that keeps every result, and a step limit so the team never runs forever.

TEAM = {
    "Ada": "You are Ada, a planner.",
    "Bo": "You are Bo, a builder.",
    "Cy": "You are Cy, a checker.",
}

Pip knows plans for bake a cake, plant a tree, throw a party, write a story and clean my room, and makes up a 3-step plan for anything else. Pass it and your certificate is ready.

Instructions

  1. Make TEAM: a dict of 3 bots, each with a system prompt that starts You are and its name.
  2. Make run_party(goal, limit) that plans with pip.plan(goal) and shares the steps out to the team in turn.
  3. Each step goes into a memory list as Ada: buy snacks, and run_party returns that list.
  4. Stop after limit steps, even if the plan is longer.
  5. Pick your goal, and print each line of run_party(your_goal, 10).
💡 Hint

names = list(TEAM). For i, step in enumerate(pip.plan(goal)): if i >= limit: break. Otherwise add names[i % len(names)] + ": " + step to memory.

Ask the community

bot.py
Terminal
← BackNext →

Chapter 6: Party of Agents

The full quest map

Talk it out

  1. Read the instruction with the ✗ out loud.
  2. Say what your code does, line by line, as if to a friend.
  3. Find the line where what it does and what you want split apart.
  4. Press Run and read the terminal. Is that what you expected?
  5. Still stuck? Press Ask Pip why, or peek at the solution.
  6. Or ask on the community help board: say which quest, and paste your code.
New badge!

Your bot just got a new part. See it on the quest map.

Name your bot

It levels up as you play, and gets a new part with every chapter.