AIAgentExtensions.MapA2A 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.
Overloads
| MapA2A(AIAgent, TaskManager, ILoggerFactory) |
Attaches A2A (Agent-to-Agent) messaging capabilities via Message processing to the specified AIAgent. |
| MapA2A(AIAgent, AgentCard, TaskManager, ILoggerFactory) |
Attaches A2A (Agent-to-Agent) messaging capabilities via Message processing to the specified AIAgent. |
MapA2A(AIAgent, TaskManager, ILoggerFactory)
Attaches A2A (Agent-to-Agent) messaging capabilities via Message processing to the specified AIAgent.
public static A2A.TaskManager MapA2A(this Microsoft.Agents.AI.AIAgent agent, A2A.TaskManager? taskManager = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
static member MapA2A : Microsoft.Agents.AI.AIAgent * A2A.TaskManager * Microsoft.Extensions.Logging.ILoggerFactory -> A2A.TaskManager
<Extension()>
Public Function MapA2A (agent As AIAgent, Optional taskManager As TaskManager = Nothing, Optional loggerFactory As ILoggerFactory = Nothing) As TaskManager
Parameters
- agent
- AIAgent
Agent to attach A2A messaging processing capabilities to.
- taskManager
- A2A.TaskManager
Instance of A2A.TaskManager to configure for A2A messaging. New instance will be created if not passed.
- loggerFactory
- ILoggerFactory
The logger factory to use for creating ILogger instances.
Returns
The configured A2A.TaskManager.
Applies to
MapA2A(AIAgent, AgentCard, TaskManager, ILoggerFactory)
Attaches A2A (Agent-to-Agent) messaging capabilities via Message processing to the specified AIAgent.
public static A2A.TaskManager MapA2A(this Microsoft.Agents.AI.AIAgent agent, A2A.AgentCard agentCard, A2A.TaskManager? taskManager = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
static member MapA2A : Microsoft.Agents.AI.AIAgent * A2A.AgentCard * A2A.TaskManager * Microsoft.Extensions.Logging.ILoggerFactory -> A2A.TaskManager
<Extension()>
Public Function MapA2A (agent As AIAgent, agentCard As AgentCard, Optional taskManager As TaskManager = Nothing, Optional loggerFactory As ILoggerFactory = Nothing) As TaskManager
Parameters
- agent
- AIAgent
Agent to attach A2A messaging processing capabilities to.
- agentCard
- A2A.AgentCard
The agent card to return on query.
- taskManager
- A2A.TaskManager
Instance of A2A.TaskManager to configure for A2A messaging. New instance will be created if not passed.
- loggerFactory
- ILoggerFactory
The logger factory to use for creating ILogger instances.
Returns
The configured A2A.TaskManager.