Skip to course content
Free CrewAI course

CrewAI for Multi-Agent Automation

Module 02 Activity

Scenario

Your crew's agents are defined with role names and adjectives. This activity converts them into constraints that change what the agents will do.

What you build

Rewritten agents whose backstories are testable rules, and tasks split so each has an executable contract.

Steps

  1. Take each agent and count the lines in its backstory that rule an output out. Delete every line that does not.
  2. Rewrite each goal so you can name the output that means it is finished. Anything unfinishable gets narrowed.
  3. Pick your vaguest task and write the checking function for its output first, before touching expected_output.
  4. Rewrite expected_output to describe exactly what that function accepts.
  5. Split any task whose output changes shape partway through, and declare the dependency with context.
  6. Run the checker against three deliberately bad outputs, including one that is valid JSON with a disallowed value.

Evidence to hand in

Review checklist