with one click
dotnet-orleans
// Build or review distributed .NET applications with Orleans grains, silos, persistence, streaming, reminders, placement, testing, and cloud-native hosting.
// Build or review distributed .NET applications with Orleans grains, silos, persistence, streaming, reminders, placement, testing, and cloud-native hosting.
Build .NET AI agents and multi-agent workflows with Microsoft Agent Framework using the right agent type, threads, tools, workflows, hosting protocols, and enterprise guardrails.
Build provider-agnostic .NET AI integrations with `Microsoft.Extensions.AI`, `IChatClient`, embeddings, middleware, structured output, vector search, and evaluation.
Design or refine CI/CD workflows, quality gates, release flow, and safe AI-assisted pipeline authoring. Use when adding or changing build pipelines, release stages, IaC-driven environments, or deployment rollback policy.
Set up or refine solution-level governance for MCAF repositories: root and project-local `AGENTS.md`, rule precedence, solution topology, skill routing, and maintainability-limit policy placement. Use when bootstrapping a repo, restructuring a multi-project solution, or tightening agent rules.
Add or update automated tests for a change using the repository’s verification rules in `AGENTS.md`. Use when implementing a feature, bugfix, refactor, or regression test; prefer stable integration/API/UI coverage and pull deeper test strategy from the bundled references.
| name | dotnet-orleans |
| version | 1.2.0 |
| category | Distributed |
| description | Build or review distributed .NET applications with Orleans grains, silos, persistence, streaming, reminders, placement, testing, and cloud-native hosting. |
| compatibility | Prefer current Orleans releases with `UseOrleans`, `IPersistentState<TState>`, `RegisterGrainTimer`, modern providers, and production-grade clustering. |
.NET code that uses Microsoft.Orleans.*, Grain, IGrainWith*, UseOrleans, UseOrleansClient, IGrainFactory, or Orleans silo/client builders.Result, .Wait(), blocking I/O, lock-based coordination, or long chatty call chains between grains.IPersistentState<TState> with named states and named providers. Treat Grain<TState> as legacy unless you are constrained by existing code.[StatelessWorker] for pure stateless fan-out or compute helpersRegisterGrainTimer for activation-local periodic workUseOrleans for silos and UseOrleansClient for separate clients. In Aspire, declare the Orleans resource in AppHost, wire clustering/storage/reminders there, and use .AsClient() for frontend-only consumers.DefaultAzureCredential for Azure-backed providers when possible.InProcessTestCluster for new tests, add multi-silo coverage when placement, reminders, persistence, or failover behavior matters, and benchmark hot grains before claiming the design scales.flowchart LR
A["Distributed requirement"] --> B{"Many independent interactive entities?"}
B -->|No| C["Prefer plain service / worker / ASP.NET Core app"]
B -->|Yes| D["Model one grain per business identity"]
D --> E{"Needs durable state?"}
E -->|Yes| F["Use named `IPersistentState<TState>` providers"]
E -->|No| G["Keep activation state in memory only"]
D --> H{"Needs event fan-out or pub/sub?"}
H -->|Yes| I["Use Orleans streams"]
D --> J{"Needs periodic work?"}
J -->|Activation-local| K["Use `RegisterGrainTimer`"]
J -->|Durable wakeups| L["Use reminders"]
D --> M{"Separate frontend or API process?"}
M -->|Yes| N["Use `UseOrleansClient` / `.AsClient()`"]
M -->|No| O["Co-host client and silo if it stays simple"]
F --> P["Add testing, placement, observability, and deployment checks"]
G --> P
I --> P
K --> P
L --> P
N --> P
O --> P
.NET codeUseOrleans() or UseOrleansClient() relies on themWhen exact wording, API shape, or long-tail coverage matters, read the smallest relevant official Orleans reference file instead of relying on the summary alone.
Open only what you need:
Official sources: