google_adk_agents: rename activity_tool to activity_as_tool (#347) · temporalio/samples-python@5a3d050 · GitHub
Skip to content

Commit 5a3d050

Browse files
authored
google_adk_agents: rename activity_tool to activity_as_tool (#347)
* google_adk_agents: rename activity_tool to activity_as_tool Companion to temporalio/sdk-python#1735. Requires the next temporalio release (the rename is not in 1.31.0). * Require temporalio 1.32.0 First release with activity_as_tool. The openai-agents/openai lock bumps are forced by temporalio 1.32.0's openai-agents extra (>=0.19.2,<0.20).
1 parent e652a4d commit 5a3d050

5 files changed

Lines changed: 22 additions & 21 deletions

File tree

‎google_adk_agents/README.md‎

Lines changed: 1 addition & 1 deletion

‎google_adk_agents/tools/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Tools — Temporal Activities as ADK Tools
22

33
A weather agent whose `get_weather` Temporal activity is wrapped as an ADK tool
4-
with `activity_tool(...)`. The model decides to call the tool; the tool runs as
4+
with `activity_as_tool(...)`. The model decides to call the tool; the tool runs as
55
its own Temporal activity — retryable and observable — rather than inline in the
66
workflow. This demonstrates the activity boundary for tool calls.
77

‎google_adk_agents/tools/workflows/weather_workflow.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
class WeatherAgentWorkflow:
1717
@workflow.run
1818
async def run(self, prompt: str) -> str:
19-
# activity_tool runs the tool call as a real Temporal activity, so it's
19+
# activity_as_tool runs the tool call as a real Temporal activity, so it's
2020
# retryable and shows up in history.
21-
weather_tool = temporalio.contrib.google_adk_agents.workflow.activity_tool(
21+
weather_tool = temporalio.contrib.google_adk_agents.workflow.activity_as_tool(
2222
get_weather, start_to_close_timeout=timedelta(seconds=60)
2323
)
2424

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion

‎uv.lock‎

Lines changed: 17 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)