Failure-proof workflow orchestration for AI agents and cloud apps.
Build identity-aware AI agents and apps that never lose context, progress, or reliability. Powered by the open-source Dapr workflow engine.


Diagrid is trusted by:
Durable execution for the agentic era
// Workflow Definition
public class RequestEscalationWorkflow : Workflow<OrderRequest, object>
{
public override async Task<object> RunAsync(WorkflowContext context, OrderRequest order)
{
// Auto-approve orders under $1000
if (order.Amount < 1000)
{
await context.CallActivityAsync(nameof(AutoApproveActivity), order);
return null;
}
// Orders $1000+ require human approval (7 days max)
try
{
var approval = await context.WaitForExternalEventAsync<ApprovalResult>(
eventName: "human_approval",
timeout: TimeSpan.FromDays(7));
// Handle approval event
await context.CallActivityAsync(nameof(ProcessApprovalActivity), approval);
return null;
}
catch (TaskCanceledException)
{
// Handle timeout - no approval received within 7 days
await context.CallActivityAsync(nameof(HandleTimeoutActivity), order);
return null;
}
}
}
@wfr.workflow(name="request_escalation")
def request_escalation_workflow(ctx: DaprWorkflowContext, order_str: str):
order = json.loads(order_str) if isinstance(order_str, str) else order_str
amount = order.get("amount", 0)
# Auto-approve orders under $1000
if amount < 1000:
yield ctx.call_activity(auto_approve_activity, input=order)
return
# Orders $1000+ require human approval (7 days max)
approval_event = ctx.wait_for_external_event("human_approval")
timeout = ctx.create_timer(timedelta(days=7))
winner = yield when_any([approval_event, timeout])
# Handle approval event or timeout
if winner == timeout:
yield ctx.call_activity(handle_timeout_activity, input=order)
return
approval_result = approval_event.get_result()
yield ctx.call_activity(process_approval_activity, input=approval_result)
const requestEscalationWorkflow: TWorkflow = async function* (
ctx: WorkflowContext,
order: OrderRequest
): any {
// Auto-approve orders under $1000
if (order.amount < 1000) {
yield ctx.callActivity(autoApproveActivity, order);
return;
}
// Orders $1000+ require human approval (7 days max)
const approvalEvent = ctx.waitForExternalEvent("human_approval");
const timeout = ctx.createTimer(7 * 24 * 60 * 60);
const winner = yield ctx.whenAny([approvalEvent, timeout]);
// Handle approval event or timeout
if (winner == timeout) {
yield ctx.callActivity(handleTimeoutActivity, order);
return;
}
const approvalResult = approvalEvent.getResult();
yield ctx.callActivity(processApprovalActivity, approvalResult);
};
// Workflow Definition
@Component
public static class RequestEscalationWorkflow implements Workflow {
@Override
public WorkflowStub create() {
return ctx -> {
OrderRequest order = ctx.getInput(OrderRequest.class);
// Auto-approve orders under $1000
if (order.amount < 1000) {
ctx.callActivity("AutoApproveActivity", order).await();
ctx.complete("approved");
return;
}
// Orders $1000+ require human approval (7 days max)
try {
ApprovalResult approval = ctx.waitForExternalEvent("human_approval", Duration.ofDays(7), ApprovalResult.class).await();
ctx.callActivity("ProcessApprovalActivity", approval).await();
} catch (TaskCanceledException e) {
// Handle timeout
ctx.callActivity("HandleTimeoutActivity", order).await();
}
ctx.complete("order completed");
};
}
}
// Workflow Definition
func RequestEscalationWorkflow(ctx *workflow.WorkflowContext) (any, error) {
var order OrderRequest
if err := ctx.GetInput(&order); err != nil {
return nil, err
}
// Auto-approve orders under $1000
if order.Amount < 1000 {
return nil, ctx.CallActivity(AutoApproveActivity, workflow.WithActivityInput(order)).Await(nil)
}
// Orders $1000+ require human approval (7 days max)
var approval ApprovalResult
err := ctx.WaitForExternalEvent("human_approval", time.Hour*24*7).Await(&approval)
// Handle approval event or timeout
if err == nil {
return nil, ctx.CallActivity(ProcessApprovalActivity, workflow.WithActivityInput(approval)).Await(nil)
}
return nil, ctx.CallActivity(HandleTimeoutActivity, workflow.WithActivityInput(order)).Await(nil)
}
Author workflows in code to automate complex business processes that are stateful, durable, and long-running.
Automatic handling of failures and errors
Support for task chaining, fan-out/fan-in, monitor and external system interaction
Workflow state can be stored in your database
async def main():
order_processor = DurableAgent(
name="OrderProcessingAgent",
role="Order Processing Specialist",
goal="Process customer orders with appropriate approval workflows",
instructions=[
"You are an order processing specialist that handles customer orders.",
"For orders under $1000, automatically approve them.",
"For orders $1000 or more, escalate them for manual approval.",
"Use the process_order tool to handle order processing.",
"Provide clear status updates to customers."
],
tools=[process_order],
# Dapr conversation api for LLM interactions
llm=DaprChatClient(),
# Execution state (workflow progress, retries, failure recovery)
state_store_name="statestore",
state_key="execution-orders",
# Long-term memory (order history, customer preferences)
memory=ConversationDaprStateMemory(
session_id=f"session-orders-{uuid.uuid4().hex[:8]}"
),
# Pub/Sub input for real-time interaction
message_bus_name="message-pubsub",
# Agent discovery store
agents_registry_store_name="registry-state",
)Python
Write agents that have built-in reliability, observability and identity. Use CNCF’s Dapr Agents framework or bring your own.
Built-in reliability, observability and identity
Support for task chaining, fan-out/fan-in, monitor, and external system interaction
Secure Agent-to-Agent communication using HTTP, gRPC or Pub/Sub
The enterprise platform for workflows and AI agents
Write, secure and govern complex workflows and AI agents. Connects to your infrastructure, runs in your cloud.
Your App. Your Compute
SDKs
APIs for agents and microservices
Your Infrastructure and LLMs
Durable workflows
Run multi-agent and cloud app workflows that survive crashes, restarts, and redeploys - using SDKs in multiple languages. Catalyst powers the durable execution engine and provides workflow visualization for total reliability.

