← Build an AI Team Lesson 1 of 12

Why a team?

✏️ Quick basics: an agent

An LLM can only write text. To make it do things, a small program reads what it writes. When the LLM writes ACT: and a request, the program does it and writes the result back into the text, on a LOOK: line. The LLM reads that and carries on.

Step through it. Watch who writes each line.

The LLM and the program together are an agent.
agent = LLM + a program that does what it asks

One agent can do a lot. Can it run a whole business alone?

A company in a chat

You're the CEO of Amal Designers, a small kids' dress brand. a social media manager posts on Instagram, and a designer makes and packs the dresses. You give each of them an agent to help, and the agents all talk in one group chat. Here we call each agent in the chat a bot. Writing @ and a bot's name asks that bot to reply next.

Step through the chat. Watch who does what.

Three bots, each doing one part, in one shared chat. That's a team.
team = bots with one role each + one shared chat

All three are the same kind of agent. So what makes Marketing a marketer?

What makes a role

Each bot gets its own instructions: text, placed before the chat, that says what its job is. Each also gets its own tools: the things its program can do when asked. Only Marketing has search, so only it can look things up on the web.
role = instructions + tools

Marketing

instructionsPlan posts and captions for the social media manager. Find trends; say where each came from.toolssearch

Production

instructionsAnswer from the catalogue: sizes, stock, prices, sewing time.toolscatalogue

Operations

instructionsPlan packing and shipping. Draft delivery messages; never send them.toolscourier
Who should get each job?

Every bot reads the chat. But does each one see the same thing?

What each bot reads

Before a bot writes, it reads two things: its own instructions, which only it sees, and the whole chat so far.
a bot reads = its own instructions + the chat so far
Production replies after Marketing, so it reads its instructions and 2 messages: yours and Marketing's.

Pick a bot. See what it reads just before it writes.

the shared chat

Count it on new chats.

✏️ Practice 1.1

Remember:
a bot reads = its own instructions + the chat so far
Only a bot itself sees its instructions. Everyone sees every message.

Work each one out. Type the answer, press Check.
A chat has you and 3 bots. You post one message. Then each bot replies once, one after another. How many messages are in the chat now?
Same chat. How many messages does the 3rd bot read before it writes?
Same chat. The instructions are 40, 60 and 50 words long, for the 1st, 2nd and 3rd bot. Every message is 100 words. How many words does the 3rd bot read before it writes?
Same chat. Now you post a second message, and the bots reply again in the same order. How many messages does the 2nd bot read before its second reply?

More bots, more messages. Is a team always better?

Team or solo?

Every reply from a bot is one more time the LLM writes, so it costs time and money. One agent answering a question writes once. A team of 3, each replying once, writes 3 times: about 3 times as long.

A team is worth it when a job has parts that need different instructions or tools, or when one bot should check another's work. For a small, one-step job, one agent is better, even for a CEO.

Team or solo? Pick for each job.

Quick check: did it all make sense?

Lesson 1 test

5 questions, one for each idea in this lesson. Answer them all right to pass. A wrong answer tells you why, and which page to look at again.

1. PredictThe LLM writes ACT: catalogue(red frock). What happens next?
2. ApplyYou want a new bot that makes product photos look clean and bright. What do you give it?
3. CountYou and 4 bots. You post, then each bot replies once, in turn. How many messages does the 4th bot read before it writes?
4. Spot the mistakeA friend says: “Marketing followed Production's instructions.” What's wrong?
5. Decide“Work out 10% off ₹1,450.” Team or solo?

What you still can't do.

Your turn to build

So far, the messages were written for you. Next, you write the bots yourself, in Python, and make two of them talk. Later, the same team runs on your laptop for Amal Designers.

I'd love to talk to Production for real. Can you build us, boss?

This leaves a question
You've watched a team chat. Can you build two bots that talk, yourself?
Lesson 2 answers it.
Pick a business you know. Name 3 bots it could hire. For each: its role in one line of instructions, and the tools it needs.