Skip to content

diagrid-labs/dapr-agents-catalyst-samples

Repository files navigation

Dapr Agents Examples with Diagrid Catalyst

These samples demonstrate how to build and deploy durable agentic workloads using Dapr Agents, and run them with Diagrid Catalyst.

Prerequisites

Set up your local environment:

# Create a virtual environment
python3.10 -m venv .venv

# Activate the virtual environment 
source .venv/bin/activate  # On macOS/Linux
# .venv\Scripts\activate   # On Windows

# Install dependencies
pip install -r requirements.txt

Set your OpenAI API key:

export OPENAI_API_KEY=your_api_key_here

Sign up for Catalyst and Download CLI

Sign up for Diagrid Catalyst and install the CLI: https://docs.diagrid.io/catalyst/getting-started/first-api-call

Now login to Catalyst and create a project with all the infrastructure your agent needs - workflows for orchestration, pub/sub for messaging, and key-value storage for state:

Create a Project with Agentic Infrastructure

diagrid login
diagrid product use catalyst
diagrid project create dapr-agents-catalyst-samples --deploy-managed-pubsub --deploy-managed-kv --enable-managed-workflow

This provisions a complete managed Dapr environment in the cloud. The project overview shows your managed infrastructure components being deployed:

Catalyst Project Components Overview

Examples

Each example demonstrates different patterns and capabilities of Dapr Agents with Catalyst. Navigate to each folder and follow the specific instructions in their README files.

Example Description
01_non-durable-agent Start here! Simplest non-durable agent example demonstrating conversation memory and Dapr chat client integration
02_durable-agent-headless Durable headless agent triggered via REST API and PubSub that demonstrates workflow orchestration for backend integrations
03_durable-agent-chat Interactive chat agent with Chainlit UI that maintains conversation state and full workflow observability
04_agent-orchestration Workflow orchestration combining Dapr Conversation API with Dapr Agents for sequential task chains
05_customer-support-system Complete multi-agent system demonstrating complex workflow patterns and agent coordination

Next Steps

Contact Us

Do you have any questions? Reach out to us here: https://www.diagrid.io/contact-us

About

Demonstrates how to create durable agents with Dapr Agents and run them with Diagrid Catalyst

Resources

License

Stars

Watchers

Forks