Fix: Add multimodal tools support in Agent.kickoff() and kickoff_async() #3937
+342
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Add multimodal tools support in Agent.kickoff() methods
Summary
Fixes issue #3936 where setting
multimodal=Trueon an Agent did not add theAddImageToolwhen callingagent.kickoff()oragent.kickoff_async().Key Changes:
_build_runtime_tools()helper method that combines tools from all sources (agent tools, platform tools, MCP tools, and multimodal tools) without mutatingself.toolskickoff()andkickoff_async()to use this helper methodkickoff_async()was not including platform/MCP tools (now it does, matchingkickoff()behavior)Before: When
multimodal=True, the AddImageTool was never added to the agent's tools during kickoff execution.After: When
multimodal=True, the AddImageTool is properly included in the tools passed to LiteAgent, and calling kickoff multiple times doesn't duplicate tools or mutateself.tools.Review & Testing Checklist for Human
uv.lock, so CI validation is critical.test_agent_multimodal_kickoff.pyshould all passmultimodal=True, callkickoff()with an image URL, and verify the AddImageTool is actually available and works correctlykickoff()multiple times on the same agent doesn't cause tool duplication or other side effectskickoff_async()to include platform/MCP tools (previously missing). Test that agents withappsormcpsconfigured now work correctly withkickoff_async()Test Plan
Notes
kickoff()andkickoff_async()by ensuring both methods include platform/MCP tools