Skip to content

Commit 902d229

Browse files
authored
Merge branch 'v1.16' into redis-sentinel-multiple-addresses
2 parents 792ab3d + 0c53415 commit 902d229

File tree

80 files changed

+9661
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+9661
-344
lines changed

.gitmodules

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
[submodule "sdkdocs/python"]
2-
path = sdkdocs/python
3-
url = https://github.com/dapr/python-sdk.git
4-
[submodule "sdkdocs/php"]
5-
path = sdkdocs/php
6-
url = https://github.com/dapr/php-sdk.git
71
[submodule "translations/docs-zh"]
82
path = translations/docs-zh
93
url = https://github.com/dapr/docs-zh.git
10-
branch = v1.0_content
11-
[submodule "sdkdocs/go"]
12-
path = sdkdocs/go
13-
url = https://github.com/dapr/go-sdk.git
14-
[submodule "sdkdocs/java"]
15-
path = sdkdocs/java
16-
url = https://github.com/dapr/java-sdk.git
17-
[submodule "sdkdocs/js"]
18-
path = sdkdocs/js
19-
url = https://github.com/dapr/js-sdk.git
20-
[submodule "sdkdocs/pluggable-components/go"]
21-
path = sdkdocs/pluggable-components/go
22-
url = https://github.com/dapr-sandbox/components-go-sdk
23-
[submodule "sdkdocs/rust"]
24-
path = sdkdocs/rust
25-
url = https://github.com/dapr/rust-sdk.git
4+
branch = v1.0_content

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,9 @@ Continue with the [Run local server](#run-local-server) steps.
7676
git submodule update --init --recursive
7777
```
7878

79-
1. Navigate back to the repository root and install npm packages:
79+
1. Install the npm packages:
8080

8181
```sh
82-
cd ..
8382
npm install
8483
```
8584

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-core-concepts.md

Lines changed: 294 additions & 70 deletions
Large diffs are not rendered by default.

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-getting-started.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,11 @@ Make sure you have Python already installed. `Python >=3.10`. For installation i
5353

5454
Let's create a weather assistant agent that demonstrates tool calling with Dapr state management used for conversation memory.
5555

56-
### 1. Create the environment file
56+
### 1. Create the Dapr components
5757

58-
Create a `.env` file with your OpenAI API key:
58+
Create a `components` directory and add two files:
5959

60-
```env
61-
OPENAI_API_KEY=your_api_key_here
62-
```
63-
64-
This API key is essential for agents to communicate with the LLM, as the default LLM client in the agent uses OpenAI's services. If you don't have an API key, you can [create one here](https://platform.openai.com/api-keys).
65-
66-
### 2. Create the Dapr component
67-
68-
Create a `components` directory and add `historystore.yaml`:
60+
`historystore.yaml`:
6961

7062
```yaml
7163
apiVersion: dapr.io/v1alpha1
@@ -84,36 +76,67 @@ spec:
8476
8577
This component will be used to store the conversation history, as LLMs are stateless and every chat interaction needs to send all the previous conversations to maintain context.
8678
79+
`openai.yaml`:
80+
81+
```yaml
82+
apiVersion: dapr.io/v1alpha1
83+
kind: Component
84+
metadata:
85+
name: openai
86+
spec:
87+
type: conversation.openai
88+
version: v1
89+
metadata:
90+
- name: key
91+
value: "{{OPENAI_API_KEY}}"
92+
- name: model
93+
value: gpt-5-2025-08-07
94+
- name: temperature
95+
value: 1
96+
```
97+
98+
This component wires the default `DaprChatClient` to OpenAI via the Conversation API. Replace the `{{OPENAI_API_KEY}}` placeholder with your actual OpenAI key by editing the file directly. This API key is essential for agents to communicate with the LLM, as the default chat client talks to OpenAI-compatible endpoints. If you don't have an API key, you can [create one here](https://platform.openai.com/api-keys). You can also tweak metadata (model, temperature, baseUrl, etc.) to point at compatible OpenAI-style providers.
99+
87100
### 3. Create the agent with weather tool
88101

89102
Create `weather_agent.py`:
90103

91104
```python
92105
import asyncio
93106
from dapr_agents import tool, Agent
107+
from dapr_agents.agents.configs import AgentMemoryConfig
94108
from dapr_agents.memory import ConversationDaprStateMemory
95109
from dotenv import load_dotenv
96110
97111
load_dotenv()
98112
113+
99114
@tool
100115
def get_weather() -> str:
101116
"""Get current weather."""
102117
return "It's 72°F and sunny"
103118
119+
104120
async def main():
121+
memory_config = AgentMemoryConfig(
122+
store=ConversationDaprStateMemory(
123+
store_name="historystore",
124+
session_id="hello-world",
125+
)
126+
)
127+
105128
agent = Agent(
106129
name="WeatherAgent",
107130
role="Weather Assistant",
108131
instructions=["Help users with weather information"],
109-
memory=ConversationDaprStateMemory(store_name="historystore", session_id="hello-world"),
132+
memory=memory_config,
110133
tools=[get_weather],
111134
)
112135
113136
# First interaction
114137
response1 = await agent.run("Hi! My name is John. What's the weather?")
115138
print(f"Agent: {response1}")
116-
139+
117140
# Second interaction - agent should remember the name
118141
response2 = await agent.run("What's my name?")
119142
print(f"Agent: {response2}")
@@ -184,4 +207,4 @@ Here you can browse the state store used in the agent and explore its data.
184207
## Next Steps
185208

186209
Now that you have Dapr Agents installed and running, explore more advanced examples and patterns in the [quickstarts]({{% ref dapr-agents-quickstarts.md %}}) section to learn about multi-agent workflows, durable agents, and integration with Dapr's powerful distributed capabilities.
187-
210+

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-patterns.md

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,19 @@ The Durable Agent also enables the "headless agents" approach where autonomous s
362362
**Implementation with Dapr Agents:**
363363

364364
```python
365+
import asyncio
366+
365367
from dapr_agents import DurableAgent
368+
from dapr_agents.agents.configs import (
369+
AgentExecutionConfig,
370+
AgentMemoryConfig,
371+
AgentPubSubConfig,
372+
AgentRegistryConfig,
373+
AgentStateConfig,
374+
)
375+
from dapr_agents.memory import ConversationDaprStateMemory
376+
from dapr_agents.storage.daprstores.stateservice import StateStoreService
377+
from dapr_agents.workflow.runners import AgentRunner
366378

367379
travel_planner = DurableAgent(
368380
name="TravelBuddy",
@@ -371,23 +383,58 @@ travel_planner = DurableAgent(
371383
instructions=[
372384
"Find flights to destinations",
373385
"Remember user preferences",
374-
"Provide clear flight info"
386+
"Provide clear flight info",
375387
],
376388
tools=[search_flights],
377-
message_bus_name="messagepubsub",
378-
state_store_name="workflowstatestore",
379-
state_key="workflow_state",
380-
agents_registry_store_name="workflowstatestore",
381-
agents_registry_key="agents_registry",
389+
pubsub=AgentPubSubConfig(
390+
pubsub_name="messagepubsub",
391+
agent_topic="travel.requests",
392+
broadcast_topic="travel.broadcast",
393+
),
394+
state=AgentStateConfig(
395+
store=StateStoreService(store_name="workflowstatestore"),
396+
),
397+
registry=AgentRegistryConfig(
398+
store=StateStoreService(store_name="registrystatestore"),
399+
team_name="travel-team",
400+
),
401+
execution=AgentExecutionConfig(max_iterations=3),
402+
memory=AgentMemoryConfig(
403+
store=ConversationDaprStateMemory(
404+
store_name="conversationstore",
405+
session_id="travel-session",
406+
)
407+
),
382408
)
409+
410+
async def main():
411+
travel_planner.start()
412+
runner = AgentRunner()
413+
try:
414+
result = await runner.run(
415+
travel_planner,
416+
payload={"task": "Find weekend flights to Paris"},
417+
)
418+
print(result)
419+
finally:
420+
runner.shutdown()
421+
travel_planner.stop()
422+
423+
asyncio.run(main())
383424
```
384425
The implementation follows Dapr's sidecar architecture model, where all infrastructure concerns are handled by the Dapr runtime:
385426
- **Persistent Memory** - Agent state is stored in Dapr's state store, surviving process crashes
386427
- **Workflow Orchestration** - All agent interactions managed through Dapr's workflow system
387-
- **Service Exposure** - REST endpoints for workflow management come out of the box
388-
- **Pub/Sub Input/Output** - Event-driven messaging through Dapr's pub/sub system for seamless integration
428+
- **Service Exposure** - `AgentRunner.serve()` exposes REST endpoints (e.g., `POST /run`) that schedule the agent's `@workflow_entry`
429+
- **Pub/Sub Input/Output** - `AgentRunner.subscribe()` scans the agent for `@message_router` methods and wires the configured topics with schema validation
430+
431+
The Durable Agent enables the concept of "headless agents" - autonomous systems that operate without direct user interaction. Depending on the scenario you can:
432+
433+
1. **Run** durable workflows programmatically (`runner.run` as shown above)
434+
2. **Subscribe** the agent to topics so other services can trigger it via pub/sub (`runner.subscribe`)
435+
3. **Serve** the agent behind a FastAPI app with built-in `/run` and status endpoints (`runner.serve`)
389436

390-
The Durable Agent enables the concept of "headless agents" - autonomous systems that operate without direct user interaction. Dapr's Durable Agent exposes both REST and Pub/Sub APIs, making it ideal for long-running operations that are triggered by other applications or external events. This allows agents to run in the background, processing requests asynchronously and integrating seamlessly into larger distributed systems.
437+
These options make it easy to process requests asynchronously and integrate seamlessly into larger distributed systems.
391438

392439

393440
## Choosing the Right Pattern
@@ -397,4 +444,4 @@ The journey from simple agentic workflows to fully autonomous agents represents
397444
- **Start with simpler patterns** like Augmented LLM and Prompt Chaining for well-defined tasks where predictability is crucial
398445
- **Progress to more dynamic patterns** like Parallelization and Orchestrator-Workers as your needs grow more complex
399446
- **Consider fully autonomous agents** only for open-ended tasks where the benefits of flexibility outweigh the need for strict control
400-
447+

daprdocs/content/en/developing-applications/dapr-agents/dapr-agents-quickstarts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ description: "Get started with Dapr Agents through practical step-by-step exampl
1717

1818
| Scenario | What You'll Learn |
1919
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
20-
| [Hello World](https://github.com/dapr/dapr-agents/tree/main/quickstarts/01-hello-world)<br>A rapid introduction that demonstrates core Dapr Agents concepts through simple, practical examples. | - **Basic LLM Usage**: Simple text generation with OpenAI models <br> - **Creating Agents**: Building agents with custom tools in under 20 lines of code <br> <br> - **Simple Workflows**: Setting up multi-step LLM processes |
20+
| [Hello World](https://github.com/dapr/dapr-agents/tree/main/quickstarts/01-hello-world)<br>A rapid introduction that demonstrates core Dapr Agents concepts through simple, practical examples. | - **Basic LLM Usage**: Simple text generation with OpenAI models <br> - **Creating Agents**: Building agents with custom tools in under 20 lines of code <br> <br> - **Simple Workflows**: Setting up multi-step LLM processes <br> - **DurableAgent Hosting**: Learn `AgentRunner.run`, `AgentRunner.subscribe`, and `AgentRunner.serve` using the `03_durable_agent_*.py` samples |
2121
| [LLM Call with Dapr Chat Client](https://github.com/dapr/dapr-agents/tree/main/quickstarts/02_llm_call_dapr)<br>Explore interaction with Language Models through Dapr Agents' `DaprChatClient`, featuring basic text generation with plain text prompts and templates. | - **Text Completion**: Generating responses to prompts <br> - **Swapping LLM providers**: Switching LLM backends without application code change <br> - **Resilience**: Setting timeout, retry and circuit-breaking <br> - **PII Obfuscation**: Automatically detect and mask sensitive user information |
2222
| [LLM Call with OpenAI Client](https://github.com/dapr/dapr-agents/tree/main/quickstarts/02_llm_call_open_ai)<br>Leverage native LLM client libraries with Dapr Agents using the OpenAI Client for chat completion, audio processing, and embeddings. | - **Text Completion**: Generating responses to prompts <br> - **Structured Outputs**: Converting LLM responses to Pydantic objects <br><br> *Note: Other quickstarts for specific clients are available for [Elevenlabs](https://github.com/dapr/dapr-agents/tree/main/quickstarts/02_llm_call_elevenlabs), [Hugging Face](https://github.com/dapr/dapr-agents/tree/main/quickstarts/02_llm_call_hugging_face), and [Nvidia](https://github.com/dapr/dapr-agents/tree/main/quickstarts/02_llm_call_nvidia).* |
23-
| [Agent Tool Call](https://github.com/dapr/dapr-agents/tree/main/quickstarts/03-agent-tool-call)<br>Build your first AI agent with custom tools by creating a practical weather assistant that fetches information and performs actions. | - **Tool Definition**: Creating reusable tools with the `@tool` decorator <br> - **Agent Configuration**: Setting up agents with roles, goals, and tools <br> - **Function Calling**: Enabling LLMs to execute Python functions |
23+
| Standalone & Durable Agents <br> [Standalone Agent Tool Call](https://github.com/dapr/dapr-agents/tree/main/quickstarts/03-standalone-agent-tool-call) · [Durable Agent Tool Call](https://github.com/dapr/dapr-agents/tree/main/quickstarts/03-durable-agent-tool-call) | - **Standalone Agents**: Build conversational agents with tools in under 20 lines using the `Agent` class <br> - **Durable Agents**: Upgrade to workflow-backed `DurableAgent` instances with `AgentRunner.run/subscribe/serve` <br> - **Tool Definition**: Reuse tools with the `@tool` decorator and structured args models <br> - **Function Calling**: Let LLMs invoke Python functions safely |
2424
| [Agentic Workflow](https://github.com/dapr/dapr-agents/tree/main/quickstarts/04-llm-based-workflows)<br>Dive into stateful workflows with Dapr Agents by orchestrating sequential and parallel tasks through powerful workflow capabilities. | - **LLM-powered Tasks**: Using language models in workflows <br> - **Task Chaining**: Creating resilient multi-step processes executing in sequence <br> - **Fan-out/Fan-in**: Executing activities in parallel; then synchronizing these activities until all preceding activities have completed |
2525
| [Multi-Agent Workflows](https://github.com/dapr/dapr-agents/tree/main/quickstarts/05-multi-agent-workflows)<br>Explore advanced event-driven workflows featuring a Lord of the Rings themed multi-agent system where autonomous agents collaborate to solve problems. | - **Multi-agent Systems**: Creating a network of specialized agents <br> - **Event-driven Architecture**: Implementing pub/sub messaging between agents <br> - **Workflow Orchestration**: Coordinating agents through different selection strategies|
2626
| [Multi-Agent Workflow on Kubernetes](https://github.com/dapr/dapr-agents/tree/main/quickstarts/05-multi-agent-workflow-k8s)<br>Run multi-agent workflows in Kubernetes, demonstrating deployment and orchestration of event-driven agent systems in a containerized environment. | - **Kubernetes Deployment**: Running agents on Kubernetes <br> - **Container Orchestration**: Managing agent lifecycles with K8s <br> - **Service Communication**: Inter-agent communication in K8s |

daprdocs/content/en/reference/components-reference/supported-cryptography/local-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ metadata:
3232
name: mycrypto
3333
spec:
3434
type: crypto.dapr.localstorage
35+
version: v1
3536
metadata:
36-
version: v1
3737
- name: path
3838
value: /path/to/folder/
3939
```

hugo.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ module:
275275
target: assets
276276
- source: daprdocs/archetypes
277277
target: archetypes
278-
- source: sdkdocs/python/daprdocs/content/en/python-sdk-docs
278+
- source: sdkdocs/python/content/en/python-sdk-docs
279279
target: content/developing-applications/sdks/python
280280
lang: en
281-
- source: sdkdocs/python/daprdocs/content/en/python-sdk-contributing
281+
- source: sdkdocs/python/content/en/python-sdk-contributing
282282
target: content/contributing/sdk-contrib/
283283
lang: en
284-
- source: sdkdocs/php/daprdocs/content/en/php-sdk-docs
284+
- source: sdkdocs/php/content/en/php-sdk-docs
285285
target: content/developing-applications/sdks/php
286286
lang: en
287287
- source: sdkdocs/dotnet/content/en/dotnet-sdk-docs
@@ -290,34 +290,34 @@ module:
290290
- source: sdkdocs/dotnet/content/en/dotnet-sdk-contributing
291291
target: content/contributing/sdk-contrib/
292292
lang: en
293-
- source: sdkdocs/go/daprdocs/content/en/go-sdk-docs
293+
- source: sdkdocs/go/content/en/go-sdk-docs
294294
target: content/developing-applications/sdks/go
295295
lang: en
296-
- source: sdkdocs/go/daprdocs/content/en/go-sdk-contributing
296+
- source: sdkdocs/go/content/en/go-sdk-contributing
297297
target: content/contributing/sdk-contrib/
298298
lang: en
299-
- source: sdkdocs/java/daprdocs/content/en/java-sdk-docs
299+
- source: sdkdocs/java/content/en/java-sdk-docs
300300
target: content/developing-applications/sdks/java
301301
lang: en
302-
- source: sdkdocs/java/daprdocs/content/en/java-sdk-contributing
302+
- source: sdkdocs/java/content/en/java-sdk-contributing
303303
target: content/contributing/sdk-contrib/
304304
lang: en
305-
- source: sdkdocs/js/daprdocs/content/en/js-sdk-docs
305+
- source: sdkdocs/js/content/en/js-sdk-docs
306306
target: content/developing-applications/sdks/js
307307
lang: en
308-
- source: sdkdocs/js/daprdocs/content/en/js-sdk-contributing
308+
- source: sdkdocs/js/content/en/js-sdk-contributing
309309
target: content/contributing/sdk-contrib/
310310
lang: en
311-
- source: sdkdocs/rust/daprdocs/content/en/rust-sdk-docs
311+
- source: sdkdocs/rust/content/en/rust-sdk-docs
312312
target: content/developing-applications/sdks/rust
313313
lang: en
314-
- source: sdkdocs/rust/daprdocs/content/en/rust-sdk-contributing
314+
- source: sdkdocs/rust/content/en/rust-sdk-contributing
315315
target: content/contributing/sdk-contrib/
316316
lang: en
317317
- source: sdkdocs/pluggable-components/dotnet/content/en/dotnet-sdk-docs
318318
target: content/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet
319319
lang: en
320-
- source: sdkdocs/pluggable-components/go/daprdocs/content/en/go-sdk-docs
320+
- source: sdkdocs/pluggable-components/go/content/en/go-sdk-docs
321321
target: content/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-go
322322
lang: en
323323
- source: translations/docs-zh/translated_content/zh_CN/docs

sdkdocs/dotnet/content/en/dotnet-sdk-docs/_index.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,14 @@ Put the Dapr .NET SDK to the test. Walk through the .NET quickstarts and tutoria
6666
Learn more about local development options, best practices, or browse NuGet packages to add to your existing .NET
6767
applications.
6868

69-
<div class="card-deck">
70-
<div class="card">
71-
<div class="card-body">
72-
<h5 class="card-title"><b>Development</b></h5>
73-
<p class="card-text">Learn about local development integration options</p>
74-
<a href="{{% ref dotnet-integrations %}}" class="stretched-link"></a>
75-
</div>
76-
<div class="card">
77-
<div class="card-body">
78-
<h5 class="card-title"><b>Best Practices</b></h5>
79-
<p class="card-text">Learn about best practices for developing .NET Dapr applications</p>
80-
<a href="{{% ref dotnet-guidance %}}" class="stretched-link"></a>
81-
</div>
82-
</div>
83-
<div class="card">
84-
<div class="card-body">
85-
<h5 class="card-title"><b>NuGet packages</b></h5>
86-
<p class="card-text">NuGet packages for adding the Dapr to your .NET applications.</p>
87-
<a href="https://www.nuget.org/profiles/dapr.io" class="stretched-link"></a>
88-
</div>
89-
</div>
90-
</div>
91-
<br />
69+
{{% cardpane %}}
70+
{{% card title="**Development**"%}}
71+
[Learn about local development integration options]({{% ref dotnet-integrations %}})
72+
{{% /card %}}
73+
{{% card title="**Best Practices**"%}}
74+
[Learn about best practices for developing .NET Dapr applications]({{% ref dotnet-guidance %}})
75+
{{% /card %}}
76+
{{% card title="**Nuget Packages**"%}}
77+
[NuGet packages for adding the Dapr to your .NET applications](https://www.nuget.org/profiles/dapr.io)
78+
{{% /card %}}
79+
{{% /cardpane %}}

sdkdocs/dotnet/content/en/dotnet-sdk-docs/dotnet-actors/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
type: docs
33
title: "Dapr actors .NET SDK"
44
linkTitle: "Actors"
5-
weight: 30000
5+
weight: 40000
66
description: Get up and running with the Dapr actors .NET SDK
77
---
88

0 commit comments

Comments
 (0)