Skip to course content
Free CrewAI course

CrewAI for Multi-Agent Automation

Module 04 Activity

Scenario

Your agents are about to be given tools, knowledge and access. Everything here is about making misuse impossible rather than discouraged.

What you build

A tool layer that is read-only where possible, self-validating always, and tested without any agent - plus per-agent scoping and staleness budgets.

Steps

  1. Write one tool with all three safety properties: read-only, validates its own input, never raises.
  2. Test it directly with .run() against every refusal branch, including a hostile input. No agent, no key.
  3. Scope tools per agent so that only one agent holds any write capability. Print each agent's tool list.
  4. Give each knowledge source a staleness budget based on how often that kind of document changes, and flag anything past it.
  5. Take a multi-turn exchange and extract the established facts into named fields instead of passing the transcript.
  6. Report your tool test coverage as a fraction of branches, not of tools.

Evidence to hand in

Review checklist