module documentation

Human-in-the-loop helpers for Google ADK agents running in Temporal workflows.

ADK pauses a run by emitting an event that carries a special function call (adk_request_input for human-input nodes, adk_request_confirmation for tool confirmation) and resumes when a later user message answers it with a matching FunctionResponse. Inside a Temporal workflow the pause maps naturally onto a durable wait: collect the pending requests from the events yielded by runner.run_async, expose them via a query, wait for responses via workflow.wait_condition on a signal or update handler, then call runner.run_async again with the response parts.

These helpers cover the wire format only; the wait topology stays ordinary Temporal workflow code. Auth requests (adk_request_credential) are not covered: ADK exchanges the credential with network I/O inside the flow, and the exchanged secret would be recorded in workflow history. Resolve credentials worker-side instead.

Constant _KIND_BY_FUNCTION_CALL_NAME Undocumented
Constant _REQUEST_CONFIRMATION_FUNCTION_CALL_NAME Undocumented
Constant _REQUEST_INPUT_FUNCTION_CALL_NAME Undocumented
_KIND_BY_FUNCTION_CALL_NAME: dict[str, Literal['input', 'tool_confirmation']] = (source)

Undocumented

Value
{_REQUEST_INPUT_FUNCTION_CALL_NAME: 'input',
 _REQUEST_CONFIRMATION_FUNCTION_CALL_NAME: 'tool_confirmation'}
_REQUEST_CONFIRMATION_FUNCTION_CALL_NAME: str = (source)

Undocumented

Value
'adk_request_confirmation'
_REQUEST_INPUT_FUNCTION_CALL_NAME: str = (source)

Undocumented

Value
'adk_request_input'