Share via


AIContextProvider.InvokingContext.AIContext Property

Definition

Gets the AIContext being built for the current invocation. Context providers can modify and return or return a new AIContext instance to provide additional context for the invocation.

public Microsoft.Agents.AI.AIContext AIContext { get; }
member this.AIContext : Microsoft.Agents.AI.AIContext
Public ReadOnly Property AIContext As AIContext

Property Value

Remarks

If multiple AIContextProvider instances are used in the same invocation, each AIContextProvider will receive the context returned by the previous AIContextProvider allowing them to build on top of each other's context.

The first AIContextProvider in the invocation pipeline will receive an AIContext instance that already contains the caller provided messages that will be used by the agent for this invocation.

It may also contain messages from chat history, if a ChatHistoryProvider is being used.

Applies to