AIAgent.GetNewThread 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.
Creates a new conversation thread that is compatible with this agent.
public abstract Microsoft.Agents.AI.AgentThread GetNewThread();
abstract member GetNewThread : unit -> Microsoft.Agents.AI.AgentThread
Public MustOverride Function GetNewThread () As AgentThread
Returns
A new AgentThread instance ready for use with this agent.
Remarks
This method creates a fresh conversation thread that can be used to maintain state and context for interactions with this agent. Each thread represents an independent conversation session.
If the agent supports multiple thread types, this method returns the default or configured thread type. For service-backed agents, the actual thread creation may be deferred until first use to optimize performance.