Files
crewAI/lib
João 79013a6dc2 fix: respect custom trained_agents_data_file during inference
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>
2026-03-16 13:58:45 +00:00
..
2026-03-15 23:37:20 -04:00