package documentation

Temporal Integration for ADK.

This module provides the necessary components to run ADK Agents within Temporal Workflows.

Module workflow Workflow utilities for Google ADK agents integration with Temporal.
Module _hitl Human-in-the-loop helpers for Google ADK agents running in Temporal workflows.
Module _mcp No module docstring; 1/1 function, 1/9 class documented
Module _model No module docstring; 3/3 functions, 1/1 class documented
Module _plugin No module docstring; 2/4 functions, 1/1 class documented

From __init__.py:

Class GoogleAdkPlugin A Temporal Worker Plugin configured for ADK.
Class HitlRequest A pending human-in-the-loop request extracted from an ADK event.
Class TemporalMcpToolSet Temporal-aware MCP toolset implementation.
Class TemporalMcpToolSetProvider Provider for creating Temporal-aware MCP toolsets.
Class TemporalModel A Temporal-based LLM model that executes model invocations as activities.
Class TemporalStatefulMcpToolSet Workflow-side handle for a stateful MCP toolset.
Class TemporalStatefulMcpToolSetProvider Provider for a stateful, pooled MCP toolset backed by a dedicated worker.
Function hitl_confirmation_response Builds the message part answering a tool-confirmation request.
Function hitl_input_response Builds the message part answering a human-input (RequestInput) request.
Function pending_hitl_requests Extracts pending human-in-the-loop requests from an ADK event.
def hitl_confirmation_response(interrupt_id: str, *, confirmed: bool, payload: Any | None = None) -> types.Part: (source)

Builds the message part answering a tool-confirmation request.

Warning

This function is experimental and may change in future versions. Use with caution in production environments.

Compose one or more parts into types.Content(role="user", parts=[...]) and pass it as new_message to runner.run_async to resume the paused run. If confirmed is false the gated tool is not executed and the model receives a rejection response instead.

Parameters
interrupt_id:strThe HitlRequest.interrupt_id being answered.
confirmed:boolWhether the human approved running the tool.
payload:Any | NoneOptional custom payload made available to the tool via tool_context.tool_confirmation.payload.
Returns
types.PartUndocumented
def hitl_input_response(interrupt_id: str, response: Any) -> types.Part: (source)

Builds the message part answering a human-input (RequestInput) request.

Warning

This function is experimental and may change in future versions. Use with caution in production environments.

Compose one or more parts into types.Content(role="user", parts=[...]) and pass it as new_message to runner.run_async to resume the paused run. Non-mapping values are wrapped as {"result": value} per ADK's convention and unwrapped on delivery to the node.

Parameters
interrupt_id:strThe HitlRequest.interrupt_id being answered.
response:AnyThe human's response value.
Returns
types.PartUndocumented
def pending_hitl_requests(event: Event) -> list[HitlRequest]: (source)

Extracts pending human-in-the-loop requests from an ADK event.

Warning

This function is experimental and may change in future versions. Use with caution in production environments.

Call this on each event yielded by runner.run_async. A non-empty result means the run is pausing for the returned requests; once run_async completes, resume by sending a new user message whose parts answer them (see hitl_input_response and hitl_confirmation_response). Auth requests (adk_request_credential) are not surfaced; see the module docstring.

Parameters
event:EventAn event yielded by runner.run_async.
Returns
list[HitlRequest]The requests carried by this event; empty for ordinary events.