You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,28 +72,41 @@ Some examples require extra dependencies. See each sample's directory for specif
72
72
*[external_storage](external_storage) - Offload large payloads to S3-compatible object storage, plus a codec server for the Web UI and CLI.
73
73
*[external_storage_redis](external_storage_redis) - Redis driver for external storage
74
74
*[gevent_async](gevent_async) - Combine gevent and Temporal.
75
+
*[google_adk_agents](google_adk_agents) - Run Google ADK agents as durable Temporal workflows (model calls, tools, multi-agent, MCP, streaming).
76
+
*[hello_nexus](hello_nexus) - Define a Nexus service, implement operation handlers, and call them from a workflow.
75
77
*[hello_standalone_activity](hello_standalone_activity) - Use activities without using a workflow.
76
-
*[langchain](langchain) - Orchestrate workflows for LangChain.
78
+
*[lambda_worker](lambda_worker) - Run a Temporal Worker inside an AWS Lambda function.
77
79
*[langgraph_plugin](langgraph_plugin) - Run LangGraph workflows as durable Temporal workflows (Graph API and Functional API).
80
+
*[langsmith_tracing](langsmith_tracing) - Trace Temporal workflows with LangSmith via the LangSmith plugin.
78
81
*[message_passing/introduction](message_passing/introduction/) - Introduction to queries, signals, and updates.
79
82
*[message_passing/safe_message_handlers](message_passing/safe_message_handlers/) - Safely handling updates and signals.
80
83
*[message_passing/update_with_start/lazy_initialization](message_passing/update_with_start/lazy_initialization/) - Use update-with-start to update a Shopping Cart, starting it if it does not exist.
84
+
*[nexus_cancel](nexus_cancel) - Fan out concurrent Nexus operations, take the first result, and cancel the rest.
81
85
*[Nexus Messaging](nexus_messaging): Demonstrates how send signal, update and query messages through Nexus.
82
86
This contains two samples, one sending messages to an existing workflow and a second that creates a workflow through Nexus
83
87
and sends messages to it.
88
+
*[nexus_multiple_args](nexus_multiple_args) - Map a Nexus operation to a handler workflow that takes multiple arguments.
89
+
*[nexus_standalone_operations](nexus_standalone_operations) - Execute Nexus operations directly from client code,
90
+
without wrapping them in a workflow.
84
91
*[open_telemetry](open_telemetry) - Trace workflows with OpenTelemetry.
92
+
*[openai_agents](openai_agents) - Run OpenAI Agents SDK agents as durable Temporal workflows.
85
93
*[patching](patching) - Alter workflows safely with `patch` and `deprecate_patch`.
86
94
*[polling](polling) - Recommended implementation of an activity that needs to periodically poll an external resource waiting its successful completion.
87
95
*[prometheus](prometheus) - Configure Prometheus metrics on clients/workers.
88
-
*[workflow_streams](workflow_streams) - Workflow-hosted durable event stream via `temporalio.contrib.workflow_streams`. **Experimental**
89
96
*[pydantic_converter](pydantic_converter) - Data converter for using Pydantic models.
97
+
*[pydantic_converter_v1](pydantic_converter_v1) - Data converter for Pydantic v1 models (prefer pydantic_converter for v2).
98
+
*[replay](replay) - Verify that workflow code changes are compatible with existing histories.
99
+
*[resource_pool](resource_pool) - Allocate a pool of shared resources across workflows.
90
100
*[schedules](schedules) - Demonstrates a Workflow Execution that occurs according to a schedule.
91
101
*[sentry](sentry) - Report errors to Sentry.
102
+
*[sleep_for_days](sleep_for_days) - A workflow that runs forever, sending an email every 30 days.
103
+
*[strands_plugin](strands_plugin) - Run Strands Agents as durable Temporal workflows (model calls, tools, MCP, HITL).
92
104
*[trio_async](trio_async) - Use asyncio Temporal in Trio-based environments.
93
105
*[updatable_timer](updatable_timer) - A timer that can be updated while sleeping.
106
+
*[worker_multiprocessing](worker_multiprocessing) - Leverage Python multiprocessing to parallelize workflow tasks and other CPU bound operations by running multiple workers.
94
107
*[worker_specific_task_queues](worker_specific_task_queues) - Use unique task queues to ensure activities run on specific workers.
95
108
*[worker_versioning](worker_versioning) - Use the Worker Versioning feature to more easily version your workflows & other code.
96
-
*[worker_multiprocessing](worker_multiprocessing) - Leverage Python multiprocessing to parallelize workflow tasks and other CPU bound operations by running multiple workers.
109
+
*[workflow_streams](workflow_streams) - Workflow-hosted durable event stream via `temporalio.contrib.workflow_streams`. **Experimental**
workflows using `temporalio.contrib.google_adk_agents`. Each scenario is a
9
+
self-contained subdirectory with its own worker, workflow starter, workflow and
10
+
activity packages, and README.
11
+
12
+
## Overview
13
+
14
+
The integration combines:
15
+
16
+
-**Temporal workflows** for durable orchestration of agent control flow
17
+
-**Google ADK** for agent creation, model calls, tools, and MCP integration
18
+
19
+
`GoogleAdkPlugin` configures a Pydantic payload converter, sandbox passthrough
20
+
for `google.adk` / `google.genai` / `mcp`, a deterministic ADK runtime, and the
21
+
model activities. `TemporalModel` runs each LLM call as an activity, so every
22
+
model turn is durable and observable.
23
+
24
+
## Prerequisites
25
+
26
+
- Temporal server [running locally](https://docs.temporal.io/cli/server#start-dev)
27
+
- Dependencies installed via `uv sync --group google-adk`
28
+
- Google API key set as an environment variable:
29
+
`export GOOGLE_API_KEY=your_key_here`
30
+
31
+
All scenarios default to the `gemini-2.5-flash` model. ADK also supports other
32
+
providers (for example, non-Gemini models via LiteLLM); swap the model name on
33
+
`TemporalModel` to use one.
34
+
35
+
## Scenarios
36
+
37
+
Each directory contains a complete example with its own README:
38
+
39
+
| Scenario | What it shows |
40
+
| --- | --- |
41
+
|[basic](./basic/README.md)| A single ADK agent with `TemporalModel` and one model call — no tools. The minimal end-to-end example. |
42
+
|[tools](./tools/README.md)| A Temporal activity wrapped as an ADK tool with `activity_tool`, so tool calls run as their own activities. |
43
+
|[agent_patterns](./agent_patterns/README.md)| A coordinator `LlmAgent` with `sub_agents`, each a `TemporalModel` with a per-agent activity summary. |
44
+
|[mcp](./mcp/README.md)| A local echo MCP toolset via `TemporalMcpToolSet` / `TemporalMcpToolSetProvider`, running MCP tools as activities. Self-contained, no Node required. |
45
+
|[streaming](./streaming/README.md)| Token streaming via `TemporalModel(streaming_topic=...)` + `WorkflowStream`, consumed by a starter with `WorkflowStreamClient`. |
46
+
47
+
To run any scenario, start its worker in one terminal and its workflow starter
48
+
in another:
49
+
50
+
```bash
51
+
uv run python -m google_adk_agents.<scenario>.run_worker
52
+
uv run python -m google_adk_agents.<scenario>.run_<name>_workflow
0 commit comments