BackgroundAgentsProvider.GetIncompleteTasks(AgentSession) Method
Definition
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.
Gets the background tasks for the specified session that have not yet completed (i.e., are still running).
public System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.BackgroundTaskInfo> GetIncompleteTasks(Microsoft.Agents.AI.AgentSession? session);
member this.GetIncompleteTasks : Microsoft.Agents.AI.AgentSession -> System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.BackgroundTaskInfo>
Public Function GetIncompleteTasks (session As AgentSession) As IReadOnlyList(Of BackgroundTaskInfo)
Parameters
- session
- AgentSession
The agent session whose background tasks should be inspected.
Returns
A read-only list of the background tasks that are still running.
Remarks
The status of in-flight tasks is refreshed before the result is computed, so tasks that have finished since the last interaction are finalized and excluded. Only tasks whose Status is Running are returned; Completed, Failed, and Lost are all terminal and are not included. The returned BackgroundTaskInfo instances are live references to internal state.