dapr

module
v1.19.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0

README

The runtime for durable execution, AI agents, and secure distributed applications

Go Report OpenSSF Docker Pulls Build Status Test Status Code Coverage FOSSA Status TODOs Good First Issues discord YouTube Bluesky X/Twitter

Dapr is an open-source runtime for building distributed applications, workflows, and AI agents. It provides durable execution, secure service-to-service communication, state management, event-driven messaging, and a consistent set of APIs that run anywhere — on Kubernetes, in the cloud, at the edge, or on your laptop.

Whether you're building AI agents, business-critical workflows, microservices, or event-driven systems, Dapr lets you focus on business logic instead of plumbing. Dapr runs as a sidecar, so every capability is available from any language over standard HTTP and gRPC, with native SDKs for .NET, Java, Python, Go, JavaScript/TypeScript, and Rust — no framework lock-in and no boilerplate to reach production-ready reliability, security, and observability.

Dapr overview

Why Dapr?

Modern applications are no longer simple request/response services. They are long-running workflows, AI agents, event-driven pipelines, multi-agent systems, and human-in-the-loop processes — and they must survive failures, maintain state, and communicate securely in production.

Building all of that reliably is hard. Dapr brings proven patterns and battle-tested building blocks together into one consistent programming model, so you don't have to reinvent durability, security, or messaging for every service you ship. You're never exposed to low-level primitives like threading, partitioning, or retry logic — and you can move seamlessly between platforms and backing infrastructure without rewriting your code. Platform teams use Dapr to provide governance and golden paths, while application teams get simple APIs that work the same everywhere.

Durable Execution

Applications fail. Infrastructure restarts. Networks partition. Your workflows and agents shouldn't lose their progress when that happens.

Dapr Workflows provide durable execution that automatically persists progress and resumes from the last completed step after:

  • Process crashes
  • Pod restarts
  • Node failures
  • Rolling deployments
  • Infrastructure interruptions

Instead of restarting from the beginning, execution picks up exactly where it left off — with no extra database or state-machine code to write. You author workflows as ordinary code in your language of choice; if the application crashes midway through, Dapr recovers automatically and resumes from the next unfinished step.

Common use cases: AI agents, customer onboarding, order processing, human-approval flows, document processing, and other multi-step business processes.

Build Reliable AI Agents

AI agents need far more than model inference. To run in production they need state, orchestration, recovery, secure communication, and governance.

Dapr provides the runtime primitives to operate agents reliably — and works alongside your existing AI frameworks and models:

  • Durable agent execution that survives crashes and restarts
  • Long-running, multi-step tasks backed by Workflows
  • Multi-agent orchestration and agent-to-agent communication
  • State persistence and memory across interactions
  • LLM integration through the Conversation API, with prompt caching and tool calling
  • Human-in-the-loop approvals and event-driven coordination
  • Automatic recovery after failures

Secure by Default

Every Dapr application is issued a cryptographically verifiable identity. Security is built in, not bolted on:

  • Mutual TLS (mTLS) for all service-to-service traffic
  • Workload identity and authentication
  • Fine-grained, least-privilege authorization policies
  • Secret management backed by your preferred vault
  • Automatic certificate issuance and rotation
  • Zero-trust communication

Control exactly which applications, agents, and services are allowed to talk to each other:

apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
  name: access-policy
spec:
  accessControl:
    defaultAction: deny
    policies:
      - appId: orders
        defaultAction: allow

Apply least-privilege access controls across your entire environment, without writing custom security infrastructure.

Verifiable Execution

For many systems, knowing that work completed isn't enough — you need proof of how it completed.

Building on Dapr's cryptographic workload identity and durable workflow history, verifiable execution provides evidence of:

  • Where work originated and which identity executed it
  • The sequence and lineage of execution
  • The authenticity of inputs and outputs
  • Whether execution history was tampered with

This enables auditable workflows and AI systems that can prove integrity, authenticity, and provenance — ideal for financial services, healthcare, government, and other compliance-sensitive environments.

Distributed Application APIs

Durable execution and AI build on the same proven building blocks that power Dapr microservices. Mix and match what you need:

API What it does
Workflows Author long-running, durable workflows and agentic processes as code
Service Invocation Reliable, secure service-to-service calls with built-in mTLS, retries, and observability
State Management Persist and query state across dozens of stores without coupling to a database
Pub/Sub Build event-driven systems on your preferred message broker with at-least-once delivery
Actors Build stateful, virtual actor-based applications
Conversation Call LLMs through a consistent API, with prompt caching and tool calling
Bindings Trigger your code from, and send events to, external systems
Secrets Retrieve secrets securely from external secret stores
Configuration Read and subscribe to application configuration consistently
Distributed Lock Coordinate access to shared resources safely
Cryptography Encrypt and decrypt data without exposing keys to your application
Jobs Schedule work to run now or in the future

