Files
crewAI/lib/crewai/tests/hooks
Devin AI 24e8ff6c90 feat: Add crew-level before_tool_call and after_tool_call governance hooks
Adds optional before_tool_call and after_tool_call callback parameters to the
Crew class, enabling per-crew governance middleware for tool call authorization.

- before_tool_call(agent, tool_name, tool_input): Runs before each tool
  execution. Raise an exception to block the call.
- after_tool_call(agent, tool_name, tool_input, tool_output): Runs after
  each tool execution for audit/logging.

These crew-level hooks complement the existing global hook system, scoping
governance policies to individual crew instances.

Closes #5888

Co-Authored-By: João <joao@crewai.com>
2026-05-21 12:08:31 +00:00
..
2025-11-13 10:11:50 -08:00