Actors

The Dapr.Actors package enables you to interact with Dapr virtual actors from a .NET application. Actors are virtual, addressed by type and id, with support for state management, reminders, timers, and both strongly-typed and weakly-typed proxy clients. The actor pattern is suited to scenarios where you need single-threaded, instance-based concurrency for stateful objects.

Core concepts

  • How to: Run and use virtual actors in the .NET SDK: a complete tutorial building a three-project solution — actor interfaces, an actor service with state, reminders, and timers, and a proxy client.
  • Author & run actors: authoring actors with ActorHost, dependency injection, disposal, logging, and custom type names; hosting actors in ASP.NET Core with AddActors, JSON options, endpoint routing via MapActorsHandlers, and middleware pitfalls.
  • Actor serialization: the two serialization models — the weakly-typed client (System.Text.Json, JSON output) and the strongly-typed client (Data Contract Serializer, XML output) — and the rules for configuring types in each.
  • The IActorProxyFactory interface: creating actor clients with the strongly-typed (CreateActorProxy<>) and weakly-typed (Create) proxy styles, and reading exception details from method invocations.

Next steps

Last modified October 22, 2026: Upmerge v1.18 into v1.19 (9805cc1cf)