Azure.AI.AgentServer.Core.Tasks Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Classes
| Name | Description |
|---|---|
| ResilientTaskEnablementExtensions |
Opt-in configuration for the resilient-task subsystem. |
| ResilientTaskException |
The single exception type raised by the resilient-task framework. The ErrorCode identifies the failure category; code-specific data is exposed through nullable properties (CurrentStatus, ActualLastInputId, Failure) that are populated only for the corresponding code. |
| ResilientTaskHostExtensions |
Host-builder registration for configuration-bound resilient-task storage. |
| ResilientTaskOptions |
Controls whether the resilient-task runtime is active for an application host. |
| ResilientTaskServiceCollectionExtensions |
Registration entry points for the resilient-tasks feature. Hosted storage can be configured with an explicit credential and endpoint, or through configuration-bound ResilientTaskSettings on an IHostApplicationBuilder. Without an explicit endpoint, the hosted credential can also be supplied through AddResilientTasks(IServiceCollection, TokenCredential) or a registered TokenCredential service. Lease durations and retry/timeout defaults are configured per task rather than globally. |
| ResilientTaskServiceProviderExtensions |
Resolves a registered resilient task's typed TaskDefinition<TInput,TOutput>
handle from a built IServiceProvider. Every task registered with
|
| ResilientTaskSettings |
Configuration-bindable settings for hosted resilient-task storage. The inherited credential and Endpoint are resolved from one configuration section so task-storage identity and location cannot be configured independently. Binding storage settings does not enable the resilient-task runtime; call SetResilientTasksEnabled(IHostApplicationBuilder, Boolean) before host startup. |
| RunOptions |
Options for a single task invocation. Maps Python's |
| TaskContext<TInput> |
The handler-facing context for a single task turn. Exposes the typed input,
identity, entry mode, retry/steering signals, the crash-recovery
count, and cooperative cancellation, matching Python's |
| TaskDefinition<TInput,TOutput> |
A typed handle to a registered resilient task, returned by
AddResilientTask<TInput,TOutput>(IServiceCollection, String, Func<TaskContext<TInput>,
CancellationToken,Task<TOutput>>, Action<TaskRegistrationOptions>)
and AddResilientMultiTurnTask<TInput,TOutput>(IServiceCollection,
String, Func<TaskContext<TInput>,CancellationToken,Task<TOutput>>,
Boolean, Action<TaskRegistrationOptions>).
The task name and its |
| TaskFailureDetail |
Structured detail describing why a task failed. Projects the cross-language failure record (handler error vs. exhausted retries) into typed members. |
| TaskRegistrationOptions |
Per-task registration options. Maps the public keyword arguments of Python's
|
| TaskRetryPolicy |
Controls how a failed task handler is retried: the maximum number of attempts, the delay between attempts, and an optional predicate selecting which exceptions are retryable. The delay is expressed as an DelayStrategy so fixed, exponential, jittered, and custom-derived backoff all use one delay model instead of a second bespoke one. |
| TaskRun<TOutput> |
A handle to a started task run. Await Completion to observe the typed
result; to cancel only your wait (without affecting the durable run) use
|
| TaskStream |
Provides consumer access to the event stream associated with one task input. |
| TaskStreamWriter |
Provides producer access to the event stream associated with one task input. |
Structs
| Name | Description |
|---|---|
| ResilientTaskErrorCode |
Identifies the category of a ResilientTaskException. This is an extensible enum (a string-backed value type following the Azure SDK pattern): new protocol reasons can be introduced without a breaking change, and an unrecognized value round-trips rather than failing to parse. Argument validation and cancellation are represented by the standard ArgumentException and OperationCanceledException instead of a code. |
Interfaces
| Name | Description |
|---|---|
| IResilientTaskHandler<TInput,TOutput> |
Handles one execution attempt of a registered resilient task. |
Enums
| Name | Description |
|---|---|
| EntryMode |
Describes how a task handler was entered for the current turn. Recovery is
observable only through this enum (there is no public recovery counter),
matching the Python |
| TaskFailureKind |
Categorizes why a task ultimately failed. |
| TaskRunStatus |
The lifecycle status of a resilient task as reported by the task store. |