Share via


A2AAgentThread Class

Definition

Thread for A2A based agents.

public sealed class A2AAgentThread : Microsoft.Agents.AI.ServiceIdAgentThread
type A2AAgentThread = class
    inherit ServiceIdAgentThread
Public NotInheritable Class A2AAgentThread
Inherits ServiceIdAgentThread
Inheritance

Properties

ContextId

Gets the ID for the current conversation with the A2A agent.

ServiceThreadId

Gets or sets the unique identifier that references the conversation state stored in the remote service.

(Inherited from ServiceIdAgentThread)

Methods

GetService(Type, Object)

Asks the AgentThread for an object of the specified type serviceType.

(Inherited from AgentThread)
GetService<TService>(Object)

Asks the AgentThread for an object of type TService.

(Inherited from AgentThread)
MessagesReceivedAsync(IEnumerable<ChatMessage>, CancellationToken)

This method is called when new messages have been contributed to the chat by any participant.

(Inherited from AgentThread)
Serialize(JsonSerializerOptions)

Serializes the current object's state to a JsonElement using the specified serialization options.

(Inherited from ServiceIdAgentThread)

Applies to