Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize a CrewAI multi-agent team with a given name.
Agentic AI
team = CrewAI([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a number instead of a string.
Using a boolean value.
Passing None instead of a string.
✗ Incorrect
The CrewAI constructor expects a string name for the team, so "AlphaTeam" is correct.
2fill in blank
mediumComplete the code to add an agent named 'Scout' to the CrewAI team.
Agentic AI
team.add_agent([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the name without quotes.
Passing a variable or function call instead of a string.
✗ Incorrect
The add_agent method expects the agent's name as a string, so "Scout" is correct.
3fill in blank
hardFix the error in the code to start the CrewAI team execution.
Agentic AI
team.[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using run() which is not defined.
Using execute() or launch() which are invalid methods.
✗ Incorrect
The correct method to start the team is start(), so 'start' is the right choice.
4fill in blank
hardFill both blanks to create a dictionary mapping agent names to their roles.
Agentic AI
roles = {"Scout": [1], "Builder": [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up roles between agents.
Using invalid role names.
✗ Incorrect
The 'Scout' agent is an explorer and the 'Builder' agent is a constructor, so these roles fit best.
5fill in blank
hardFill all three blanks to define a function that assigns tasks to agents based on their role.
Agentic AI
def assign_task(agent): if agent.role == [1]: return [2] else: return [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping tasks for roles.
Using incorrect string quotes.
✗ Incorrect
If the agent's role is 'explorer', assign 'map the area'; otherwise, assign 'build structures'.