Agentic ready
Catalyst natively supports AI agents, enabling structured orchestration for multi-step reasoning, tool use, and human-in-the-loop approvals. Developers can compose agentic patterns as durable workflows with built-in state management, retries, and full visibility. The result: AI-driven processes that are predictable, auditable, and safe for enterprise use.

Connectivity
Catalyst is the connectivity fabric for distributed intelligence. It enables secure, reliable communication between AI agents, APIs, and systems—complete with service discovery, pub/sub, and stateful integration across compute, regions and clouds.

Observability and visualization
With built-in dashboards, traces, and metrics, teams can monitor workflow progress, identify bottlenecks, and quickly diagnose failures. The visualization layer turns complex distributed executions into understandable, actionable insights—empowering teams to operate with confidence.

Governance and security
Centralize control with fine-grained governance, secure secret management, and role-based access policies. Enforce compliance across environments while maintaining developer velocity. With built-in identity management and audit logging, enterprises can build safely and confidently at scale.

Building on Dapr OSS? Get support from the creators and maintainers.
Build and run your Dapr applications with confidence.
We closely work with your team to build an optimized Proof of Value (PoV) project, provide customized Dapr training, perform in-depth architectural reviews, and ensure your apps are production-ready before go-live.
learn more
Leading organizations trust Diagrid

FICO runs complex event-driven systems built on Dapr. They address all security vulnerabilities within the required time frame thanks to Diagird’s support and CVE resolution.
read story

Grafana built an event-driven, resilient vulnerability scanning capability, ensuring reliable detection, efficient retries, and seamless integration of results into dashboards.
read story

Avelo Airlines built a cost-efficient, future-ready platform on Dapr that powers growth and innovation. This cloud-first, event-driven architecture ensures scalability, agility, and simplicity.
read story

HDFC Bank deployed a sophisticated application for transaction rate limiting, significantly reducing UPI timeout rates and enhancing user experience without altering their core banking system.
read story

Diagrid helps reduce ZEISS’ cost and effort running Dapr applications while also improving reliability and security. ZEISS describes Diagrid as "Life Insurance" for its microservice-based order fulfillment app.
read story

The Sharper Image Commerce Cloud is composed of 70+ microservices processing 80,000+ orders per day. Diagrid reduced the complexity of developing and managing these services, leading to increased developer productivity.
read story
Get started today
Community
Open Source community dapr.
Run & operate yourself.
Run & operate yourself.
Get Started
Expert guidance and support
for open source Dapr
for open source Dapr
Deploy Dapr on Kubernetes in complete confidence, backed by 24/7 support, additional security, and expert tooling.
Get Started
The enterprise platform for
workflows and AI agents
Build resilient, distributed applications without writing complex failure-handling code. Focus on business logic, not infrastructure plumbing.
Get Started
Building on
open source Dapr
Dapr provides developers with APIs that abstract away the complexity of common challenges when building distributed applications. By letting dapr take care of the complex challenges such as service communication, pub/sub, state management, workflow, and secret management, developers can focus on business value and keep code lean & portable.
Diagrid’s founders were also the creators of the open source Dapr project. Along with the rest of the Diagrid team, they continue to play an active part in leading & contributing to the project.
Diagrid’s founders were also the creators of the open source Dapr project. Along with the rest of the Diagrid team, they continue to play an active part in leading & contributing to the project.
a graduated CNCF project