mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 05:08:12 +00:00
Closes #5758 Tools can now return crewai_files.FileInput instances (or lists/dicts of them) from their _run method to dynamically extend the agent's multimodal context. The framework detects file returns, replaces the raw return with a confirmation message, and attaches the files to the most recent user message so subsequent LLM calls include them. - Add extract_files_from_tool_result helper - Extend ToolResult dataclass with optional files field - Detect FileInput returns in ToolUsage._use / _ause - Propagate files through execute_tool_and_check_finality - Attach files to messages in CrewAgentExecutor (ReAct + native tool flows) - Mirror file attachment in LiteAgent ReAct loop - Add comprehensive unit tests