Building a Team of AI Agents: Roles, Feedback, & Teamwork Explained

Building a Team of AI Agents: Roles, Feedback, & Teamwork Explained

IBM Technology

0:00 AI agents are meant to solve tasks that are complex,

0:03 tasks that a stand-alone LLM cannot solve with just its pretrained knowledge.

0:08 But in artificial intelligence, just as in human intelligence,

0:14 more complex tasks require teams of collaborators.

0:19 Each contributor has a unique role

0:21 and those contributions come together into a single output.

0:25 In fact, building a team of collaborators within your agent looks surprisingly

0:29 a lot like building a team of collaborators in a human team.

0:34 You'll have doers, thinkers, supervisors, communicators,

0:38 other roles that increase brain power and bring in special skills and knowledge.

0:44 Understanding these diverse roles and how they fit together

0:46 will help you build the right team for your agent.

0:51 Let's take an example of an agent that develops a mobile app.

0:58 The agent takes input from the prompt, creates a set of user requirements,

1:03 plans app architecture, generates the code,

1:06 tests it and ultimately publishes it.

1:10 There are two questions to ask about the team design,

1:14 which is "What are the roles that you need

1:17 within your agent?" and "How will you make each

1:21 of those roles especially good at their job?" Every

1:24 agent team design will be a little bit different,

1:27 but there are several types of roles or subagents to think through.

1:32 The first is present in any agents and that is a doer.

1:37 In a human team, these would be equivalent to your junior workers,

1:41 and they do things like write or code.

1:45 On their own, they can't do a more

1:47 complex task like build an entire mobile application

1:50 but they can handle individual steps if someone

1:52 else has a view of the bigger picture.

1:56 And that brings us to the planner agent,

2:03 who takes the input from the user and creates

2:06 a plan for how to break that input into smaller steps.

2:10 So in the mobile app example, that might actually mean two planning steps.

2:15 First is a plan around what the user requirements are,

2:19 and a second is a plan of the app architecture before the coding even begins.

2:24 So the skill of this role is

2:27 to break down a complex problem into smaller pieces,

2:30 determine the skills and knowledge that are needed to execute

2:33 those, and come up with a documented plan, but just the plan.

2:38 Next is a tool operator.

2:44 This role involves interacting with tools,

2:46 like APIs or discrete pieces of Python code or web services.

2:52 This team member creates a structured tool input or a tool

2:56 call with the required arguments and then outputs the tool results.

3:01 Your agent may also need a learner.

3:05 So just as a human team might hire someone who likes to read

3:09 a lot and stay up to date on the current trends in the market,

3:13 in an agent, you also need a role to gather input from the outside world.

3:19 In our mobile app development example,

3:23 this agent might retrieve info on potential

3:26 competitor applications or user requirements gathered

3:29 from blogs or social media to deduce what features users would like to see.

3:36 The skill here is in retrieving information from the outside world,

3:40 determining what is relevant and then feeding

3:43 that back into the planning or doing steps.

3:48 As you may have guessed, this role often is your basic RAG flow,

3:52 but it could also be a more rules-based information

3:56 or data retrieval step instead of something that's strictly AI-driven.

4:01 Next is your feedback or critic role.

4:06 So, just as many human teams have that person

4:10 on the team that can be quite blunt, agent teams also rely on feedback.

4:18 So a critic subagent might do something like review the responses to check

4:23 for hallucinations or write and execute QA tests for the generated code.

4:32 Alternatively, just as in human teams,

4:34 you might foster healthy competition among team members.

4:38 A critic agent might also score multiple inputs

4:40 and choose the best one for the job.

4:45 Next is a supervisor agent or subagent.

4:54 And this can be a agent or a subagent that supervises at the task level,

4:58 embedded in each role checking progress, or at the project level.

5:04 So making sure individual roles are not getting stuck

5:06 or helping to identify where a step in the agent fails.

5:11 And then just like at the end of a group project with a human team,

5:15 you have to pick someone to present the group's work.

5:19 So the final role is the presenter.

5:26 In the agent context,

5:28 you need this role to bring the pieces together to communicate back to the user.

5:33 In our mobile app development example,

5:36 this role might summarize the user requirements that were created,

5:40 explain the code base that was generated and what it does,

5:43 to report back to the user what app it actually built.

5:48 You might note that some of these roles,

5:52 such as the tool operator and the learner are

5:56 themselves in some ways considered stand-alone agents in the sense

6:01 that they are an integration of multiple LLM calls

6:05 and a tool call or a step to do retrieval and embeddings.

6:10 Some combinations of these roles have become quite popular,

6:13 so you may have heard of the ReAct pattern, which includes an action step,

6:20 which is a tool operator role; a reasoning step, which is a planner role;

6:32 and an observe step, which is a feedback or critic role.

6:41 These then come together into an answer, which is a presenter role.

6:50 These are great simple starter examples, but as you scale and need your agent

6:55 to perform more consistently over a wider variety of tasks,

6:59 that's where your team will grow too,

7:01 to give better-quality outputs through more planning,

7:05 more focused execution and its own internal feedback loops.

7:10 The next question is "How do you make a role

7:13 or a subagent good at the job it's supposed to do?

7:16 There are a few different ways of doing that.

7:19 And the first is prompting.

7:22 So the same as you would give instructions to a member of your human team,

7:26 you need to give instructions as well

7:29 through the prompt to your agent collaborators.

7:32 That could be as simple as things like, if you get stuck, retry and try again,

7:36 which is something that you might also have to tell

7:39 members of your human team if they're just getting started.

7:42 The second is model selection.

7:45 So the same way that it's important

7:48 to hire the right human collaborators from the get-go,

7:52 it's important to select a model that fits the role.

7:55 And that can be in terms of the model's specialization,

7:59 the model size, whether it's a thinking or reasoning model or not,

8:03 the persona and the character of the model,

8:06 all matter as factors you can take into account

8:09 when seeing if the model you selected fits the role.

8:12 The third is model tuning.

8:16 This would require giving the model both good and bad

8:20 examples of what success looks like in their task.

8:25 This is a more resource-intensive way to make a model good at its

8:30 job because it requires both the human

8:32 resources to create that ground truth dataset,

8:35 which often requires many examples and input data points,

8:39 and the computational resources to be able to retrain or fine

8:43 tune a model and change its weights towards the desired behavior.

8:49 And fourth is the context.

8:53 So in the same way that onboarding a new team

8:56 member often means giving them access to the right systems,

9:00 the right files, the right databases,

9:03 the right subscriptions and not giving them,

9:06 not overwhelming them with too much,

9:08 you have to choose wisely about what context your agent

9:11 may need and then what might just be a distraction.

9:15 Just as a startup can launch with a few smart,

9:19 hardworking teammates solving a simpler problem,

9:21 an agent can also begin by pulling together just

9:25 a few key roles to quickly get to a working solution.

9:30 But just as a startup team eventually starts to expand,

9:33 to fill in weaknesses, to fix bugs and polish up the product,

9:38 the team within your agent will need to grow as well,

9:41 across various roles and specializations

9:43 to create a stronger and better solution.

Study with Looplines Download Captions Watch on YouTube