dapr-agents/quickstarts
yaron2 b8cbbf50db quickstarts improvements
Signed-off-by: yaron2 <schneider.yaron@live.com>
2025-03-11 21:05:08 -07:00
..
01-hello-world More quickstarts work (#32) 2025-03-11 06:08:29 -07:00
02_llm_call_dapr Update README.md (#44) 2025-03-11 14:54:47 -07:00
02_llm_call_elevenlabs Fixes (#40) 2025-03-11 10:39:23 -07:00
02_llm_call_hugging_face Fixes (#40) 2025-03-11 10:39:23 -07:00
02_llm_call_nvidia More quickstarts work (#32) 2025-03-11 06:08:29 -07:00
02_llm_call_open_ai More quickstarts work (#32) 2025-03-11 06:08:29 -07:00
03-agent-tool-call More quickstarts work (#32) 2025-03-11 06:08:29 -07:00
04-agentic-workflow Replaced pure Dapr workflow example with parallel workflow example (#41) 2025-03-11 14:55:32 -07:00
05-multi-agent-workflow-actors increases timeout (#45) 2025-03-11 15:17:04 -07:00
05-multi-agent-workflow-dapr-workflows increases timeout (#45) 2025-03-11 15:17:04 -07:00
README.md quickstarts improvements 2025-03-11 21:05:08 -07:00
validate.sh Quickstarts and fixes (#14) 2025-03-06 09:55:49 -08:00

README.md

Dapr Agents Quickstarts

A collection of examples demonstrating how to use Dapr Agents to build applications with LLM-powered autonomous agents and event-driven workflows. Each quickstart builds upon the previous one, introducing new concepts incrementally.

Prerequisites

To run these quickstarts, you'll need:

Getting Started

  1. Clone this repository
git clone https://github.com/dapr/dapr-agents/
cd dapr-agents/quickstarts
  1. Set up environment variables
# Create .env file with your OpenAI API key
echo "OPENAI_API_KEY=your_key_here" > .env
  1. For workflow examples, initialize Dapr
dapr init
  1. Choose a quickstart Choose from the list of quickstarts below. Click here for Hello-World.

Available Quickstarts

01 - Hello World

A rapid introduction to Dapr Agents core concepts through simple demonstrations:

  • Basic LLM Usage: Simple text generation with OpenAI models
  • Creating Agents: Building agents with custom tools in under 20 lines of code
  • ReAct Pattern: Implementing reasoning and action cycles in agents
  • Simple Workflows: Setting up multi-step LLM processes

Go to Hello World

02 - LLM Call using Dapr's Conversation API

Learn how to interact with Language Models using Dapr Agents:

  • Text Completion: Generating responses to prompts
  • Structured Outputs: Converting LLM responses to Pydantic objects

This quickstart shows both basic text generation and structured data extraction. Using the DaprChatClient you can target different LLM providers without changing your agent's code.

Go to LLM Call

03 - LLM Call using the Open AI Client

Learn how to interact with Language Models using Dapr Agents:

  • Text Completion: Generating responses to prompts
  • Structured Outputs: Converting LLM responses to Pydantic objects

This quickstart shows both basic text generation and structured data extraction from LLMs. This quickstart uses the OpenAIChatClient which allows you to use audio and perform embeddings in addition to chat completion.

Note: Other specific clients are available for Elevenlabs, Huggingface and NVIDIA

Go to LLM Call

04 - Agent Tool Call

Create your first AI agent with custom tools:

  • Tool Definition: Creating reusable tools with the @tool decorator
  • Agent Configuration: Setting up agents with roles, goals, and tools
  • Function Calling: Enabling LLMs to execute Python functions

This quickstart demonstrates how to build a weather assistant that can fetch information and perform actions.

Go to Agent Tool Call

05 - Agentic Workflow

Introduction to Dapr workflows with Dapr Agents:

  • Workflow Basics: Understanding Dapr's workflow capabilities
  • Task Chaining: Creating resilient multi-step processes
  • LLM-powered Tasks: Using language models in workflows
  • Comparison: Seeing the difference between pure Dapr and Dapr Agents approaches

This quickstart shows how to orchestrate multi-step processes that combine deterministic tasks with LLM-powered reasoning.

Go to Agentic Workflow

06 - Multi-Agent Workflows

Advanced example of event-driven workflows with multiple autonomous agents:

  • Multi-agent Systems: Creating a network of specialized agents
  • Event-driven Architecture: Implementing pub/sub messaging between agents
  • Actor Model: Using Dapr Actors for stateful agent management
  • Workflow Orchestration: Coordinating agents through different selection strategies

This quickstart demonstrates a Lord of the Rings themed multi-agent system where agents collaborate to solve problems.

Go to Multi-Agent Workflows