From fd6a332055eca1b8fb38c44bd0e49237388cf304 Mon Sep 17 00:00:00 2001 From: Eileen Yu Date: Tue, 24 Nov 2026 15:05:33 -0800 Subject: [PATCH] docs(examples): add Dapr runtime and venv prerequisites Running the example READMEs as written hit two gaps: - On Dapr runtime 1.14.5 the LangGraph simple graph starts, then fails on replay (`process` vs `execute_node_activity`). The SDK uses workflow patching, which needs runtime 1.17 or later. It completes on 1.18.11. - `dapr run -- python3 ...` uses the python3 on PATH, which fails with ModuleNotFoundError unless the repo's .venv is active. Add these to the shared prerequisites in examples/README.md, and a pointer line to it in each example README. Refs CAP-2920 Signed-off-by: Eileen Yu Co-Authored-By: Claude Opus 5.5 --- examples/README.md | 14 ++++++++++++++ examples/adk/README.md | 2 ++ examples/claude_agents/README.md | 2 ++ examples/crewai/README.md | 2 ++ examples/deepagents/README.md | 2 ++ examples/langchain/README.md | 2 ++ examples/langgraph/README.md | 2 ++ examples/openai_agents/README.md | 2 ++ examples/pydantic_ai/README.md | 2 ++ examples/smolagents/README.md | 2 ++ examples/strands/README.md | 2 ++ 11 files changed, 34 insertions(+) diff --git a/examples/README.md b/examples/README.md index 344daac9..1521329a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -57,8 +57,22 @@ Clone this repo and run any of these directly. Each subdirectory has its own REA Most examples need: - **Dapr CLI** initialized: `dapr init` ([install](https://docs.dapr.io/getting-started/install-dapr-cli/)) +- **Dapr runtime 1.17 or later.** The SDK uses workflow patching, which arrived in Dapr 1.17. On an older runtime a workflow starts, then fails on replay with a history mismatch. Check the `Runtime version` line: + ```bash + dapr --version + ``` + If it is older than 1.17, reinstall the runtime: + ```bash + dapr uninstall + dapr init + ``` - **Redis** on `localhost:6379` (handled by `dapr init`, or `docker run -d --name redis -p 6379:6379 redis:latest`) - **An LLM API key** in your env — `OPENAI_API_KEY`, `GOOGLE_API_KEY` (ADK), or `ANTHROPIC_API_KEY` (HolmesGPT) depending on the example - **Dependencies** installed from the repo root: `uv sync --all-packages --extra ` +- **The repo's virtual environment active.** `uv sync` installs into `.venv` at the repo root. The `dapr run ... -- python3 ...` commands use whatever `python3` is on your `PATH`, so activate the venv first, in the same shell: + ```bash + source .venv/bin/activate + ``` + Without it, `python3` fails with `ModuleNotFoundError` (for example `No module named 'langgraph'`). The per-framework READMEs spell out exactly which are required. diff --git a/examples/adk/README.md b/examples/adk/README.md index f5d80a82..00c739c0 100644 --- a/examples/adk/README.md +++ b/examples/adk/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/claude_agents/README.md b/examples/claude_agents/README.md index daaf0c7b..9101cd43 100644 --- a/examples/claude_agents/README.md +++ b/examples/claude_agents/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** installed and initialized: ```bash dapr init diff --git a/examples/crewai/README.md b/examples/crewai/README.md index c3d12f22..b557cf01 100644 --- a/examples/crewai/README.md +++ b/examples/crewai/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/deepagents/README.md b/examples/deepagents/README.md index 59bd32b8..b4e5bf56 100644 --- a/examples/deepagents/README.md +++ b/examples/deepagents/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/langchain/README.md b/examples/langchain/README.md index 7d3971fe..1d851542 100644 --- a/examples/langchain/README.md +++ b/examples/langchain/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** installed and initialized: ```bash dapr init diff --git a/examples/langgraph/README.md b/examples/langgraph/README.md index 1a7bc30f..475c9a49 100644 --- a/examples/langgraph/README.md +++ b/examples/langgraph/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/openai_agents/README.md b/examples/openai_agents/README.md index 25bac4d0..e4412303 100644 --- a/examples/openai_agents/README.md +++ b/examples/openai_agents/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/pydantic_ai/README.md b/examples/pydantic_ai/README.md index 6460926f..27d13939 100644 --- a/examples/pydantic_ai/README.md +++ b/examples/pydantic_ai/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** [running locally](https://docs.dapr.io/getting-started/install-dapr-cli/): ```bash dapr init diff --git a/examples/smolagents/README.md b/examples/smolagents/README.md index 158f142e..4dc87097 100644 --- a/examples/smolagents/README.md +++ b/examples/smolagents/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** installed and initialized: ```bash dapr init diff --git a/examples/strands/README.md b/examples/strands/README.md index d0d10c02..bb522ebb 100644 --- a/examples/strands/README.md +++ b/examples/strands/README.md @@ -2,6 +2,8 @@ ## Prerequisites +Check the Dapr runtime version (1.17 or later) and activate the repo's virtual environment first. See [Shared prerequisites](../README.md#shared-prerequisites). + 1. **Dapr** installed and initialized: ```bash dapr init