Is your feature request related to a problem? Please describe.
ADK activity_tool cannot wrap ADK function tools that use ToolContext.
When an activity_tool has a tool_context: ToolContext parameter, the wrapper tries to serialize ToolContext for workflow.execute_activity(). Since ToolContext holds non-serializable objects, serialization fails at runtime.
@activity.defn
async def get_weather(query:str, tool_context: ToolContext) -> dict:
db_url = tool_context.state.get("url", "")
return requests.get(db_url).json()
search_tool = activity_tool(search_database, start_to_close_timeout=timedelta(seconds=30))
Describe the solution you'd like
Support tool_context from ADK.
Additional context
Not sure what's the best way to support this.
Is your feature request related to a problem? Please describe.
ADK activity_tool cannot wrap ADK function tools that use
ToolContext.When an activity_tool has a
tool_context: ToolContextparameter, the wrapper tries to serializeToolContextforworkflow.execute_activity(). SinceToolContextholds non-serializable objects, serialization fails at runtime.Describe the solution you'd like
Support tool_context from ADK.
Additional context
Not sure what's the best way to support this.