mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-15 02:58:30 +00:00
- Add allowed_agents field to BaseAgent class with validation - Modify AgentTools to filter delegation targets based on allowed_agents - Update Agent.get_delegation_tools to pass delegating agent context - Support both role strings and agent instances in allowed_agents - Implement case-insensitive role matching for flexibility - Add comprehensive test coverage for all scenarios - Maintain backward compatibility (None = allow all agents) - Handle edge cases (empty list = no delegation allowed) Addresses issue #2068 for controlled hierarchical delegation Co-Authored-By: João <joao@crewai.com>
7.9 KiB
7.9 KiB