All APIs are available over HTTP and gRPC, with SDKs for Java, .NET, Go, JavaScript, Python, Rust, C++, and PHP. You benefit from built-in observability, reliability, and pluggable, vendor-neutral components for state stores, message brokers, and more across Azure, AWS, and GCP.

Run Anywhere

Dapr runs as a sidecar (container or process) next to your app and works identically across:

  • Kubernetes
  • AWS, Azure, and Google Cloud
  • Virtual machines and bare metal
  • Edge and IoT environments
  • Air-gapped deployments

It's lightweight (a ~58MB binary using ~4MB of memory), supports every programming language over HTTP and gRPC, and requires no application code changes to move between platforms. Adopt it incrementally, one API at a time, with no runtime lock-in.

Trusted in Production

Dapr is a graduated Cloud Native Computing Foundation (CNCF) project, used by organizations around the world to build mission-critical applications. Teams choose Dapr to recover automatically from failures, build reliable AI systems, secure communication between services, simplify distributed architectures, and avoid infrastructure lock-in.

Get Started

See our Getting Started guide over in our docs.

Quickstarts and Samples

Community

We want your contributions and suggestions! One of the easiest ways to contribute is to participate in discussions on the mailing list, chat on IM or the bi-weekly community calls. For more information on the community engagement, developer and contributing guidelines and more, head over to the Dapr community repo.

Contact Us

Reach out with any questions you may have and we'll make sure to answer them as soon as possible!

Platform Link
💬 Discord (preferred) Discord Banner
💭 LinkedIn @daprdev
🦋 BlueSky @daprdev.bsky.social
🐤 Twitter @daprdev

Community Call

Every two weeks we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. All are welcome!

📞 Visit Upcoming Dapr Community Calls for upcoming dates and the meeting link.

📺 Visit https://www.youtube.com/@DaprDev/streams for previous community call live streams.

Videos and Podcasts

We have a variety of keynotes, podcasts, and presentations available to reference and learn from.

📺 Visit https://docs.dapr.io/contributing/presentations/ for previous talks and slide decks or our YouTube channel https://www.youtube.com/@DaprDev/videos.

Contributing to Dapr

See the Development Guide to get started with building and developing.

Repositories

Repo Description
Dapr The main repository that you are currently in. Contains the Dapr runtime code and overview documentation.
CLI The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster, provides debugging support, launches and manages Dapr instances.
Docs The documentation for Dapr.
Quickstarts This repository contains a series of simple code samples that highlight the main Dapr capabilities.
Samples This repository holds community maintained samples for various Dapr use cases.
Components-contrib The purpose of components contrib is to provide open, community driven reusable components for building distributed applications.
Go-sdk Dapr SDK for Go
Java-sdk Dapr SDK for Java
JS-sdk Dapr SDK for JavaScript
Python-sdk Dapr SDK for Python
Dotnet-sdk Dapr SDK for .NET
Rust-sdk Dapr SDK for Rust
Cpp-sdk Dapr SDK for C++
PHP-sdk Dapr SDK for PHP

Code of Conduct

Please refer to our Dapr Community Code of Conduct

Directories

