Skip to content

contrib/google_adk_agents: rename activity_tool to activity_as_tool - #1735

Merged
DABH merged 1 commit into
mainfrom
rename-activity-as-tool
Aug 11, 2026
Merged

contrib/google_adk_agents: rename activity_tool to activity_as_tool#1735
DABH merged 1 commit into
mainfrom
rename-activity-as-tool

Conversation

@DABH

@DABH DABH commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Breaking: google_adk_agents.workflow.activity_toolactivity_as_tool. Follows up on @brianstrauch's comment on #1683.

Why

ADK was the only plugin here not already using activity_as_tool: openai_agents, strands (plus activity_as_hook), and google_genai all do, and google_genai's is the closest twin (also returns a bare Callable the framework introspects for its schema).

It's cross-language, too: sdk-go's plugin for the same framework uses ActivityAsTool, with ActivityToolOptions for the options struct and a private activityTool type (verb for the conversion, noun for the result). We used the noun for the verb. TS uses activityAsTool. Otherwise a Go reader and a Python reader of the same ADK guide see different names for one primitive.

No alias

ADK is Pre-release at every level (prerelease banner on the docs page, ## Pre-release in the 1.24.0 notes, experimental docstring, absent from __all__), and the policy for that stage is "API is subject to change." Matches #1139 and #947, neither of which shipped an alias.

We'll have to update adk.dev, which Google controls, but it's OSS so we'll just open a PR and hope they merge it quickly. Lmk if you think that's a bad approach.

Deliberately out of scope

**kwargs: Any here is still out of step with the siblings (explicit options, or an ActivityConfig; Go uses an options struct), and the "Decorator/Wrapper" docstring is wrong — parameterized decorator use fails. Both are design questions, not renames; follow-up keeps this diff purely mechanical.

Follow-ups once merged

temporalio/documentation (google-adk.mdx, 4 mentions) · samples-python (google_adk_agents/, 3 files) · google/adk-docs (docs/integrations/temporal.md L85/97/246/272 - external PRs accepted, CLA already satisfied.

Test plan

pytest tests/contrib/google_adk_agents/ → 39 passed. ruff check --select I, ruff format --check, pyright, pydocstyle clean.

@DABH
DABH requested review from a team as code owners August 10, 2026 18:02
BREAKING CHANGE: `temporalio.contrib.google_adk_agents.workflow.activity_tool`
is renamed to `activity_as_tool`, with no compatibility alias.

Every other Temporal plugin that wraps an activity as an agent tool names
the helper `activity_as_tool`: openai_agents, strands (plus
`activity_as_hook`), and google_genai. google_adk_agents was the only
outlier at `activity_tool`.

The divergence is also cross-language. sdk-go's plugin for the same
framework already uses `ActivityAsTool`, with `ActivityToolOptions` for
the options struct and `activityTool` for the private impl type -- the
verb names the conversion, the noun names the result. Python used the
noun for the verb. sdk-typescript uses `activityAsTool` in its
openai-agents and strands plugins. Left alone, a Go user and a Python
user reading Temporal's Google ADK guide see different names for the
same primitive.

No compatibility alias. The ADK integration is Pre-release at every
level -- the docs page carries a prerelease banner, the 1.24.0 release
notes list it under Pre-release, and the function docstring warns it is
experimental -- and Temporal's published policy for that stage is
"Experimental; API is subject to change". This matches how prior plugin
renames landed (#1139 made `set_open_ai_agent_temporal_overrides`
private, #947 privatized the openai_agents module layout), neither of
which shipped an alias.

Mechanical only. `**kwargs: Any` on this helper is still out of step with
the siblings, which enumerate activity options explicitly or take an
`ActivityConfig`, and the docstring's "Decorator/Wrapper" claim is wrong
(`@activity_as_tool(...)` parameterized use fails). Both are left for a
follow-up so this diff stays reviewable as a rename.

Docs and samples PRs follow once this merges: temporalio/documentation
(docs/develop/python/integrations/google-adk.mdx), samples-python
(google_adk_agents/), and google/adk-docs
(docs/integrations/temporal.md).
@DABH
DABH force-pushed the rename-activity-as-tool branch from 43e664f to 0e2301d Compare August 10, 2026 18:13
@DABH DABH changed the title 💥 contrib/google_adk_agents: rename activity_tool to activity_as_tool contrib/google_adk_agents: rename activity_tool to activity_as_tool Aug 10, 2026

@brianstrauch brianstrauch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 as long as we're ok with making a breaking change here

@DABH

DABH commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Yeah, breaking change should be ok as this is all marked pre-release / experimental

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants