When a Task has an agent assigned but the Crew is built without an
explicit agents=[...] list, setup_agents iterates an empty list and
never wires agent.crew = crew. Downstream paths that rely on the crew
reference (task.prompt() file injection, crew_agent_executor file
lookups, delegation tools) then silently no-op, so input_files attached
at the Task level are ignored.
Add a model_validator that auto-populates Crew.agents with any agent
referenced by a task so the crew behaves the same whether agents=[...]
is passed explicitly or inferred from tasks, and cover the regression
with unit tests.
Co-Authored-By: João <joao@crewai.com>
- add input_files parameter to Crew.kickoff(), Flow.kickoff(), Task, and Agent.kickoff()
- add provider-specific file uploaders for OpenAI, Anthropic, Gemini, and Bedrock
- add file type detection, constraint validation, and automatic format conversion
- add URL file source support for multimodal content
- add streaming uploads for large files
- add prompt caching support for Anthropic
- add OpenAI Responses API support