mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 08:42:38 +00:00
Agents always loaded from the hardcoded 'trained_agents_data.pkl' during inference, ignoring any custom filename supplied at training time via 'crewai train -f <custom>.pkl'. Changes: - Add 'trained_agents_data_file' field to Crew (defaults to 'trained_agents_data.pkl') so users can specify which file to load trained agent suggestions from during inference. - Update Agent._use_trained_data() to accept an optional filename parameter instead of always using the hardcoded constant. - Update apply_training_data() in agent/utils.py to propagate the crew's trained_agents_data_file to the agent. - Add tests for custom filename propagation at agent and crew levels. Closes #4905 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>