AIAgent.CreateSessionCoreAsync(CancellationToken) 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.
Core implementation of session creation logic.
protected abstract System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSession> CreateSessionCoreAsync(System.Threading.CancellationToken cancellationToken = default);
abstract member CreateSessionCoreAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSession>
Protected MustOverride Function CreateSessionCoreAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of AgentSession)
Parameters
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
A value task that represents the asynchronous operation. The task result contains a new AgentSession instance ready for use with this agent.
Remarks
This is the primary session creation method that implementations must override.