Path Synopsis
charts
dapr
Package daprcrds embeds the Dapr CRD YAML files so the runtime can extract validation rules (CEL, minLength, etc.) for standalone mode where there is no Kubernetes API server to enforce them.
Package daprcrds embeds the Dapr CRD YAML files so the runtime can extract validation rules (CEL, minLength, etc.) for standalone mode where there is no Kubernetes API server to enforce them.
cmd
daprd command
injector command
operator command
placement command
scheduler command
sentry command
pkg
acl
actors/callbackstream
Package callbackstream coordinates the app-initiated actor callback stream.
Package callbackstream coordinates the app-initiated actor callback stream.
actors/hashing/rendezvous
Package rendezvous implements rendezvous (highest random weight) hashing over a set of host addresses.
Package rendezvous implements rendezvous (highest random weight) hashing over a set of host addresses.
actors/hostauthz
Package hostauthz authorizes an actor host report against the caller's SPIFFE identity, shared by the placement service and the scheduler's placement server.
Package hostauthz authorizes an actor host report against the caller's SPIFFE identity, shared by the placement service and the scheduler's placement server.
actors/internal/placement/connector/leader
Package leader is the placement connector which dials the current scheduler placement leader, discovered from the scheduler WatchHosts stream.
Package leader is the placement connector which dials the current scheduler placement leader, discovered from the scheduler WatchHosts stream.
actors/internal/placement/loops/stream/transport
Package transport abstracts the placement stream wire protocol behind a protocol-neutral interface so the placement client loops are identical for the v1 (standalone placement service, ReportDaprStatus) and v2 (scheduler, ReportActorTypes) protocols.
Package transport abstracts the placement stream wire protocol behind a protocol-neutral interface so the placement client loops are identical for the v1 (standalone placement service, ReportDaprStatus) and v2 (scheduler, ReportActorTypes) protocols.
actors/internal/placement/loops/stream/transport/v1
Package v1 implements the placement stream transport speaking the v1 protocol of the standalone placement service (ReportDaprStatus).
Package v1 implements the placement stream transport speaking the v1 protocol of the standalone placement service (ReportDaprStatus).
actors/internal/placement/loops/stream/transport/v2
Package v2 implements the placement stream transport speaking the v2 protocol of the scheduler placement service (ReportActorTypes): per actor type placement orders with seq-keyed rounds and partial tables.
Package v2 implements the placement stream transport speaking the v2 protocol of the scheduler placement service (ReportActorTypes): per actor type placement orders with seq-keyed rounds and partial tables.
actors/targets/app/transport
Package transport defines the Invoker interface that isolates HTTP and gRPC wire details from the rest of the actor target code.
Package transport defines the Invoker interface that isolates HTTP and gRPC wire details from the rest of the actor target code.
actors/targets/app/transport/grpc
Package grpc implements the transport.Invoker interface against the app-initiated SubscribeActorEventsAlpha1 stream.
Package grpc implements the transport.Invoker interface against the app-initiated SubscribeActorEventsAlpha1 stream.
actors/targets/app/transport/http
Package http implements the transport.Invoker interface for the HTTP actor callback protocol: PUT /actors/{type}/{id}/method/{method}, POST/DELETE /actors/..., with X-Daprerrorresponseheader and X-Daprremindercancel response headers signalling actor errors and reminder cancellation respectively.
Package http implements the transport.Invoker interface for the HTTP actor callback protocol: PUT /actors/{type}/{id}/method/{method}, POST/DELETE /actors/..., with X-Daprerrorresponseheader and X-Daprremindercancel response headers signalling actor errors and reminder cancellation respectively.
actors/targets/workflow/activity/claim
Package claim implements the durable execution-claim record for activity actors under the WorkflowsFastPath preview: a lease written only around placement churn, so a recovery arrival on a new placement owner can tell a live cross-host execution, or its published result, from one that died with its host.
Package claim implements the durable execution-claim record for activity actors under the WorkflowsFastPath preview: a lease written only around placement churn, so a recovery arrival on a new placement owner can tell a live cross-host execution, or its published result, from one that died with its host.
actors/targets/workflow/common/detached
Package detached runs work that must outlive the invocation requesting it, such as arming the reminder of an already committed inbox row, on a runtime-lifetime context rather than an invocation, claim, or wake context.
Package detached runs work that must outlive the invocation requesting it, such as arming the reminder of an already committed inbox row, on a runtime-lifetime context rather than an invocation, claim, or wake context.
actors/targets/workflow/common/pendingstart
Package pendingstart describes a workflow instance whose creation was committed but which has never executed a turn.
Package pendingstart describes a workflow instance whose creation was committed but which has never executed a turn.
actors/targets/workflow/executor/pending
Package pending implements a process-local rendezvous between workflow and activity task waiters and the completions reported by the application.
Package pending implements a process-local rendezvous between workflow and activity task waiters and the completions reported by the application.
api/universal
Package universal contains the implementation of APIs that are shared between gRPC and HTTP servers.
Package universal contains the implementation of APIs that are shared between gRPC and HTTP servers.
apis/components/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/configuration/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/httpEndpoint/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/mcpserver/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/resiliency/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/subscriptions/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/subscriptions/v2alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
apis/workflowaccesspolicy/v1alpha1
+kubebuilder:object:generate=true +groupName=dapr.io
+kubebuilder:object:generate=true +groupName=dapr.io
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/components/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/components/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/configuration/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/configuration/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/mcpserver/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/mcpserver/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
injector/annotations
Package annotations contains the list of annotations for Dapr deployments.
Package annotations contains the list of annotations for Dapr deployments.
injector/patcher
Package patcher contains utilities to patch a Pod to inject the Dapr sidecar container.
Package patcher contains utilities to patch a Pod to inject the Dapr sidecar container.
internal/loader/validate
Package validate provides CRD-based validation for Dapr resources in standalone mode.
Package validate provides CRD-based validation for Dapr resources in standalone mode.
placement/hashing
Package placement is an implementation of Consistent Hashing and Consistent Hashing With Bounded Loads.
Package placement is an implementation of Consistent Hashing and Consistent Hashing With Bounded Loads.
runtime/processor
Package processor manages the lifecycle of every resource that flows through daprd: components, HTTP endpoints, MCP servers and subscriptions.
Package processor manages the lifecycle of every resource that flows through daprd: components, HTTP endpoints, MCP servers and subscriptions.
runtime/scheduler/leadership
Package leadership tracks the scheduler placement leader as observed on the WatchHosts stream, for consumers (the actor placement client) which need to connect to the current leader and react to leadership changes.
Package leadership tracks the scheduler placement leader as observed on the WatchHosts stream, for consumers (the actor placement client) which need to connect to the current leader and react to leadership changes.
runtime/wfengine/inprocess
Package inprocess creates and configures the in-process workflow executor used for dapr-internal workflows (e.g.
Package inprocess creates and configures the in-process workflow executor used for dapr-internal workflows (e.g.
scheduler/server/internal/handoff
Package handoff tracks the facts deciding the actor placement authority handoff, all derived from live observation so they rebuild whenever the observers do:
Package handoff tracks the facts deciding the actor placement authority handoff, all derived from live observation so they rebuild whenever the observers do:
scheduler/server/internal/placement
Package placement implements the actor placement service inside the scheduler.
Package placement implements the actor placement service inside the scheduler.
scheduler/server/internal/placement/loops/connections
Package connections is the per namespace placement controller.
Package connections is the per namespace placement controller.
scheduler/server/internal/placement/loops/namespaces
Package namespaces is the top level placement controller, scoping streams and placement state by namespace.
Package namespaces is the top level placement controller, scoping streams and placement state by namespace.
scheduler/server/internal/placement/loops/store
Package store holds the in-memory placement membership of a single namespace: which stream hosts which actor types.
Package store holds the in-memory placement membership of a single namespace: which stream hosts which actor types.
scheduler/server/internal/placement/loops/stream
Package stream handles a single ReportActorTypes stream: sending placement orders and receiving host reports and acks.
Package stream handles a single ReportActorTypes stream: sending placement orders and receiving host reports and acks.
scheduler/server/internal/placement/loops/timeout
Package timeout schedules dissemination round timeouts, keyed by round seq.
Package timeout schedules dissemination round timeouts, keyed by round seq.
sentry/server/images
Package images defines the container images X.509 certificate extension which Sentry stamps into workload SVIDs.
Package images defines the container images X.509 certificate extension which Sentry stamps into workload SVIDs.
sse
testing
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.
tests
apps/actorapp command
apps/actorstate command
apps/healthapp command
apps/hellodapr command
apps/metadata command
apps/middleware command
apps/runtime command
apps/secretapp command
apps/stateapp command
apps/tracingapp command
integration/framework/process/statestore/cosmosbatch
Package cosmosbatch provides a state.Store implementation that wraps the in-memory store and mirrors Azure Cosmos DB's transactional-batch semantics: if any delete operation in a Multi targets a key that does not exist, the whole batch is rejected with a generic "transaction failed" error and none of the operations are applied.
Package cosmosbatch provides a state.Store implementation that wraps the in-memory store and mirrors Azure Cosmos DB's transactional-batch semantics: if any delete operation in a Multi targets a key that does not exist, the whole batch is rejected with a generic "transaction failed" error and none of the operations are applied.
integration/framework/process/statestore/fault
Package fault provides a state.Store implementation that wraps the in-memory store and lets tests deterministically inject transient transactional save failures keyed by a substring of the operation key.
Package fault provides a state.Store implementation that wraps the in-memory store and lets tests deterministically inject transient transactional save failures keyed by a substring of the operation key.
integration/framework/progress
Package progress draws a live progress line for an integration test run.
Package progress draws a live progress line for an integration test run.
integration/suite/actors/schedulerplacement
Package schedulerplacement tests actor placement served by the scheduler.
Package schedulerplacement tests actor placement served by the scheduler.
integration/suite/daprd/workflow/statefulhistory
Package statefulhistory contains integration tests for the stateful-history (delta) work-item optimization, where a worker that advertises WORKER_CAPABILITY_STATEFUL_HISTORY retains an instance's committed history between turns so the sidecar sends only the new events.
Package statefulhistory contains integration tests for the stateful-history (delta) work-item optimization, where a worker that advertises WORKER_CAPABILITY_STATEFUL_HISTORY retains an instance's committed history between turns so the sidecar sends only the new events.
perf/report command
apps/crypto module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL