Table of Contents

Interface IAgent

Namespace
Microsoft.Agents.Builder
Assembly
Microsoft.Agents.Builder.dll

Represents an Agent that can receive incoming Activities.

public interface IAgent

Remarks

A IChannelAdapter passes incoming Activities from the channel to the Agent's OnTurnAsync(ITurnContext, CancellationToken) method after the Middleware registered with the Adapter have executed.

Methods

OnTurnAsync(ITurnContext, CancellationToken)

When implemented in an Agent, handles an incoming activity.

Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default)

Parameters

turnContext ITurnContext

The context object for this turn.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

Remarks

The turnContext provides information about the incoming Activity, and other data needed to process the activity.

See Also

See Also