dapr/dapr-agents

Build autonomous, resilient and observable AI agents with built-in workflow orchestration, security, statefulness and telemetry.

Dapr Agents – A Framework for Building Production‑Grade AI Agent Systems

What it is – Dapr Agents is an open‑source Python SDK (and accompanying runtime) that lets you write agentic applications – programs that use large language models (LLMs) to reason, act, and collaborate – while relying on Dapr’s proven building blocks for scalability, resilience, and observability.

Why it matters – Building reliable, distributed AI agents is hard: you need state persistence, retries, service discovery, secure communication, and often integration with many data sources. Dapr Agents hides that complexity. It runs each agent as a Dapr actor (a lightweight, stateful compute unit) and orchestrates multi‑step workflows with Dapr’s durable‑execution engine, so agents continue where they left off even after crashes or network glitches.


Core capabilities (as described in the README)

Feature What you get
Scale & efficiency Thousands of agents can share a single CPU core; Dapr automatically distributes work across a cluster.
Workflow resilience Automatic retries and state recovery for every step of an agent’s task.
Kubernetes‑native Deploy agents as regular Dapr‑enabled services; the sidecar handles networking, secrets, and scaling.
Data‑driven Built‑in bindings and state stores give instant access to >50 enterprise data sources (e.g., PDFs, databases, message queues).
Multi‑agent collaboration Secure, observable service‑to‑service calls and Pub/Sub let agents talk to each other or to external services.
Vendor‑neutral Works with any cloud or on‑prem environment; supports multiple LLM providers.
AI‑specific helpers Structured output, tool selection, contextual memory, flexible prompting, and zero‑config MCPServer tool discovery.
Security & reliability mTLS encryption, Dapr resiliency policies (timeouts, retries, circuit breakers), and fine‑grained access scoping.

How a typical agent looks (Python example from the README)

from dapr_agents import DurableAgent

agent = DurableAgent(
    name="my-agent",
    role="Multi‑tool assistant",
    runtime=workflow_runtime,
)  # MCPServer tools are auto‑discovered – no extra config needed

When the agent starts, Dapr Agents queries the local Dapr sidecar for any loaded MCPServer resources, pulls their tool definitions, and registers them as workflow steps. The developer only writes the business logic; the framework handles discovery, state, and retries.


Getting started (quick‑start checklist)

  1. Install prerequisites – Dapr CLI, Python ≥ 3.11, and the uv package manager.
  2. Initialize Daprdapr init sets up the sidecar locally.
  3. Add the SDKuv add dapr-agents (or pip install dapr-agents).
  4. Run the quickstarts – the repo ships step‑by‑step tutorials that show how to create a simple agent, connect it to a data source, and scale it.
  5. Explore examples – more complete demos (including MCPServer auto‑discovery) live under examples/.

Who should use it

  • Platform teams that need a standard way to run AI agents at scale on Kubernetes or on‑prem clusters.
  • Developers building multi‑agent workflows, retrieval‑augmented generation pipelines, or autonomous assistants that must retain context across calls.
  • Enterprises that want to avoid vendor lock‑in and keep AI logic behind their own security and observability stack.

Community & contribution

  • CNCF project – governed under the Cloud Native Computing Foundation umbrella.
  • Discord & YouTube – active channels for help and announcements.
  • Contributing – follow the repo’s Code of Conduct, use uv for development, and run the test suite (uv run pytest).
  • Roadmap – Python support slated for stable release Q4 2025; other language bindings are planned.

TL;DR

Dapr Agents gives you a production‑ready platform to write AI agents that can scale, survive failures, talk to databases and each other, and stay secure, all while letting you focus on the LLM‑driven logic rather than the plumbing of distributed systems.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project