From 106bb827e798bf94c19e495966cd58ef59f488d0 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 15 Oct 2026 19:58:26 -0700 Subject: [PATCH 1/7] Document standalone Spring AI package and Spring AI 2 migration --- docs/develop/java/integrations/spring-ai.mdx | 66 +++++++++++++------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index d4878aba26..67bb6ad03c 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -10,53 +10,53 @@ tags: - Temporal SDKs - Integrations - AI Frameworks -description: Build durable AI agents in Java with the Temporal Spring AI integration. +description: Run Spring AI 2 agents on Temporal with durable model calls, Activity tools, and replay-safe orchestration using Spring Boot 4. --- import { ReleaseNoteHeader } from '@site/src/components'; [Spring AI](https://docs.spring.io/spring-ai/reference/) is an agent framework for Java applications — chat clients, tool calling, vector stores, embeddings, and MCP servers, all wired through Spring Boot. -The [Temporal Spring AI integration](https://central.sonatype.com/artifact/io.temporal/temporal-spring-ai) makes Spring AI agents durable: model calls run through Temporal Activities recorded in Event history, and tools are dispatched per their type so each kind lands in the right place in Workflow execution — Activity stubs and Nexus stubs as durable operations, `@SideEffectTool` classes wrapped in `Workflow.sideEffect`, and plain tools running directly in Workflow code. Agents retry on failure and replay deterministically without changing how you write Spring AI code. +The [Temporal Spring AI integration](https://central.sonatype.com/artifact/io.temporal/spring-ai) makes Spring AI agents durable: model calls run through Temporal Activities recorded in Event history, and tools are dispatched per their type so each kind lands in the right place in Workflow execution — Activity stubs and Nexus stubs as durable operations, `@SideEffectTool` classes wrapped in `Workflow.sideEffect`, and plain tools running directly in Workflow code. Agents retry on failure and replay deterministically without changing how you write Spring AI code. -The integration is built on the Temporal Java SDK's [Plugin system](/develop/plugins-guide) and is distributed as the `io.temporal:temporal-spring-ai` module alongside the existing [Spring Boot integration](/develop/java/integrations/spring-boot-integration). +The integration is built on the Temporal Java SDK's [Plugin system](/develop/plugins-guide) and is distributed as the standalone `io.temporal:spring-ai` module alongside the existing [Spring Boot integration](/develop/java/integrations/spring-boot-integration). ## Prerequisites -The integration requires all of the following on your application's classpath. The plugin won't auto-configure if any of these are missing or below the listed minimum: +The integration requires all of the following on your application's classpath: | Dependency | Minimum version | | ----------------- | --------------- | | Java | 17 | -| Spring Boot | 3.x | -| Spring AI | 1.1.0 | -| Temporal Java SDK | 1.35.0 | +| Spring Boot | 4.0.8 (4.x) | +| Spring AI | 2.0.1 (2.x) | +| Temporal Java SDK | 1.40.0 | -You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/spring-boot-integration) and a Spring AI model starter (for example, `spring-ai-starter-model-openai`) — `temporal-spring-ai` does not pull in a model provider on its own. +You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/spring-boot-integration) and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The integration does not pull in a model provider on its own. ## Add the dependency -Add `temporal-spring-ai` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). +Add `io.temporal:spring-ai:0.1.0` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. **[Apache Maven](https://maven.apache.org/):** ```xml io.temporal - temporal-spring-ai - ${temporal-sdk.version} + spring-ai + 0.1.0 ``` **[Gradle Groovy DSL](https://gradle.org/):** ```groovy -implementation "io.temporal:temporal-spring-ai:${temporalSdkVersion}" +implementation "io.temporal:spring-ai:0.1.0" ``` -When `temporal-spring-ai` is on the classpath, the `SpringAiPlugin` auto-registers `ChatModelActivity` with all Temporal Workers created by the Spring Boot integration. Optional Activities are auto-configured when their dependencies are present: +When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-registers `ChatModelActivity` with all Temporal Workers created by the Spring Boot integration. Optional Activities are auto-configured when their dependencies are present: | Feature | Dependency | Registered Activity | | ------------ | --------------- | ------------------------ | @@ -64,6 +64,14 @@ When `temporal-spring-ai` is on the classpath, the `SpringAiPlugin` auto-registe | Embeddings | `spring-ai-rag` | `EmbeddingModelActivity` | | MCP | `spring-ai-mcp` | `McpClientActivity` | +### Upgrade from Spring AI 1 + +`io.temporal:spring-ai:0.1.0` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. + +Align your application's Spring AI and Spring Boot BOMs with the supported versions above. Spring AI 2 uses Jackson 3 and immutable chat options. Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. + +Spring AI 1 Workflow histories are incompatible with this upgrade. Complete existing executions before switching versions or use separate Worker deployments for the two versions. + ## Call a chat model from a Workflow Use `ActivityChatModel` as a Spring AI `ChatModel` inside a Workflow. Every call goes through a Temporal Activity, so model responses are durable and retried per your Activity options. @@ -106,12 +114,16 @@ public ChatWorkflowImpl(String systemPrompt) { // - Activity stubs (weatherTool) become durable AI tools // - plain workflow tool classes (stringTools) execute directly in workflow // - @SideEffectTool classes (timestampTools) are wrapped in sideEffect() - // - PromptChatMemoryAdvisor maintains conversation history + // - MessageChatMemoryAdvisor maintains conversation history this.chatClient = TemporalChatClient.builder(activityChatModel) .defaultSystem(systemPrompt) .defaultTools(weatherTool, stringTools, timestampTools) - .defaultAdvisors(PromptChatMemoryAdvisor.builder(chatMemory).build()) + .defaultAdvisors( + advisors -> + advisors + .advisors(MessageChatMemoryAdvisor.builder(chatMemory).build()) + .param(ChatMemory.CONVERSATION_ID, Workflow.getInfo().getWorkflowId())) .build(); } @@ -335,6 +347,18 @@ Keys that neither match a registered `ChatModel` bean nor equal `"default"` caus `ActivityMcpClient.create()` and `create(ActivityOptions)` work the same way for MCP tool calls, with a 30-second default timeout. +### Disable provider retries + +Disable the provider SDK's retries so each Temporal Activity attempt makes one provider request. For the Spring Boot OpenAI chat model, set: + +```properties +spring.ai.openai.chat.max-retries=0 +``` + +For manually constructed OpenAI or Anthropic models, set `.maxRetries(0)` on the provider options before building the Worker's model. Setting retries on a Workflow prompt does not reconfigure an existing provider client. + +OpenAI HTTP failures retain their native exception types. The integration classifies retryable failures and honors provider retry delays; see the [provider retry reference](https://github.com/temporalio/ai-integrations/tree/main/java/spring-ai#provider-retries) for details. + ## Provider-specific chat options Provider-specific `ChatOptions` subclasses — for example, `AnthropicChatOptions` to enable extended thinking, or `OpenAiChatOptions` to set `reasoning_effort` — pass through the Activity boundary unchanged. Attach them via `ChatClient.defaultOptions(...)` and the plugin re-applies them on the Activity side before calling the underlying model: @@ -342,12 +366,8 @@ Provider-specific `ChatOptions` subclasses — for example, `AnthropicChatOption [springai/multimodel/src/main/java/io/temporal/samples/springai/multimodel/MultiModelWorkflowImpl.java](https://github.com/temporalio/samples-java/blob/main/springai/multimodel/src/main/java/io/temporal/samples/springai/multimodel/MultiModelWorkflowImpl.java) ```java -AnthropicChatOptions thinkingOptions = - AnthropicChatOptions.builder() - .thinking(AnthropicApi.ThinkingType.ENABLED, 1024) - .temperature(1.0) - .maxTokens(4096) - .build(); +AnthropicChatOptions.Builder thinkingOptions = + AnthropicChatOptions.builder().thinkingEnabled(1024).temperature(1.0).maxTokens(4096); chatClients.put( "think", TemporalChatClient.builder(anthropicModel) @@ -360,7 +380,7 @@ chatClients.put( ``` -The pass-through relies on the `ChatOptions` subclass overriding `copy()` to return its own type — every provider class shipped with Spring AI does. +Spring AI 2 options are immutable. Pass their builder to `defaultOptions(...)`, or call `.mutate()` on an existing options object. The integration preserves provider-specific fields across the Activity boundary. ## Media in messages @@ -389,6 +409,6 @@ new McpPlugin(); ## Resources -- [`temporal-spring-ai` README](https://github.com/temporalio/sdk-java/blob/main/contrib/temporal-spring-ai/README.md) — full reference for the module +- [Temporal Spring AI README](https://github.com/temporalio/ai-integrations/tree/main/java/spring-ai) — full reference for the standalone module - [Spring Boot integration](/develop/java/integrations/spring-boot-integration) — required companion module - [Plugin system](/develop/plugins-guide) — how integrations are registered with Workers and Clients From 3857c3913d29e94c63a76706c36de5ce3d561f79 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 15 Oct 2026 20:07:29 -0700 Subject: [PATCH 2/7] Apply suggestion from @brianstrauch --- docs/develop/java/integrations/spring-ai.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index 67bb6ad03c..812c58826f 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -10,7 +10,7 @@ tags: - Temporal SDKs - Integrations - AI Frameworks -description: Run Spring AI 2 agents on Temporal with durable model calls, Activity tools, and replay-safe orchestration using Spring Boot 4. +description: Run Spring AI agents on Temporal with durable model calls, Activity tools, and replay-safe orchestration using Spring Boot. --- import { ReleaseNoteHeader } from '@site/src/components'; From 8aa8bf40a1ca4e9d565d1ccb3fedc1ad060e1c65 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 15 Oct 2026 20:07:51 -0700 Subject: [PATCH 3/7] Apply batched suggestions from code review Co-authored-by: Brian Strauch --- docs/develop/java/integrations/spring-ai.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index 812c58826f..8d6b4ee786 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -38,7 +38,7 @@ You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/sp ## Add the dependency -Add `io.temporal:spring-ai:0.1.0` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. +Add `io.temporal:spring-ai` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. **[Apache Maven](https://maven.apache.org/):** @@ -46,14 +46,14 @@ Add `io.temporal:spring-ai:0.1.0` alongside `temporal-spring-boot-starter` and a io.temporal spring-ai - 0.1.0 + ${temporal-spring-ai.version} ``` **[Gradle Groovy DSL](https://gradle.org/):** ```groovy -implementation "io.temporal:spring-ai:0.1.0" +implementation "io.temporal:spring-ai:${temporalSpringAiVersion}" ``` When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-registers `ChatModelActivity` with all Temporal Workers created by the Spring Boot integration. Optional Activities are auto-configured when their dependencies are present: @@ -64,7 +64,7 @@ When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-regi | Embeddings | `spring-ai-rag` | `EmbeddingModelActivity` | | MCP | `spring-ai-mcp` | `McpClientActivity` | -### Upgrade from Spring AI 1 +### Upgrade from Spring AI 1.x `io.temporal:spring-ai:0.1.0` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. @@ -380,7 +380,7 @@ chatClients.put( ``` -Spring AI 2 options are immutable. Pass their builder to `defaultOptions(...)`, or call `.mutate()` on an existing options object. The integration preserves provider-specific fields across the Activity boundary. +Spring AI options are immutable. Pass their builder to `defaultOptions(...)`, or call `.mutate()` on an existing options object. The integration preserves provider-specific fields across the Activity boundary. ## Media in messages From 810bd719670c42d5c2f08a7593e853a14f9fb8f6 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 15 Oct 2026 20:09:50 -0700 Subject: [PATCH 4/7] Distinguish Java runtime from Spring AI classpath dependencies --- docs/develop/java/integrations/spring-ai.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index 8d6b4ee786..0ac041d825 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -25,11 +25,10 @@ The integration is built on the Temporal Java SDK's [Plugin system](/develop/plu ## Prerequisites -The integration requires all of the following on your application's classpath: +Run your application on Java 17 or later, with Spring Boot, Spring AI, and the Temporal Java SDK on its classpath at the versions below: | Dependency | Minimum version | | ----------------- | --------------- | -| Java | 17 | | Spring Boot | 4.0.8 (4.x) | | Spring AI | 2.0.1 (2.x) | | Temporal Java SDK | 1.40.0 | From 70bb9cda4fb24ed27a38fa04da38646c5a5765ab Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 15 Oct 2026 20:16:52 -0700 Subject: [PATCH 5/7] Link Spring AI compatibility requirements instead of duplicating versions --- docs/develop/java/integrations/spring-ai.mdx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index 0ac041d825..73e267de9b 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -25,13 +25,7 @@ The integration is built on the Temporal Java SDK's [Plugin system](/develop/plu ## Prerequisites -Run your application on Java 17 or later, with Spring Boot, Spring AI, and the Temporal Java SDK on its classpath at the versions below: - -| Dependency | Minimum version | -| ----------------- | --------------- | -| Spring Boot | 4.0.8 (4.x) | -| Spring AI | 2.0.1 (2.x) | -| Temporal Java SDK | 1.40.0 | +Your application needs a Java runtime, with Spring Boot, Spring AI, and the Temporal Java SDK on its classpath. Refer to the [integration's compatibility requirements](https://github.com/temporalio/ai-integrations/tree/main/java/spring-ai#requirements-and-installation) for supported versions. You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/spring-boot-integration) and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The integration does not pull in a model provider on its own. @@ -67,7 +61,7 @@ When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-regi `io.temporal:spring-ai:0.1.0` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. -Align your application's Spring AI and Spring Boot BOMs with the supported versions above. Spring AI 2 uses Jackson 3 and immutable chat options. Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. +Align your application's Spring AI and Spring Boot BOMs with the integration's compatibility requirements. Spring AI 2 uses Jackson 3 and immutable chat options. Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. Spring AI 1 Workflow histories are incompatible with this upgrade. Complete existing executions before switching versions or use separate Worker deployments for the two versions. From 0c1b1ec5f39fff4c36021b4c3eb8120b2db72456 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Mon, 19 Oct 2026 13:34:31 -0700 Subject: [PATCH 6/7] Update AI integration guides for released standalone packages --- docs/develop/go/integrations/google-adk.mdx | 2 +- docs/develop/java/integrations/spring-ai.mdx | 8 +- docs/develop/plugins-guide.mdx | 4 +- .../python/integrations/deepagents.mdx | 23 ++-- .../python/integrations/google-adk.mdx | 20 +++- .../python/integrations/google-genai.mdx | 22 +++- docs/develop/python/integrations/index.mdx | 3 + .../develop/python/integrations/langgraph.mdx | 25 ++-- .../develop/python/integrations/langsmith.mdx | 9 +- .../python/integrations/strands-agents.mdx | 32 ++--- .../typescript/integrations/ai-sdk.mdx | 110 +++++++----------- .../integrations/google-adk-agents.mdx | 60 +++++----- docs/guides/durable-agent-on-agentcore.mdx | 2 +- 13 files changed, 165 insertions(+), 155 deletions(-) diff --git a/docs/develop/go/integrations/google-adk.mdx b/docs/develop/go/integrations/google-adk.mdx index 7c9de58607..071880461b 100644 --- a/docs/develop/go/integrations/google-adk.mdx +++ b/docs/develop/go/integrations/google-adk.mdx @@ -56,7 +56,7 @@ go get go.temporal.io/googleadk@latest import "go.temporal.io/googleadk" ``` -The source and releases are maintained in +The module is versioned separately from the Temporal Go SDK. Its source and releases are maintained in [`temporalio/ai-integrations`](https://github.com/temporalio/ai-integrations/tree/main/go/googleadk). ## Run an agent with Durable Execution diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index bbda478ee4..00c943944e 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -29,7 +29,7 @@ You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/sp ## Add the dependency -Add `io.temporal:spring-ai` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. +Add `io.temporal:spring-ai:0.1.1` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. **[Apache Maven](https://maven.apache.org/):** @@ -37,14 +37,14 @@ Add `io.temporal:spring-ai` alongside `temporal-spring-boot-starter` and a Sprin io.temporal spring-ai - ${temporal-spring-ai.version} + 0.1.1 ``` **[Gradle Groovy DSL](https://gradle.org/):** ```groovy -implementation "io.temporal:spring-ai:${temporalSpringAiVersion}" +implementation "io.temporal:spring-ai:0.1.1" ``` When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-registers `ChatModelActivity` with all Temporal Workers created by the Spring Boot integration. Optional Activities are auto-configured when their dependencies are present: @@ -57,7 +57,7 @@ When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-regi ### Upgrade from Spring AI 1.x -`io.temporal:spring-ai:0.1.0` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. +`io.temporal:spring-ai` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. Align your application's Spring AI and Spring Boot BOMs with the integration's compatibility requirements. Spring AI 2 uses Jackson 3 and immutable chat options. Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. diff --git a/docs/develop/plugins-guide.mdx b/docs/develop/plugins-guide.mdx index 6fc5968a85..68a3b33a61 100644 --- a/docs/develop/plugins-guide.mdx +++ b/docs/develop/plugins-guide.mdx @@ -38,8 +38,8 @@ If you prefer to learn by getting hands-on with code, check out some existing pl - Temporal maintains an [OpenAI Agents SDK](https://github.com/temporalio/ai-integrations/tree/main/python/openai_agents) plugin for Python -- Temporal's Python SDK ships with a - [LangGraph](https://github.com/temporalio/sdk-python/tree/main/temporalio/contrib/langgraph) plugin +- Temporal maintains a + [LangGraph](https://github.com/temporalio/ai-integrations/tree/main/python/langgraph) plugin for Python - [Temporal client and Worker plugin for Pydantic AI](https://github.com/pydantic/pydantic-ai/blob/d9b4b2540183a4426669b2824c87cdfc36144780/pydantic_ai_slim/pydantic_ai/durable_exec/temporal/__init__.py#L142) - Temporal's TypeScript SDK ships with an [OpenTelemetry Plugin](https://github.com/temporalio/sdk-typescript/blob/main/contrib/interceptors-opentelemetry/src/plugin.ts) diff --git a/docs/develop/python/integrations/deepagents.mdx b/docs/develop/python/integrations/deepagents.mdx index 5cff67670b..2a96b21803 100644 --- a/docs/develop/python/integrations/deepagents.mdx +++ b/docs/develop/python/integrations/deepagents.mdx @@ -42,19 +42,22 @@ samples for the complete code. ## Install the plugin -Install the Temporal Python SDK with Deep Agents support: +Install the standalone `temporalio-deepagents` package: ```bash -uv add "temporalio[deepagents]>=1.32.0" +uv add temporalio-deepagents ``` or with pip: ```bash -pip install "temporalio[deepagents]>=1.32.0" +pip install temporalio-deepagents ``` -Requires Python 3.11 or newer, the same floor that `deepagents` sets. +The package installs the Temporal Python SDK and Deep Agents dependencies. It requires Python 3.11 or later and Temporal +Python SDK 1.34.0 or later. + +Import `DeepAgentsPlugin`, `TemporalBackend`, and other integration helpers from `temporalio.deepagents`. ## Hello world @@ -102,7 +105,7 @@ import asyncio import os from temporalio.client import Client -from temporalio.contrib.deepagents import DeepAgentsPlugin +from temporalio.deepagents import DeepAgentsPlugin from temporalio.worker import Worker from deepagents_plugin.hello_world.workflow import HelloWorldAgent @@ -257,7 +260,7 @@ from datetime import timedelta from deepagents import create_deep_agent from deepagents.backends import FilesystemBackend from temporalio import workflow -from temporalio.contrib.deepagents import TemporalBackend +from temporalio.deepagents import TemporalBackend @workflow.defn @@ -355,7 +358,7 @@ from langchain_core.runnables import RunnableConfig from langgraph.checkpoint.memory import InMemorySaver from langgraph.types import Command from temporalio import workflow -from temporalio.contrib.deepagents import tool_as_activity +from temporalio.deepagents import tool_as_activity @workflow.defn @@ -447,7 +450,7 @@ from typing import Any from deepagents import create_deep_agent from temporalio import workflow -from temporalio.contrib.deepagents import run_deep_agent +from temporalio.deepagents import run_deep_agent @workflow.defn @@ -497,8 +500,8 @@ so external subscribers can attach by Workflow ID. ```py from langchain_core.messages import HumanMessage from temporalio import workflow -from temporalio.contrib.deepagents import TemporalModel from temporalio.contrib.workflow_streams import WorkflowStream +from temporalio.deepagents import TemporalModel STREAMING_TOPIC = "model-chunks" @@ -525,7 +528,7 @@ class StreamingWorkflow: ## Compose with an observability plugin This plugin carries no tracing context of its own. For observability, compose it with an observability plugin such as -[`temporalio.contrib.langsmith`](https://github.com/temporalio/sdk-python/tree/main/temporalio/contrib/langsmith) or +[`temporalio.langsmith`](/develop/python/integrations/langsmith) or `temporalio.contrib.opentelemetry`. Registration order of the two plugins does not matter; the observability plugin captures the LLM calls that `DeepAgentsPlugin` runs as Activities. The Workflow itself is an ordinary Deep Agent — the tracing comes entirely from composing the plugins on the Client. diff --git a/docs/develop/python/integrations/google-adk.mdx b/docs/develop/python/integrations/google-adk.mdx index d799593373..91fca5204c 100644 --- a/docs/develop/python/integrations/google-adk.mdx +++ b/docs/develop/python/integrations/google-adk.mdx @@ -40,18 +40,24 @@ import { ReleaseNoteHeader } from '@site/src/components'; ## Install -Make sure you have the Temporal Python SDK (requires version 1.28.0 or later). Then install the `google-adk`: +Install the standalone `temporalio-google-adk` package: ```bash -uv add "temporalio[google-adk]>=1.28.0" +uv add temporalio-google-adk ``` If you use pip: ```bash -pip install "temporalio[google-adk]>=1.28.0" +pip install temporalio-google-adk ``` +The package installs the Temporal Python SDK and Google ADK dependencies. It requires Python 3.10 or later and Temporal +Python SDK 1.34.0 or later. + +Import `GoogleAdkPlugin` and `TemporalModel` from `temporalio.google_adk`. Import Workflow helpers such as `activity_as_tool` +from `temporalio.google_adk.workflow`. + ## Define an agent in a Workflow Write your agent the way you normally would with the ADK. The one Temporal-specific piece is `TemporalModel`, which you @@ -172,7 +178,7 @@ class WeatherAgentWorkflow: async def run(self, prompt: str) -> str: # activity_as_tool runs the tool call as a real Temporal activity, so it's # retryable and shows up in history. - weather_tool = temporalio.contrib.google_adk_agents.workflow.activity_as_tool( + weather_tool = temporalio.google_adk.workflow.activity_as_tool( get_weather, start_to_close_timeout=timedelta(seconds=60) ) @@ -266,6 +272,12 @@ which agent ran and when. ## Use MCP tool servers +Install the package's `mcp` extra: + +```bash +uv add "temporalio-google-adk[mcp]" +``` + To give an agent tools from an [MCP](https://modelcontextprotocol.io/) server, use `TemporalMcpToolSet`. It runs the server's list-tools and call-tool operations as Activities because connecting to an MCP server is external I/O. You define a factory function for the toolset and register it with the plugin through a `TemporalMcpToolSetProvider`. diff --git a/docs/develop/python/integrations/google-genai.mdx b/docs/develop/python/integrations/google-genai.mdx index 79d5a9c577..26803647b7 100644 --- a/docs/develop/python/integrations/google-genai.mdx +++ b/docs/develop/python/integrations/google-genai.mdx @@ -46,19 +46,23 @@ samples for the complete code. ## Install the plugin -Install the Temporal Python SDK with Google GenAI support (requires `temporalio` 1.31.0 or later): +Install the standalone `temporalio-google-genai` package: ```bash -uv add "temporalio[google-genai]>=1.31.0" +uv add temporalio-google-genai ``` If you use pip: ```bash -pip install "temporalio[google-genai]>=1.31.0" +pip install temporalio-google-genai ``` -The [MCP](#use-mcp-tool-servers) path also needs the `mcp` package, which the extra does not install. +The package installs the Temporal Python SDK and Google GenAI dependencies. It requires Python 3.10 or later and Temporal +Python SDK 1.34.0 or later. + +Import `GoogleGenAIPlugin`, `TemporalAsyncClient`, and `TemporalMcpClientSession` from `temporalio.google_genai`. +For [MCP tool servers](#use-mcp-tool-servers), install the package's `mcp` extra. ## Call a model from a Workflow @@ -95,7 +99,7 @@ import os from google import genai from temporalio.client import Client -from temporalio.contrib.google_genai import GoogleGenAIPlugin +from temporalio.google_genai import GoogleGenAIPlugin from temporalio.worker import Worker from google_genai.hello_world.workflow import HelloWorldWorkflow @@ -302,6 +306,12 @@ class StructuredOutputWorkflow: ## Use MCP tool servers +Install the package's `mcp` extra: + +```bash +uv add "temporalio-google-genai[mcp]" +``` + To give a model tools from an [MCP](https://modelcontextprotocol.io/) server, register the server on the Worker and reference it by name in the Workflow. Connecting to an MCP server is external I/O, so the plugin holds the connection on the Worker and runs `list_tools` and `call_tool` as Activities against it. @@ -570,7 +580,7 @@ all of a client's calls with `activity_config`: from datetime import timedelta from temporalio.common import RetryPolicy -from temporalio.contrib.google_genai import TemporalAsyncClient +from temporalio.google_genai import TemporalAsyncClient from temporalio.workflow import ActivityConfig client = TemporalAsyncClient( diff --git a/docs/develop/python/integrations/index.mdx b/docs/develop/python/integrations/index.mdx index 688e3d730b..b9cfe1eeca 100644 --- a/docs/develop/python/integrations/index.mdx +++ b/docs/develop/python/integrations/index.mdx @@ -17,4 +17,7 @@ Most of these integrations are built on the Temporal Python SDK's [Plugin system can also use to build your own integrations. A few, such as OpenRouter, are sample patterns that need nothing inside Workflow code. +Temporal-maintained AI integrations are distributed as [standalone packages](https://github.com/temporalio/ai-integrations), +such as `temporalio-strands-agents`. Each integration guide lists its package and import paths. + diff --git a/docs/develop/python/integrations/langgraph.mdx b/docs/develop/python/integrations/langgraph.mdx index a887e407a4..f4cba5f981 100644 --- a/docs/develop/python/integrations/langgraph.mdx +++ b/docs/develop/python/integrations/langgraph.mdx @@ -39,18 +39,21 @@ samples for the complete code. ## Install the plugin -Install the Temporal Python SDK with LangGraph support (requires `temporalio` 1.27.0 or later): +Install the standalone `temporalio-langgraph` package: ```bash -uv add "temporalio[langgraph]" +uv add temporalio-langgraph ``` or with pip: ```bash -pip install "temporalio[langgraph]" +pip install temporalio-langgraph ``` +The package installs the Temporal Python SDK and LangGraph dependencies. It requires Python 3.10 or later and Temporal +Python SDK 1.34.0 or later. + :::note Python 3.11 or newer is required for the Functional API (`@entrypoint` / `@task`), for `interrupt()`, and for streaming @@ -73,7 +76,7 @@ from datetime import timedelta from langgraph.graph import START, StateGraph from temporalio import workflow -from temporalio.contrib.langgraph import graph +from temporalio.langgraph import graph async def process_query(query: str) -> str: @@ -111,7 +114,7 @@ Create a `LangGraphPlugin` with your graphs and pass it to the Worker: import asyncio from temporalio.client import Client -from temporalio.contrib.langgraph import LangGraphPlugin +from temporalio.langgraph import LangGraphPlugin from temporalio.worker import Worker @@ -190,7 +193,7 @@ from datetime import timedelta from langgraph.func import entrypoint as lg_entrypoint from langgraph.func import task from temporalio import workflow -from temporalio.contrib.langgraph import entrypoint +from temporalio.langgraph import entrypoint @task @@ -241,7 +244,7 @@ class ReactAgentWorkflow: ### Configure the Worker with the Functional API ```python -from temporalio.contrib.langgraph import LangGraphPlugin +from temporalio.langgraph import LangGraphPlugin plugin = LangGraphPlugin( entrypoints={"react-agent": react_agent}, @@ -279,7 +282,7 @@ from `runtime.context`: from langgraph.runtime import Runtime from typing_extensions import TypedDict -from temporalio.contrib.langgraph import graph +from temporalio.langgraph import graph class Context(TypedDict): @@ -309,7 +312,7 @@ or `entrypoint(name, cache=...)` in the new run to skip re-executing nodes that ```python from temporalio import workflow -from temporalio.contrib.langgraph import cache, graph +from temporalio.langgraph import cache, graph @workflow.defn @@ -344,7 +347,7 @@ from langgraph.graph import START, StateGraph from typing_extensions import TypedDict from temporalio import workflow -from temporalio.contrib.langgraph import LangGraphPlugin, graph +from temporalio.langgraph import LangGraphPlugin, graph from temporalio.contrib.workflow_streams import WorkflowStream, WorkflowStreamClient @@ -451,7 +454,7 @@ For a complete working example, see the ## Tracing For tracing your LangGraph Workflows and Activities, we recommend the -[Temporal LangSmith plugin](https://github.com/temporalio/sdk-python/tree/main/temporalio/contrib/langsmith). It +[Temporal LangSmith plugin](/develop/python/integrations/langsmith). It composes with `LangGraphPlugin` — pass both plugins to your Worker. ## Stores are not supported diff --git a/docs/develop/python/integrations/langsmith.mdx b/docs/develop/python/integrations/langsmith.mdx index 38d3123eff..66ed8c08a8 100644 --- a/docs/develop/python/integrations/langsmith.mdx +++ b/docs/develop/python/integrations/langsmith.mdx @@ -47,17 +47,18 @@ LangSmith, add the `LangSmithPlugin` to your Worker. Follow the steps below to configure your Worker. -1. Install the Temporal Python SDK with the LangSmith extra. +1. Install the standalone `temporalio-langsmith` package. It installs the Temporal Python SDK and LangSmith dependencies + and requires Python 3.10 or later and Temporal Python SDK 1.34.0 or later. ```bash - uv add "temporalio[langsmith]>=1.26.0" + uv add temporalio-langsmith ``` 2. Add the `LangSmithPlugin` to your Worker. Set `project_name` to the LangSmith project where you want traces to appear. ```python - from temporalio.contrib.langsmith import LangSmithPlugin + from temporalio.langsmith import LangSmithPlugin from temporalio.worker import Worker worker = Worker( @@ -86,7 +87,7 @@ Workflows they trigger. ```python from temporalio.client import Client -from temporalio.contrib.langsmith import LangSmithPlugin +from temporalio.langsmith import LangSmithPlugin client = await Client.connect( "localhost:7233", diff --git a/docs/develop/python/integrations/strands-agents.mdx b/docs/develop/python/integrations/strands-agents.mdx index c1c5c4fa06..8ecb2bf425 100644 --- a/docs/develop/python/integrations/strands-agents.mdx +++ b/docs/develop/python/integrations/strands-agents.mdx @@ -39,18 +39,24 @@ Install the plugin, then run a minimal Strands agent inside a Temporal Workflow. ### Install the plugin -Install the Temporal Python SDK with Strands Agents support (requires `temporalio` 1.28.0 or later): +Install the standalone `temporalio-strands-agents` package: ```bash -uv add "temporalio[strands-agents]" +uv add temporalio-strands-agents ``` or with pip: ```bash -pip install "temporalio[strands-agents]" +pip install temporalio-strands-agents ``` +The package installs the Temporal Python SDK and Strands Agents dependencies. It requires Python 3.10 or later and +Temporal Python SDK 1.34.0 or later. + +Import `StrandsPlugin`, `TemporalAgent`, and `TemporalMCPClient` from `temporalio.strands_agents`. Import Workflow helpers +such as `activity_as_tool` and `activity_as_hook` from `temporalio.strands_agents.workflow`. + ### Run a Strands agent with Durable Execution The following example runs a Strands agent inside a Temporal Workflow. Model calls execute as Temporal Activities, which @@ -68,7 +74,7 @@ maximum time each model call Activity can run: from datetime import timedelta from temporalio import workflow -from temporalio.contrib.strands import TemporalAgent +from temporalio.strands_agents import TemporalAgent @workflow.defn @@ -104,7 +110,7 @@ import asyncio import os from temporalio.client import Client -from temporalio.contrib.strands import StrandsPlugin +from temporalio.strands_agents import StrandsPlugin from temporalio.worker import Worker from strands_plugin.hello_world.workflow import HelloWorldWorkflow @@ -272,7 +278,7 @@ import asyncio import os from temporalio.client import Client -from temporalio.contrib.strands import StrandsPlugin +from temporalio.strands_agents import StrandsPlugin from temporalio.worker import Worker from strands_plugin.tools.workflow import ( @@ -386,7 +392,7 @@ Define the Workflow with a `TemporalMCPClient`: from datetime import timedelta from temporalio import workflow -from temporalio.contrib.strands import TemporalAgent, TemporalMCPClient +from temporalio.strands_agents import TemporalAgent, TemporalMCPClient @workflow.defn @@ -419,7 +425,7 @@ Register the MCP client factory on the Worker: from mcp import StdioServerParameters, stdio_client from strands.tools.mcp.mcp_client import MCPClient from temporalio.client import Client -from temporalio.contrib.strands import StrandsPlugin +from temporalio.strands_agents import StrandsPlugin from temporalio.worker import Worker # ... def _make_echo_client() -> MCPClient: @@ -604,7 +610,7 @@ import asyncio import os from temporalio.client import Client -from temporalio.contrib.strands import StrandsPlugin +from temporalio.strands_agents import StrandsPlugin from temporalio.worker import Worker from strands_plugin.activity_interrupt.workflow import ( @@ -649,7 +655,7 @@ from datetime import timedelta from pydantic import BaseModel, Field from temporalio import workflow -from temporalio.contrib.strands import TemporalAgent +from temporalio.strands_agents import TemporalAgent class PersonInfo(BaseModel): @@ -693,8 +699,8 @@ Define the Workflow with a `WorkflowStream` and a streaming topic: from datetime import timedelta from temporalio import workflow -from temporalio.contrib.strands import TemporalAgent from temporalio.contrib.workflow_streams import WorkflowStream +from temporalio.strands_agents import TemporalAgent @workflow.defn @@ -814,7 +820,7 @@ from datetime import timedelta from strands.types.content import Messages from temporalio import workflow -from temporalio.contrib.strands import TemporalAgent +from temporalio.strands_agents import TemporalAgent @dataclass @@ -875,7 +881,7 @@ To get distributed traces across model, tool, and MCP Activities, combine `Stran import opentelemetry.trace from temporalio.client import Client from temporalio.contrib.opentelemetry import OpenTelemetryPlugin, create_tracer_provider -from temporalio.contrib.strands import StrandsPlugin +from temporalio.strands_agents import StrandsPlugin from temporalio.worker import Worker diff --git a/docs/develop/typescript/integrations/ai-sdk.mdx b/docs/develop/typescript/integrations/ai-sdk.mdx index a064f29a1c..62df9c489a 100644 --- a/docs/develop/typescript/integrations/ai-sdk.mdx +++ b/docs/develop/typescript/integrations/ai-sdk.mdx @@ -7,34 +7,33 @@ tags: - AI SDK - TypeScript SDK - Temporal SDKs -description: Implement AI applications in TypeScript using the Temporal TypeScript SDK and the AI SDK. +description: Run Vercel AI SDK agents in Temporal Workflows with durable model calls, tools, MCP requests, and streamed responses in TypeScript. --- -import { ReleaseNoteHeader } from '@site/src/components'; - Temporal's integration with [Vercel's AI SDK](https://ai-sdk.dev/) lets you use the AI SDK's API directly in Workflow code while Temporal handles Durable Execution. Like all API calls, LLM API calls are non-deterministic. In a [Temporal Application](/glossary#temporal-application), that means you cannot make LLM calls directly from a [Workflow](/glossary#workflow); they must run as [Activities](/glossary#activity). The AI SDK plugin handles this automatically: when you call methods in the AI SDK such -as `generateText()`, `streamText()`, or `streamObject()`, the plugin wraps those calls in Activities behind the scenes. +as `generateText()` or `streamText()`, the plugin wraps those calls in Activities behind the scenes. This preserves the Vercel AI SDK's developer experience that you are already familiar with while Temporal handles Durable Execution for you. :::note -Import the plugin (`AiSdkPlugin`) from `@temporalio/ai-sdk` in your Worker setup, but import Workflow-side helpers such -as `temporalProvider` and `TemporalMCPClient` from the `@temporalio/ai-sdk/workflow` subpath. The `/workflow` subpath is +Import the plugin (`AiSdkPlugin`) from `@temporalio/vercel-ai-sdk` in your Worker setup. Import Workflow-side helpers +such as `temporalProvider` and `TemporalMCPClient` from `@temporalio/vercel-ai-sdk/workflow`. The `/workflow` subpath is safe to use in the deterministic Workflow sandbox. ::: All code snippets in this guide are taken from the TypeScript SDK -[ai-sdk samples](https://github.com/temporalio/samples-typescript/tree/main/ai-sdk). Refer to the samples for the +[Vercel AI SDK samples](https://github.com/temporalio/samples-typescript/tree/main/vercel-ai-sdk). Refer to the samples for the complete code and run them locally. - +The standalone integration is maintained in +[`temporalio/ai-integrations`](https://github.com/temporalio/ai-integrations/tree/main/typescript/vercel-ai-sdk). ## Prerequisites @@ -46,6 +45,7 @@ complete code and run them locally. - Ensure you have set up your local development environment by following the [Set up your local with the TypeScript SDK](/develop/typescript/set-up-your-local-typescript) guide. When you are done, leave the Temporal Development Server running if you want to test your code locally. +- Install Node.js 22.12.0 or later and Vercel AI SDK 7. ## Configure Workers to use the AI SDK @@ -55,17 +55,18 @@ the Vercel AI SDK, you need to create a Worker and configure it to use the AI SD Follow the steps below to configure your Worker. -1. Install the `@temporalio/ai-sdk` package. +1. Install the standalone [`@temporalio/vercel-ai-sdk`](https://www.npmjs.com/package/@temporalio/vercel-ai-sdk) package. + The integration is versioned separately from the Temporal TypeScript SDK and requires SDK 1.24.0 or later. ```bash - npm install @temporalio/ai-sdk + npm install @temporalio/vercel-ai-sdk ``` 2. Create a `worker.ts` file and configure the Worker to use the AI SDK plugin. ```ts {9-11} import { openai } from '@ai-sdk/openai'; - import { AiSdkPlugin } from '@temporalio/ai-sdk'; + import { AiSdkPlugin } from '@temporalio/vercel-ai-sdk'; //... other import statements, initializing a connection // to the Temporal Service to be used by the Worker @@ -78,7 +79,7 @@ Follow the steps below to configure your Worker. ], connection, namespace: 'default', - taskQueue: 'ai-sdk', + taskQueue: 'vercel-ai-sdk', workflowsPath: require.resolve('./workflows'), activities, }); @@ -87,10 +88,10 @@ Follow the steps below to configure your Worker. ``` The `modelProvider` specifies which AI provider to use when creating models. Choose the provider that best suits your - needs. In the Worker options, you are also specifying that the Worker polls the `ai-sdk` Task Queue for work in the + needs. In the Worker options, you are also specifying that the Worker polls the `vercel-ai-sdk` Task Queue for work in the `default` Namespace. Make sure that you configure your Client application to use the same Task Queue and Namespace. -3. Run the Worker. This Worker will now poll the Temporal Service for work on the `ai-sdk` Task Queue in the `default` +3. Run the Worker. This Worker will now poll the Temporal Service for work on the `vercel-ai-sdk` Task Queue in the `default` Namespace until you stop it. ```bash @@ -108,7 +109,7 @@ Follow the steps below to configure your Worker. ::: -See the full example at [ai-sdk samples](https://github.com/temporalio/samples-typescript/tree/main/ai-sdk). +See the full example at [Vercel AI SDK samples](https://github.com/temporalio/samples-typescript/tree/main/vercel-ai-sdk). ## Develop a simple haiku agent @@ -136,7 +137,7 @@ to your configured `modelProvider` to create the model. ```ts {2,6} import { generateText } from 'ai'; -import { temporalProvider } from '@temporalio/ai-sdk/workflow'; +import { temporalProvider } from '@temporalio/vercel-ai-sdk/workflow'; export async function haikuAgent(prompt: string): Promise { const result = await generateText({ @@ -161,7 +162,7 @@ For example, if you want to call an external API to get the weather, you would i from the tool function. The following is an example of an Activity that gets the weather for a given location: -[ai-sdk/src/activities.ts](https://github.com/temporalio/samples-typescript/blob/main/ai-sdk/src/activities.ts) +[vercel-ai-sdk/src/activities.ts](https://github.com/temporalio/samples-typescript/blob/main/vercel-ai-sdk/src/activities.ts) ```ts export async function getWeather(input: { location: string; @@ -181,7 +182,7 @@ the tool when needed. ```ts {15-23} import { proxyActivities } from '@temporalio/workflow'; import { generateText, tool } from 'ai'; -import { temporalProvider } from '@temporalio/ai-sdk/workflow'; +import { temporalProvider } from '@temporalio/vercel-ai-sdk/workflow'; import { z } from 'zod'; const { getWeather } = proxyActivities({ @@ -217,11 +218,11 @@ built-in implementation of a stateless MCP client that you can use inside Workfl Follow the steps below to integrate your agent with an MCP server. -1. Create a connection to the MCP servers using the `experimental_createMCPClient` function from the `@ai-sdk/mcp` +1. Create a connection to the MCP servers using the `createMCPClient` function from the `@ai-sdk/mcp` package. You can register multiple MCP servers by providing multiple factory functions in `mcpClientFactories`. ```ts - import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp'; + import { createMCPClient } from '@ai-sdk/mcp'; import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; const mcpClientFactories = { @@ -241,22 +242,22 @@ Follow the steps below to integrate your agent with an MCP server. 2. Configure the Worker to use the MCP client factories. - ```ts {5} + ```ts {6} const worker = await Worker.create({ + // ... other Worker options plugins: [ new AiSdkPlugin({ modelProvider: openai, - mcpClientFactories + mcpClientFactories, }), - ]}, - ... - ); + ], + }); ``` 3. In your agent Workflow, use `TemporalMCPClient` to get tools from the MCP server by referencing it by name: ```ts {4-5,9} - import { TemporalMCPClient, temporalProvider } from '@temporalio/ai-sdk/workflow'; + import { TemporalMCPClient, temporalProvider } from '@temporalio/vercel-ai-sdk/workflow'; export async function mcpAgent(prompt: string): Promise { const mcpClient = new TemporalMCPClient({ name: 'testServer' }); @@ -277,15 +278,15 @@ Follow the steps below to integrate your agent with an MCP server. ## Stream model output from a Workflow -The AI SDK's `streamText()` and `streamObject()` functions stream a response incrementally instead of returning it all -at once. The plugin runs the model call in an Activity and publishes each delta onto a +The AI SDK's `streamText()` function streams a response incrementally instead of returning it all at once. +The plugin runs the model call in an Activity and publishes each delta onto a [Workflow Stream](/develop/typescript/workflows/workflow-streams) topic. External consumers can subscribe to that topic by Workflow ID to render tokens live as they arrive, while the Workflow durably reassembles the final result. :::note Inside the Workflow, the streamed result is reassembled after the Activity completes, so the Workflow's own `textStream` -/ `partialObjectStream` is not incremental. Live, token-by-token deltas are delivered to **external** consumers through +/ `partialOutputStream` is not incremental. Live, token-by-token deltas are delivered to **external** consumers through a `WorkflowStreamClient`. This is inherent to Durable Execution: the Activity must run to completion before the Workflow can observe a deterministic, replayable result. @@ -303,7 +304,7 @@ published to), host a `WorkflowStream` in your Workflow, and consume the AI SDK ```ts import { streamText } from 'ai'; -import { TemporalProvider } from '@temporalio/ai-sdk/workflow'; +import { TemporalProvider } from '@temporalio/vercel-ai-sdk/workflow'; import { WorkflowStream } from '@temporalio/workflow-streams/workflow'; export const STREAM_TOPIC = 'text-stream'; @@ -314,7 +315,7 @@ const streamingProvider = new TemporalProvider({ ``` -[ai-sdk/src/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/ai-sdk/src/workflows.ts) +[vercel-ai-sdk/src/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/vercel-ai-sdk/src/workflows.ts) ```ts export async function streamingAgent(prompt: string): Promise { // Host the WorkflowStream as the first statement of the workflow so its @@ -358,7 +359,7 @@ The consumer subscribes to the topic by Workflow ID and renders each delta as it JSON-encoded AI SDK stream part: -[ai-sdk/src/client.ts](https://github.com/temporalio/samples-typescript/blob/main/ai-sdk/src/client.ts) +[vercel-ai-sdk/src/client.ts](https://github.com/temporalio/samples-typescript/blob/main/vercel-ai-sdk/src/client.ts) ```ts // Subscribe to a Workflow's stream topic and render each text delta live as it // is published by the streaming activity. Each item's payload is the @@ -380,44 +381,11 @@ async function renderStream(client: Client, workflowId: string, topic: string): ### Stream structured output -`streamObject()` streams a structured object as its JSON is generated. It flows through the same model path as -`streamText()`, so no extra wiring is needed beyond choosing a distinct `streamingTopic` so concurrent streams stay -separable. External subscribers see the object build up incrementally, and the Workflow durably resolves the final, -validated object. - - - -[ai-sdk/src/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/ai-sdk/src/workflows.ts) - -```ts -export async function streamObjectAgent(prompt: string): Promise { - new WorkflowStream(); - - const result = streamObject({ - model: objectStreamingProvider.languageModel('gpt-4o-mini'), - schema: z.object({ - recipe: z.object({ - name: z.string(), - ingredients: z.array(z.object({ name: z.string(), amount: z.string() })), - steps: z.array(z.string()), - }), - }), - prompt, - }); - - // External subscribers see the object build up incrementally via the partial - // JSON deltas published to OBJECT_STREAM_TOPIC. The workflow drains the - // partial stream and durably resolves the final, validated object. - for await (const _partial of result.partialObjectStream) { - // Draining drives the stream; the consumer renders the live partials. - } - const object = await result.object; +Use `streamText()` with `output: Output.object({ schema })` to stream structured output. Choose a distinct +`streamingTopic` for each concurrent stream. Inside the Workflow, consume `partialOutputStream` and await `result.output` +for the validated result. External subscribers receive the model deltas through Workflow Streams. - await sleep('500 milliseconds'); - return object.recipe.name; -} -``` - - +See the [Vercel AI SDK structured output guide](https://ai-sdk.dev/docs/ai-sdk-core/generating-structured-data#stream-structured-outputs) +for schemas and output options. -See the full example at [ai-sdk samples](https://github.com/temporalio/samples-typescript/tree/main/ai-sdk). +See the full example at [Vercel AI SDK samples](https://github.com/temporalio/samples-typescript/tree/main/vercel-ai-sdk). diff --git a/docs/develop/typescript/integrations/google-adk-agents.mdx b/docs/develop/typescript/integrations/google-adk-agents.mdx index f5d0db76d5..4a5c1eaffd 100644 --- a/docs/develop/typescript/integrations/google-adk-agents.mdx +++ b/docs/develop/typescript/integrations/google-adk-agents.mdx @@ -22,9 +22,9 @@ model and routes each model call to an Activity. The integration also provides W tools, MCP servers, and streamed model responses. Code snippets on this page come from the -[Google ADK samples directory](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents). +[Google ADK samples directory](https://github.com/temporalio/samples-typescript/tree/main/google-adk). - + ## Prerequisites @@ -35,19 +35,23 @@ Code snippets on this page come from the - Set up your local development environment by following [Set up your local with the TypeScript SDK](/develop/typescript/set-up-your-local-typescript). Leave the Temporal development server running to run the samples locally. -- Install Node.js 22 or later. +- Install Node.js 22.12.0 or later. ## Install the Google ADK integration -Install the [`@temporalio/google-adk-agents`](https://www.npmjs.com/package/@temporalio/google-adk-agents) package. Keep -all `@temporalio/*` packages in your application on the same version. +Install the standalone [`@temporalio/google-adk`](https://www.npmjs.com/package/@temporalio/google-adk) package. It +requires Temporal TypeScript SDK 1.24.0 or later and is versioned separately from the SDK. ```bash -npm install @temporalio/google-adk-agents +npm install @temporalio/google-adk ``` -Version 1.23.0 of the integration supports `@google/adk` 1.5.x. The upper bound is required because the Workflow bundle -uses compatibility shims for that ADK line. Newer ADK versions can fail while bundling the Workflow. +Version 0.1.0 of the integration supports `@google/adk` versions `>=2.0.0 <2.1.0` and `@google/genai` `^2.9.0`. +The ADK upper bound is required because the Workflow bundle uses compatibility shims for that ADK line. Install +`@modelcontextprotocol/sdk` if you use `TemporalMCPToolset`. + +When upgrading from `@temporalio/google-adk-agents` with ADK 1.5, complete existing Workflow Executions before switching +versions or run the two versions on separate Task Queues. Workers using ADK 2.0 cannot replay ADK 1.5 Workflow histories. The Worker reads Gemini credentials from `GOOGLE_GENAI_API_KEY` or `GEMINI_API_KEY`. Credentials remain in the Worker process. Model requests and responses are Activity inputs and results, so they are stored in Event History. Use a @@ -63,7 +67,7 @@ Workflow Updates and can query the conversation history. Create the agent and runner in Workflow code: -[google-adk-agents/src/agent-chat/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/google-adk-agents/src/agent-chat/workflows.ts) +[google-adk/src/agent-chat/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/google-adk/src/agent-chat/workflows.ts) ```ts const agent = new LlmAgent({ name: 'assistant', @@ -77,7 +81,7 @@ const runner = new InMemoryRunner({ agent, appName: 'agent-chat' }); Register `GoogleAdkPlugin` on the Worker to install the model Activities and Workflow bundler configuration: -[google-adk-agents/src/agent-chat/worker.ts](https://github.com/temporalio/samples-typescript/blob/main/google-adk-agents/src/agent-chat/worker.ts) +[google-adk/src/agent-chat/worker.ts](https://github.com/temporalio/samples-typescript/blob/main/google-adk/src/agent-chat/worker.ts) ```ts const worker = await Worker.create({ connection, @@ -97,16 +101,16 @@ Use each API from its package entry point: | Entry point | APIs | | --- | --- | -| `@temporalio/google-adk-agents` | `GoogleAdkPlugin` for Worker code | -| `@temporalio/google-adk-agents/workflow` | `TemporalModel`, `TemporalMCPToolset`, and `activityAsTool` for Workflow code | -| `@temporalio/google-adk-agents/testing` | `fakeModelProvider` and `mockMCPToolset` for tests | +| `@temporalio/google-adk` | `GoogleAdkPlugin` for Worker code | +| `@temporalio/google-adk/workflow` | `TemporalModel`, `TemporalMCPToolset`, and `activityAsTool` for Workflow code | +| `@temporalio/google-adk/testing` | `fakeModelProvider` and `mockMCPToolset` for tests | -The [agent chat sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/agent-chat) +The [agent chat sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/agent-chat) shows this Workflow, Worker, and Client together, including its Update, Query, and Continue-As-New behavior. An agent graph can delegate work among multiple `LlmAgent` instances. The agents and their transfers remain in the Workflow, while each `TemporalModel` call runs as an Activity. The -[multi-agent sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/multi-agent) +[multi-agent sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/multi-agent) shows a coordinator transferring a request to a researcher and then a writer. ## Configure model calls @@ -119,7 +123,7 @@ Set `heartbeatTimeout` to detect a dead Worker and deliver cancellation to a lon a timer, so a Heartbeat Timeout doesn't detect a stalled call; `startToCloseTimeout` bounds a stalled call. Use ADK's `outputSchema` to constrain a model response, then validate the result in the Workflow before returning it. -The [structured-output sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/structured-output) +The [structured-output sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/structured-output) shows this pattern for an incident summary. ## Add tools and MCP servers @@ -130,12 +134,12 @@ performs other I/O must run outside the Workflow. Use `activityAsTool` to expose an existing Activity to an agent. Its `name` must match an Activity registered in the Worker's `activities` option. The model's arguments object becomes the Activity's single argument, and the `activity` -option controls its timeouts and retries. The [tools sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/tools) +option controls its timeouts and retries. The [tools sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/tools) shows the Workflow and Worker configuration together. An ADK `LongRunningFunctionTool` can wait in Workflow code for external input. A Signal can release the tool asynchronously, while an Update can release it and return an accepted result to the caller. The -[human-in-the-loop sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/human-in-the-loop) +[human-in-the-loop sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/human-in-the-loop) shows both forms of approval. For MCP, register a named factory with `mcpToolsets: { : factory }` in the Worker plugin, then create a @@ -143,7 +147,7 @@ For MCP, register a named factory with `mcpToolsets: { : factory }` in the operation opens a new MCP session, so session state doesn't carry between operations unless the factory returns a long-lived toolset. MCP failures often have no status and are retryable, so set `activity.retry.maximumAttempts` on the `TemporalMCPToolset` when retries must be bounded. See the complete Worker and Workflow pair in the -[MCP sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/mcp). +[MCP sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/mcp). ## Stream model responses @@ -156,7 +160,7 @@ The model Activity publishes chunks to the topic and returns the complete respon is the deterministic value used during replay. Stream delivery is at-least-once, and a retried Activity publishes its chunks again from the beginning. -The [streaming sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/streaming) +The [streaming sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/streaming) shows how a Workflow publishes chunks and waits for a stream consumer to finish. ## Test and observe your agents @@ -178,7 +182,7 @@ ADK span attributes can contain prompts and model responses. Send them only to a sensitive attributes in the span processor. `ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS` doesn't control this behavior in a Workflow because the Workflow sandbox doesn't expose Worker environment variables. -The [observability sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents/src/observability) +The [observability sample](https://github.com/temporalio/samples-typescript/tree/main/google-adk/src/observability) shows the plugin order and an OpenTelemetry span processor that records model usage. ## Reference and troubleshooting @@ -203,7 +207,7 @@ first so that ADK's Workflow-side spans bind to its tracer provider. Register `G Client plugin isn't required. Custom payload and failure converter modules load before the plugin's polyfills. If either module imports `@google/adk` -or `@google/genai`, import `@temporalio/google-adk-agents/workflow` first in that module. +or `@google/genai`, import `@temporalio/google-adk/workflow` first in that module. ### Replay safety @@ -265,15 +269,15 @@ after the Workflow or handler frame returns. To recover in an ADK `onModelErrorC `markModelFailureHandled` and return a substitute event created with ADK's `createEvent`. Cancellation can't be handled this way. -If a model call fails with a sandbox error such as `fetch is not defined`, check that the agent uses -`new TemporalModel(...)` instead of a raw model string. A raw model makes ADK attempt the network call inside the -Workflow instead of routing it to an Activity. +If a model call fails with a sandbox error such as `fetch is not defined`, use `new TemporalModel(...)` for a custom +model instance that performs I/O. The plugin routes built-in Gemini and Apigee model strings through `TemporalModel` +automatically; keep `autoRouteModels` enabled to use that behavior. ## Resources -- [Google ADK integration package](https://www.npmjs.com/package/@temporalio/google-adk-agents) -- [Google ADK integration source](https://github.com/temporalio/sdk-typescript/tree/main/contrib/google-adk-agents) -- [Google ADK samples directory](https://github.com/temporalio/samples-typescript/tree/main/google-adk-agents) +- [Google ADK integration package](https://www.npmjs.com/package/@temporalio/google-adk) +- [Google ADK integration source](https://github.com/temporalio/ai-integrations/tree/main/typescript/google-adk) +- [Google ADK samples directory](https://github.com/temporalio/samples-typescript/tree/main/google-adk) - [Google ADK source](https://github.com/google/adk-js) - [Google ADK documentation](https://google.github.io/adk-docs/) - [Temporal TypeScript SDK documentation](/develop/typescript) diff --git a/docs/guides/durable-agent-on-agentcore.mdx b/docs/guides/durable-agent-on-agentcore.mdx index 8be2136941..c880985f55 100644 --- a/docs/guides/durable-agent-on-agentcore.mdx +++ b/docs/guides/durable-agent-on-agentcore.mdx @@ -116,7 +116,7 @@ application and Runtime settings. The deployment script generates the AgentCore ## 2. Examine the agent Workflow The sample creates a -[`TemporalAgent`](https://github.com/temporalio/sdk-python/blob/main/temporalio/contrib/strands/_temporal_agent.py) with a +[`TemporalAgent`](/develop/python/integrations/strands-agents) with a system prompt and the `execute_code` tool: From d6e8fa59dd2805ae19583dc668500144514cff80 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Mon, 19 Oct 2026 13:38:23 -0700 Subject: [PATCH 7/7] Make AI integration installation guidance version agnostic --- docs/develop/java/integrations/spring-ai.mdx | 20 ++++++++++++------- .../python/integrations/deepagents.mdx | 6 +++--- .../python/integrations/google-adk.mdx | 5 +++-- .../python/integrations/google-genai.mdx | 5 +++-- .../develop/python/integrations/langgraph.mdx | 18 ++++++++--------- .../develop/python/integrations/langsmith.mdx | 5 +++-- .../python/integrations/strands-agents.mdx | 5 +++-- .../typescript/integrations/ai-sdk.mdx | 5 +++-- .../integrations/google-adk-agents.mdx | 18 +++++++++-------- 9 files changed, 50 insertions(+), 37 deletions(-) diff --git a/docs/develop/java/integrations/spring-ai.mdx b/docs/develop/java/integrations/spring-ai.mdx index 00c943944e..6f50b7f84a 100644 --- a/docs/develop/java/integrations/spring-ai.mdx +++ b/docs/develop/java/integrations/spring-ai.mdx @@ -29,7 +29,10 @@ You also need the [`temporal-spring-boot-starter`](/develop/java/integrations/sp ## Add the dependency -Add `io.temporal:spring-ai:0.1.1` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. +Add `io.temporal:spring-ai` alongside `temporal-spring-boot-starter` and a Spring AI model starter (for example, `spring-ai-starter-model-openai`). The Spring AI integration is versioned separately from the Temporal Java SDK. + +Choose a compatible [release from Maven Central](https://central.sonatype.com/artifact/io.temporal/spring-ai). +Set `temporal-spring-ai.version` in Maven or `temporalSpringAiVersion` in Gradle to that version. **[Apache Maven](https://maven.apache.org/):** @@ -37,14 +40,14 @@ Add `io.temporal:spring-ai:0.1.1` alongside `temporal-spring-boot-starter` and a io.temporal spring-ai - 0.1.1 + ${temporal-spring-ai.version} ``` **[Gradle Groovy DSL](https://gradle.org/):** ```groovy -implementation "io.temporal:spring-ai:0.1.1" +implementation "io.temporal:spring-ai:${temporalSpringAiVersion}" ``` When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-registers `ChatModelActivity` with all Temporal Workers created by the Spring Boot integration. Optional Activities are auto-configured when their dependencies are present: @@ -55,13 +58,16 @@ When `io.temporal:spring-ai` is on the classpath, the `SpringAiPlugin` auto-regi | Embeddings | `spring-ai-rag` | `EmbeddingModelActivity` | | MCP | `spring-ai-mcp` | `McpClientActivity` | -### Upgrade from Spring AI 1.x +### Migrate from the previous package -`io.temporal:spring-ai` targets Spring AI 2 and Spring Boot 4. Spring AI 1 / Spring Boot 3 applications should remain on `io.temporal:temporal-spring-ai:1.40.x`. +When moving from `io.temporal:temporal-spring-ai`, follow the +[migration guide](https://github.com/temporalio/ai-integrations/tree/main/java/spring-ai#moving-from-spring-ai-1) +to align your application's Spring AI and Spring Boot BOMs. -Align your application's Spring AI and Spring Boot BOMs with the integration's compatibility requirements. Spring AI 2 uses Jackson 3 and immutable chat options. Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. +Pass option builders to `ChatClient`, such as `.defaultOptions(OpenAiChatOptions.builder().reasoningEffort("high"))`, or call `.mutate()` on existing options. -Spring AI 1 Workflow histories are incompatible with this upgrade. Complete existing executions before switching versions or use separate Worker deployments for the two versions. +Complete existing Workflow Executions before switching, or keep them on separate Worker deployments. Workflow histories +created with `io.temporal:temporal-spring-ai` are incompatible with `io.temporal:spring-ai`. ## Call a chat model from a Workflow diff --git a/docs/develop/python/integrations/deepagents.mdx b/docs/develop/python/integrations/deepagents.mdx index 2a96b21803..34c5d97ab6 100644 --- a/docs/develop/python/integrations/deepagents.mdx +++ b/docs/develop/python/integrations/deepagents.mdx @@ -31,7 +31,6 @@ samples for the complete code. ## Prerequisites -- Python 3.11 or newer. - This guide assumes you are already familiar with Deep Agents. If you aren't, refer to the [Deep Agents documentation](https://github.com/langchain-ai/deepagents) for more details. - If you are new to Temporal, we recommend reading [Understanding Temporal](/evaluate/understanding-temporal) or taking @@ -54,8 +53,9 @@ or with pip: pip install temporalio-deepagents ``` -The package installs the Temporal Python SDK and Deep Agents dependencies. It requires Python 3.11 or later and Temporal -Python SDK 1.34.0 or later. +The package installs the Temporal Python SDK and Deep Agents dependencies. Refer to the +[package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/deepagents/pyproject.toml) +for supported Python and dependency versions. Import `DeepAgentsPlugin`, `TemporalBackend`, and other integration helpers from `temporalio.deepagents`. diff --git a/docs/develop/python/integrations/google-adk.mdx b/docs/develop/python/integrations/google-adk.mdx index 91fca5204c..1f4acb0e07 100644 --- a/docs/develop/python/integrations/google-adk.mdx +++ b/docs/develop/python/integrations/google-adk.mdx @@ -52,8 +52,9 @@ If you use pip: pip install temporalio-google-adk ``` -The package installs the Temporal Python SDK and Google ADK dependencies. It requires Python 3.10 or later and Temporal -Python SDK 1.34.0 or later. +The package installs the Temporal Python SDK and Google ADK dependencies. Refer to the +[package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/google_adk/pyproject.toml) +for supported Python and dependency versions. Import `GoogleAdkPlugin` and `TemporalModel` from `temporalio.google_adk`. Import Workflow helpers such as `activity_as_tool` from `temporalio.google_adk.workflow`. diff --git a/docs/develop/python/integrations/google-genai.mdx b/docs/develop/python/integrations/google-genai.mdx index 26803647b7..2bfdf0c65d 100644 --- a/docs/develop/python/integrations/google-genai.mdx +++ b/docs/develop/python/integrations/google-genai.mdx @@ -58,8 +58,9 @@ If you use pip: pip install temporalio-google-genai ``` -The package installs the Temporal Python SDK and Google GenAI dependencies. It requires Python 3.10 or later and Temporal -Python SDK 1.34.0 or later. +The package installs the Temporal Python SDK and Google GenAI dependencies. Refer to the +[package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/google_genai/pyproject.toml) +for supported Python and dependency versions. Import `GoogleGenAIPlugin`, `TemporalAsyncClient`, and `TemporalMcpClientSession` from `temporalio.google_genai`. For [MCP tool servers](#use-mcp-tool-servers), install the package's `mcp` extra. diff --git a/docs/develop/python/integrations/langgraph.mdx b/docs/develop/python/integrations/langgraph.mdx index f4cba5f981..f32c351927 100644 --- a/docs/develop/python/integrations/langgraph.mdx +++ b/docs/develop/python/integrations/langgraph.mdx @@ -51,15 +51,16 @@ or with pip: pip install temporalio-langgraph ``` -The package installs the Temporal Python SDK and LangGraph dependencies. It requires Python 3.10 or later and Temporal -Python SDK 1.34.0 or later. +The package installs the Temporal Python SDK and LangGraph dependencies. Refer to the +[package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/langgraph/pyproject.toml) +for supported Python and dependency versions. :::note -Python 3.11 or newer is required for the Functional API (`@entrypoint` / `@task`), for `interrupt()`, and for streaming -from a node running in the Workflow. On older Python versions the plugin loads but emits a warning, and those features -will not work because LangGraph relies on `contextvars` propagation through `asyncio.create_task()`, which is only -available from Python 3.11 onward. +Use a Python runtime that supports the `context` parameter of +[`asyncio.create_task()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task) for the Functional API +(`@entrypoint` / `@task`), `interrupt()`, and streaming from a node running in the Workflow. LangGraph uses this parameter +to propagate `contextvars`. The plugin warns if your runtime does not support these features. ::: @@ -408,9 +409,8 @@ print(await handle.result()) :::note -Streaming from a node running in the Workflow (`execute_in: "workflow"`) requires Python -3.11 or newer, because LangGraph relies on `contextvars` propagation through -`asyncio.create_task()`. See the [installation note](#install-the-plugin) above. +For streaming from a node running in the Workflow (`execute_in: "workflow"`), check the Python runtime requirements +in the [installation note](#install-the-plugin). ::: diff --git a/docs/develop/python/integrations/langsmith.mdx b/docs/develop/python/integrations/langsmith.mdx index 66ed8c08a8..9869d81490 100644 --- a/docs/develop/python/integrations/langsmith.mdx +++ b/docs/develop/python/integrations/langsmith.mdx @@ -47,8 +47,9 @@ LangSmith, add the `LangSmithPlugin` to your Worker. Follow the steps below to configure your Worker. -1. Install the standalone `temporalio-langsmith` package. It installs the Temporal Python SDK and LangSmith dependencies - and requires Python 3.10 or later and Temporal Python SDK 1.34.0 or later. +1. Install the standalone `temporalio-langsmith` package. It installs the Temporal Python SDK and LangSmith dependencies. + Refer to the [package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/langsmith/pyproject.toml) + for supported Python and dependency versions. ```bash uv add temporalio-langsmith diff --git a/docs/develop/python/integrations/strands-agents.mdx b/docs/develop/python/integrations/strands-agents.mdx index 8ecb2bf425..cb83428f5c 100644 --- a/docs/develop/python/integrations/strands-agents.mdx +++ b/docs/develop/python/integrations/strands-agents.mdx @@ -51,8 +51,9 @@ or with pip: pip install temporalio-strands-agents ``` -The package installs the Temporal Python SDK and Strands Agents dependencies. It requires Python 3.10 or later and -Temporal Python SDK 1.34.0 or later. +The package installs the Temporal Python SDK and Strands Agents dependencies. Refer to the +[package requirements](https://github.com/temporalio/ai-integrations/blob/main/python/strands_agents/pyproject.toml) +for supported Python and dependency versions. Import `StrandsPlugin`, `TemporalAgent`, and `TemporalMCPClient` from `temporalio.strands_agents`. Import Workflow helpers such as `activity_as_tool` and `activity_as_hook` from `temporalio.strands_agents.workflow`. diff --git a/docs/develop/typescript/integrations/ai-sdk.mdx b/docs/develop/typescript/integrations/ai-sdk.mdx index 62df9c489a..fc2e69f01e 100644 --- a/docs/develop/typescript/integrations/ai-sdk.mdx +++ b/docs/develop/typescript/integrations/ai-sdk.mdx @@ -45,7 +45,8 @@ The standalone integration is maintained in - Ensure you have set up your local development environment by following the [Set up your local with the TypeScript SDK](/develop/typescript/set-up-your-local-typescript) guide. When you are done, leave the Temporal Development Server running if you want to test your code locally. -- Install Node.js 22.12.0 or later and Vercel AI SDK 7. +- Use Node.js, Temporal SDK, and Vercel AI SDK versions that satisfy the integration's + [package requirements](https://github.com/temporalio/ai-integrations/blob/main/typescript/vercel-ai-sdk/package.json). ## Configure Workers to use the AI SDK @@ -56,7 +57,7 @@ the Vercel AI SDK, you need to create a Worker and configure it to use the AI SD Follow the steps below to configure your Worker. 1. Install the standalone [`@temporalio/vercel-ai-sdk`](https://www.npmjs.com/package/@temporalio/vercel-ai-sdk) package. - The integration is versioned separately from the Temporal TypeScript SDK and requires SDK 1.24.0 or later. + The integration is versioned separately from the Temporal TypeScript SDK. ```bash npm install @temporalio/vercel-ai-sdk diff --git a/docs/develop/typescript/integrations/google-adk-agents.mdx b/docs/develop/typescript/integrations/google-adk-agents.mdx index 4a5c1eaffd..6993b916bf 100644 --- a/docs/develop/typescript/integrations/google-adk-agents.mdx +++ b/docs/develop/typescript/integrations/google-adk-agents.mdx @@ -35,23 +35,25 @@ Code snippets on this page come from the - Set up your local development environment by following [Set up your local with the TypeScript SDK](/develop/typescript/set-up-your-local-typescript). Leave the Temporal development server running to run the samples locally. -- Install Node.js 22.12.0 or later. +- Use Node.js, Temporal SDK, and Google ADK versions that satisfy the integration's + [package requirements](https://github.com/temporalio/ai-integrations/blob/main/typescript/google-adk/package.json). ## Install the Google ADK integration -Install the standalone [`@temporalio/google-adk`](https://www.npmjs.com/package/@temporalio/google-adk) package. It -requires Temporal TypeScript SDK 1.24.0 or later and is versioned separately from the SDK. +Install the standalone [`@temporalio/google-adk`](https://www.npmjs.com/package/@temporalio/google-adk) package. It is +versioned separately from the Temporal TypeScript SDK. ```bash npm install @temporalio/google-adk ``` -Version 0.1.0 of the integration supports `@google/adk` versions `>=2.0.0 <2.1.0` and `@google/genai` `^2.9.0`. -The ADK upper bound is required because the Workflow bundle uses compatibility shims for that ADK line. Install -`@modelcontextprotocol/sdk` if you use `TemporalMCPToolset`. +Keep `@google/adk` within the package's supported peer dependency range. The Workflow bundle uses compatibility shims +for that range. Install `@modelcontextprotocol/sdk` if you use `TemporalMCPToolset`. -When upgrading from `@temporalio/google-adk-agents` with ADK 1.5, complete existing Workflow Executions before switching -versions or run the two versions on separate Task Queues. Workers using ADK 2.0 cannot replay ADK 1.5 Workflow histories. +When migrating from `@temporalio/google-adk-agents`, follow the +[upgrade guidance](https://github.com/temporalio/ai-integrations/tree/main/typescript/google-adk#upgrading-from-adk-15). +Complete existing Workflow Executions before switching, or keep them on separate Task Queues. The standalone integration +cannot replay Workflow histories created with `@temporalio/google-adk-agents`. The Worker reads Gemini credentials from `GOOGLE_GENAI_API_KEY` or `GEMINI_API_KEY`. Credentials remain in the Worker process. Model requests and responses are Activity inputs and results, so they are stored in Event History. Use a