Enhance tool handling and delegation tracking in agent executors

- Implemented immediate return for tools with result_as_answer=True in crew_agent_executor.py.
- Added delegation tracking functionality in agent_utils.py to increment delegations when specific tools are used.
- Updated tool usage logic to handle caching more effectively in tool_usage.py.
- Enhanced test cases to validate new delegation features and tool caching behavior.

This update improves the efficiency of tool execution and enhances the delegation capabilities of agents.
This commit is contained in:
lorenzejay
2026-01-22 11:35:27 -08:00
parent d0af4c6331
commit 458f6867f0
19 changed files with 5170 additions and 5665 deletions

File diff suppressed because one or more lines are too long