mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 05:08:12 +00:00
When agents delegate work to other agents, structured constraints (domain scope, quality requirements, temporal/geographic limits) were silently lost because only the natural language task description was passed to the delegated task. Changes: - Add 'constraints' field to Task model (list[str], default empty) - Include constraints in Task.prompt() output when present - Add 'original_task' field to BaseAgentTool to track the source task - Propagate constraints from original task to delegated task in BaseAgentTool._execute() - both as structured field and in context - Update AgentTools, Agent.get_delegation_tools(), and Crew delegation methods to thread the task through the delegation chain - Update OpenAI and LangGraph adapter get_delegation_tools signatures - Add info logging when constraints are propagated - All changes are backward compatible (task parameter is optional) Co-Authored-By: João <joao@crewai.com>