diff --git a/dotnet/samples/GettingStarted/Providers/ChatClientAgent_With_AzureAIAgentsPersistent.cs b/dotnet/samples/GettingStarted/Providers/ChatClientAgent_With_AzureAIAgentsPersistent.cs
index 4b065eb614..4bbb3df0d0 100644
--- a/dotnet/samples/GettingStarted/Providers/ChatClientAgent_With_AzureAIAgentsPersistent.cs
+++ b/dotnet/samples/GettingStarted/Providers/ChatClientAgent_With_AzureAIAgentsPersistent.cs
@@ -31,7 +31,7 @@ public sealed class ChatClientAgent_With_AzureAIAgentsPersistent(ITestOutputHelp
instructions: JokerInstructions);
// Get a local proxy for the agent to work with.
- Agent agent = await persistentAgentsClient.GetRunnableAgentAsync(createPersistentAgentResponse.Value.Id);
+ AIAgent agent = await persistentAgentsClient.GetRunnableAgentAsync(createPersistentAgentResponse.Value.Id);
// Start a new thread for the agent conversation.
AgentThread thread = agent.GetNewThread();
diff --git a/dotnet/samples/GettingStarted/Steps/Step01_ChatClientAgent_Running.cs b/dotnet/samples/GettingStarted/Steps/Step01_ChatClientAgent_Running.cs
index 9d02b25502..1d9c55bfdc 100644
--- a/dotnet/samples/GettingStarted/Steps/Step01_ChatClientAgent_Running.cs
+++ b/dotnet/samples/GettingStarted/Steps/Step01_ChatClientAgent_Running.cs
@@ -33,7 +33,7 @@ public sealed class Step01_ChatClientAgent_Running(ITestOutputHelper output) : A
IChatClient chatClient = base.GetChatClient(provider);
// Define the agent
- Agent agent = new ChatClientAgent(chatClient, ParrotInstructions, ParrotName);
+ AIAgent agent = new ChatClientAgent(chatClient, ParrotInstructions, ParrotName);
// Invoke the agent and output the text result.
Console.WriteLine(await agent.RunAsync("Fortune favors the bold."));
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/AgentActor.cs b/dotnet/src/Microsoft.Agents.Orchestration/AgentActor.cs
index b3bdbccdd3..9c46a45480 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/AgentActor.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/AgentActor.cs
@@ -24,7 +24,7 @@ public abstract class AgentActor : OrchestrationActor
/// The orchestration context.
/// An .
/// The logger to use for the actor
- protected AgentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, Agent agent, ILogger? logger = null)
+ protected AgentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, AIAgent agent, ILogger? logger = null)
: base(id, runtime, context, agent.Description, logger)
{
this.Agent = agent;
@@ -34,7 +34,7 @@ public abstract class AgentActor : OrchestrationActor
///
/// Gets the associated agent.
///
- protected Agent Agent { get; }
+ protected AIAgent Agent { get; }
///
/// Gets the current conversation thread used during agent communication.
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/AgentOrchestration.cs b/dotnet/src/Microsoft.Agents.Orchestration/AgentOrchestration.cs
index 8e3dd2424f..c282207dd5 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/AgentOrchestration.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/AgentOrchestration.cs
@@ -32,7 +32,7 @@ public abstract partial class AgentOrchestration
/// Initializes a new instance of the class.
///
/// Specifies the member agents or orchestrations participating in this orchestration.
- protected AgentOrchestration(params Agent[] members)
+ protected AgentOrchestration(params AIAgent[] members)
{
_ = Throw.IfNull(members);
@@ -87,7 +87,7 @@ public abstract partial class AgentOrchestration
///
/// Gets the list of member targets involved in the orchestration.
///
- protected IReadOnlyList Members { get; }
+ protected IReadOnlyList Members { get; }
///
/// Orchestration identifier without generic parameters for use in
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentActor.cs b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentActor.cs
index 077c3670c9..13485c0835 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentActor.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentActor.cs
@@ -22,10 +22,10 @@ internal sealed class ConcurrentActor : AgentActor
/// The unique identifier of the agent.
/// The runtime associated with the agent.
/// The orchestration context.
- /// An .
+ /// An .
/// Identifies the actor collecting results.
/// The logger to use for the actor
- public ConcurrentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, Agent agent, ActorType resultActor, ILogger? logger = null)
+ public ConcurrentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, AIAgent agent, ActorType resultActor, ILogger? logger = null)
: base(id, runtime, context, agent, logger)
{
this._handoffActor = resultActor;
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.String.cs b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.String.cs
index 8e7e57bb31..114b3bd26b 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.String.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.String.cs
@@ -16,7 +16,7 @@ public sealed class ConcurrentOrchestration : ConcurrentOrchestration class.
///
/// The agents to be orchestrated.
- public ConcurrentOrchestration(params Agent[] members)
+ public ConcurrentOrchestration(params AIAgent[] members)
: base(members)
{
this.ResultTransform =
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.cs b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.cs
index 9a2c0d86f6..f40aa856d6 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Concurrent/ConcurrentOrchestration.cs
@@ -23,7 +23,7 @@ public class ConcurrentOrchestration
/// Initializes a new instance of the class.
///
/// The agents participating in the orchestration.
- public ConcurrentOrchestration(params Agent[] agents)
+ public ConcurrentOrchestration(params AIAgent[] agents)
: base(agents)
{
}
@@ -52,7 +52,7 @@ public class ConcurrentOrchestration
// Register member actors - All agents respond to the same message.
int agentCount = 0;
- foreach (Agent agent in this.Members)
+ foreach (AIAgent agent in this.Members)
{
++agentCount;
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatAgentActor.cs b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatAgentActor.cs
index 458fcea9eb..d66ba89628 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatAgentActor.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatAgentActor.cs
@@ -23,9 +23,9 @@ internal sealed class GroupChatAgentActor : AgentActor
/// The unique identifier of the agent.
/// The runtime associated with the agent.
/// The orchestration context.
- /// An .
+ /// An .
/// The logger to use for the actor
- public GroupChatAgentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, Agent agent, ILogger? logger = null)
+ public GroupChatAgentActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, AIAgent agent, ILogger? logger = null)
: base(id, runtime, context, agent, logger)
{
this._cache = [];
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.String.cs b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.String.cs
index 2392d7251c..ab549b86e1 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.String.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.String.cs
@@ -14,7 +14,7 @@ public sealed class GroupChatOrchestration : GroupChatOrchestration
/// The manages the flow of the group-chat.
/// The agents to be orchestrated.
- public GroupChatOrchestration(GroupChatManager manager, params Agent[] members)
+ public GroupChatOrchestration(GroupChatManager manager, params AIAgent[] members)
: base(manager, members)
{
}
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.cs b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.cs
index f93fee7bbb..ee90e41c2e 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/GroupChat/GroupChatOrchestration.cs
@@ -26,7 +26,7 @@ public class GroupChatOrchestration :
///
/// The manages the flow of the group-chat.
/// The agents participating in the orchestration.
- public GroupChatOrchestration(GroupChatManager manager, params Agent[] agents)
+ public GroupChatOrchestration(GroupChatManager manager, params AIAgent[] agents)
: base(agents)
{
Throw.IfNull(manager, nameof(manager));
@@ -51,7 +51,7 @@ public class GroupChatOrchestration :
int agentCount = 0;
GroupChatTeam team = [];
- foreach (Agent agent in this.Members)
+ foreach (AIAgent agent in this.Members)
{
++agentCount;
ActorType agentType = await RegisterAgentAsync(agent, agentCount).ConfigureAwait(false);
@@ -79,7 +79,7 @@ public class GroupChatOrchestration :
return managerType;
- ValueTask RegisterAgentAsync(Agent agent, int agentCount) =>
+ ValueTask RegisterAgentAsync(AIAgent agent, int agentCount) =>
runtime.RegisterOrchestrationAgentAsync(
this.FormatAgentType(context.Topic, $"Agent_{agentCount}"),
(agentId, runtime) =>
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffActor.cs b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffActor.cs
index 4bca4984d2..fef0536db3 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffActor.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffActor.cs
@@ -32,7 +32,7 @@ internal sealed partial class HandoffActor : AgentActor
/// The unique identifier of the agent.
/// The runtime associated with the agent.
/// The orchestration context.
- /// An .>
+ /// An .>
/// The handoffs available to this agent
/// The handoff agent for capturing the result.
/// The logger to use for the actor
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.String.cs b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.String.cs
index 203b9cdb7c..873b73e977 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.String.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.String.cs
@@ -15,7 +15,7 @@ public sealed class HandoffOrchestration : HandoffOrchestration
///
/// Defines the handoff connections for each agent.
/// The agents to be orchestrated.
- public HandoffOrchestration(OrchestrationHandoffs handoffs, params Agent[] members)
+ public HandoffOrchestration(OrchestrationHandoffs handoffs, params AIAgent[] members)
: base(handoffs, members)
{
}
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.cs b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.cs
index bbeff667e1..0bd7fb05b2 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/HandoffOrchestration.cs
@@ -24,7 +24,7 @@ public class HandoffOrchestration : AgentOrchestration
/// Defines the handoff connections for each agent.
/// Additional agents participating in the orchestration that weren't passed to .
- public HandoffOrchestration(OrchestrationHandoffs handoffs, params Agent[] agents) : base(
+ public HandoffOrchestration(OrchestrationHandoffs handoffs, params AIAgent[] agents) : base(
agents is { Length: 0 } ? handoffs.Agents.ToArray() :
handoffs.Agents is { Count: 0 } ? agents :
handoffs.Agents.Concat(agents).Distinct().ToArray())
@@ -74,7 +74,7 @@ public class HandoffOrchestration : AgentOrchestration= 0; --index)
{
- Agent agent = this.Members[index];
+ AIAgent agent = this.Members[index];
HandoffLookup map = [];
handoffMap[agent.Name ?? agent.Id] = map;
agentType =
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/Handoffs.cs b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/Handoffs.cs
index f65875de94..5fe8ec70f7 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Handoff/Handoffs.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Handoff/Handoffs.cs
@@ -36,7 +36,7 @@ public sealed class OrchestrationHandoffs : Dictionary
/// Initializes a new instance of the class with no handoff relationships.
///
/// The first agent to be invoked (prior to any handoff).
- public OrchestrationHandoffs(Agent firstAgent)
+ public OrchestrationHandoffs(AIAgent firstAgent)
: this(firstAgent.Name ?? firstAgent.Id)
{
this.Agents.Add(firstAgent);
@@ -63,7 +63,7 @@ public sealed class OrchestrationHandoffs : Dictionary
///
/// The source agent.
/// The updated instance.
- public static OrchestrationHandoffs StartWith(Agent source) => new(source);
+ public static OrchestrationHandoffs StartWith(AIAgent source) => new(source);
///
/// Adds handoff relationships from a source agent to one or more target agents.
@@ -72,13 +72,13 @@ public sealed class OrchestrationHandoffs : Dictionary
/// The source agent.
/// The target agents to add as handoff targets for the source agent.
/// The updated instance.
- public OrchestrationHandoffs Add(Agent source, params Agent[] targets)
+ public OrchestrationHandoffs Add(AIAgent source, params AIAgent[] targets)
{
string key = source.Name ?? source.Id;
AgentHandoffs agentHandoffs = this.GetAgentHandoffs(key);
- foreach (Agent target in targets)
+ foreach (AIAgent target in targets)
{
if (string.IsNullOrWhiteSpace(target.Description) && string.IsNullOrWhiteSpace(target.Name))
{
@@ -101,7 +101,7 @@ public sealed class OrchestrationHandoffs : Dictionary
/// The target agent.
/// The handoff description.
/// The updated instance.
- public OrchestrationHandoffs Add(Agent source, Agent target, string description)
+ public OrchestrationHandoffs Add(AIAgent source, AIAgent target, string description)
=> this.Add(source.Name ?? source.Id, target.Name ?? target.Id, description);
///
@@ -111,7 +111,7 @@ public sealed class OrchestrationHandoffs : Dictionary
/// The target agent's name or ID.
/// The handoff description.
/// The updated instance.
- public OrchestrationHandoffs Add(Agent source, string targetName, string description)
+ public OrchestrationHandoffs Add(AIAgent source, string targetName, string description)
=> this.Add(source.Name ?? source.Id, targetName, description);
///
@@ -139,7 +139,7 @@ public sealed class OrchestrationHandoffs : Dictionary
return agentHandoffs;
}
- internal HashSet Agents { get; } = [];
+ internal HashSet Agents { get; } = [];
}
///
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialActor.cs b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialActor.cs
index 9d5be2c91b..f4b3f17ef3 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialActor.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialActor.cs
@@ -23,10 +23,10 @@ internal sealed class SequentialActor : AgentActor
/// The unique identifier of the agent.
/// The runtime associated with the agent.
/// The orchestration context.
- /// An .
+ /// An .
/// The identifier of the next agent for which to handoff the result
/// The logger to use for the actor
- public SequentialActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, Agent agent, ActorType nextAgent, ILogger? logger = null)
+ public SequentialActor(ActorId id, IAgentRuntime runtime, OrchestrationContext context, AIAgent agent, ActorType nextAgent, ILogger? logger = null)
: base(id, runtime, context, agent, logger)
{
logger?.LogInformation("ACTOR {ActorId} {NextAgent}", this.Id, nextAgent);
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.String.cs b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.String.cs
index 53b1077d4e..b935f93d6d 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.String.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.String.cs
@@ -14,7 +14,7 @@ public sealed class SequentialOrchestration : SequentialOrchestration class.
///
/// The agents to be orchestrated.
- public SequentialOrchestration(params Agent[] members)
+ public SequentialOrchestration(params AIAgent[] members)
: base(members)
{
}
diff --git a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.cs b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.cs
index 26ec06f814..6a2deb8884 100644
--- a/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.cs
+++ b/dotnet/src/Microsoft.Agents.Orchestration/Sequential/SequentialOrchestration.cs
@@ -20,7 +20,7 @@ public class SequentialOrchestration : AgentOrchestration class.
///
/// The agents participating in the orchestration.
- public SequentialOrchestration(params Agent[] agents)
+ public SequentialOrchestration(params AIAgent[] agents)
: base(agents)
{
}
@@ -44,7 +44,7 @@ public class SequentialOrchestration : AgentOrchestration= 0; --index)
{
- Agent agent = this.Members[index];
+ AIAgent agent = this.Members[index];
nextAgent = await RegisterAgentAsync(agent, index, nextAgent).ConfigureAwait(false);
logger.LogRegisterActor(this.OrchestrationLabel, nextAgent, "MEMBER", index + 1);
@@ -52,7 +52,7 @@ public class SequentialOrchestration : AgentOrchestration RegisterAgentAsync(Agent agent, int index, ActorType nextAgent) =>
+ ValueTask RegisterAgentAsync(AIAgent agent, int index, ActorType nextAgent) =>
runtime.RegisterOrchestrationAgentAsync(
this.GetAgentType(context.Topic, index),
(agentId, runtime) =>
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AIAgent.cs
similarity index 97%
rename from dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs
rename to dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AIAgent.cs
index 89f51cc683..a8fc41ed1a 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/Agent.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AIAgent.cs
@@ -12,7 +12,7 @@ namespace Microsoft.Extensions.AI.Agents;
/// Base abstraction for all agents. An agent instance may participate in one or more conversations.
/// A conversation may include one or more agents.
///
-public abstract class Agent
+public abstract class AIAgent
{
///
/// Gets the identifier of the agent.
@@ -27,6 +27,14 @@ public abstract class Agent
///
public virtual string? Name { get; }
+ ///
+ /// Gets a display name for the agent, which is either the or if the name is not set.
+ ///
+ public virtual string DisplayName
+ {
+ get => this.Name ?? this.Id;
+ }
+
///
/// Gets the description of the agent (optional).
///
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AgentRunResponseUpdate.cs b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AgentRunResponseUpdate.cs
index aa8dd1246c..4ad5a3a4c9 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AgentRunResponseUpdate.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/AgentRunResponseUpdate.cs
@@ -9,7 +9,7 @@ using System.Text.Json.Serialization;
namespace Microsoft.Extensions.AI.Agents;
///
-/// Represents a single streaming response chunk from an .
+/// Represents a single streaming response chunk from an .
///
///
///
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents.CopilotStudio/CopilotStudioAgent.cs b/dotnet/src/Microsoft.Extensions.AI.Agents.CopilotStudio/CopilotStudioAgent.cs
index c972cf8db7..8f4e18a866 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents.CopilotStudio/CopilotStudioAgent.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents.CopilotStudio/CopilotStudioAgent.cs
@@ -16,7 +16,7 @@ namespace Microsoft.Extensions.AI.Agents.CopilotStudio;
///
/// Represents a Copilot Studio agent in the cloud.
///
-public class CopilotStudioAgent : Agent
+public class CopilotStudioAgent : AIAgent
{
private readonly ILogger _logger;
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents/AgentExtensions.cs b/dotnet/src/Microsoft.Extensions.AI.Agents/AgentExtensions.cs
index 8ca9790e77..49620560fa 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents/AgentExtensions.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents/AgentExtensions.cs
@@ -3,7 +3,7 @@
namespace Microsoft.Extensions.AI.Agents;
///
-/// Extension methods for .
+/// Extension methods for .
///
public static class AgentExtensions
{
@@ -13,7 +13,7 @@ public static class AgentExtensions
/// The agent to wrap.
/// An optional source name that will be used on the telemetry data.
/// An that wraps the original agent with telemetry.
- public static OpenTelemetryAgent WithOpenTelemetry(this Agent agent, string? sourceName = null)
+ public static OpenTelemetryAgent WithOpenTelemetry(this AIAgent agent, string? sourceName = null)
{
return new OpenTelemetryAgent(agent, sourceName);
}
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents/ChatCompletion/ChatClientAgent.cs b/dotnet/src/Microsoft.Extensions.AI.Agents/ChatCompletion/ChatClientAgent.cs
index 5c8d915dcc..b35f0e6ab5 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents/ChatCompletion/ChatClientAgent.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents/ChatCompletion/ChatClientAgent.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Extensions.AI.Agents;
///
/// Represents an agent that can be invoked using a chat client.
///
-public sealed class ChatClientAgent : Agent
+public sealed class ChatClientAgent : AIAgent
{
private readonly ChatClientAgentOptions? _agentOptions;
private readonly ILogger _logger;
diff --git a/dotnet/src/Microsoft.Extensions.AI.Agents/OpenTelemetryAgent.cs b/dotnet/src/Microsoft.Extensions.AI.Agents/OpenTelemetryAgent.cs
index 090829d623..3a8cf78efe 100644
--- a/dotnet/src/Microsoft.Extensions.AI.Agents/OpenTelemetryAgent.cs
+++ b/dotnet/src/Microsoft.Extensions.AI.Agents/OpenTelemetryAgent.cs
@@ -18,9 +18,9 @@ namespace Microsoft.Extensions.AI.Agents;
/// This class provides telemetry instrumentation for agent operations including activities, metrics, and logging.
/// The telemetry output follows OpenTelemetry semantic conventions in and is subject to change as the conventions evolve.
///
-public sealed class OpenTelemetryAgent : Agent, IDisposable
+public sealed class OpenTelemetryAgent : AIAgent, IDisposable
{
- private readonly Agent _innerAgent;
+ private readonly AIAgent _innerAgent;
private readonly ActivitySource _activitySource;
private readonly Meter _meter;
private readonly Histogram _operationDurationHistogram;
@@ -32,7 +32,7 @@ public sealed class OpenTelemetryAgent : Agent, IDisposable
///
/// The underlying agent to wrap with telemetry.
/// An optional source name that will be used on the telemetry data.
- public OpenTelemetryAgent(Agent innerAgent, string? sourceName = null)
+ public OpenTelemetryAgent(AIAgent innerAgent, string? sourceName = null)
{
this._innerAgent = Throw.IfNull(innerAgent);
diff --git a/dotnet/tests/AgentConformance.IntegrationTests/IAgentFixture.cs b/dotnet/tests/AgentConformance.IntegrationTests/IAgentFixture.cs
index f80cc0c6f1..5f79e8e405 100644
--- a/dotnet/tests/AgentConformance.IntegrationTests/IAgentFixture.cs
+++ b/dotnet/tests/AgentConformance.IntegrationTests/IAgentFixture.cs
@@ -13,7 +13,7 @@ namespace AgentConformance.IntegrationTests;
///
public interface IAgentFixture : IAsyncLifetime
{
- Agent Agent { get; }
+ AIAgent Agent { get; }
Task> GetChatHistoryAsync(AgentThread thread);
diff --git a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs
index ec98b9964b..08d952fb0e 100644
--- a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs
+++ b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs
@@ -25,7 +25,7 @@ public class AzureAIAgentsPersistentFixture : IChatClientAgentFixture
public IChatClient ChatClient => this._agent.ChatClient;
- public Agent Agent => this._agent;
+ public AIAgent Agent => this._agent;
public async Task> GetChatHistoryAsync(AgentThread thread)
{
diff --git a/dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs b/dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs
index 83be84b8ee..0f575e141d 100644
--- a/dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs
+++ b/dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs
@@ -19,10 +19,10 @@ namespace CopilotStudio.IntegrationTests;
public class CopilotStudioFixture : IAgentFixture
{
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
- private Agent _agent;
+ private AIAgent _agent;
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
- public Agent Agent => this._agent;
+ public AIAgent Agent => this._agent;
public Task> GetChatHistoryAsync(AgentThread thread)
{
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/ConcurrentOrchestrationTests.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/ConcurrentOrchestrationTests.cs
index 9e06e7b81d..888bfbda78 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/ConcurrentOrchestrationTests.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/ConcurrentOrchestrationTests.cs
@@ -44,7 +44,7 @@ public class ConcurrentOrchestrationTests
Assert.Contains("abc", response);
}
- private static async Task ExecuteOrchestrationAsync(params Agent[] mockAgents)
+ private static async Task ExecuteOrchestrationAsync(params AIAgent[] mockAgents)
{
// Act
ConcurrentOrchestration orchestration = new(mockAgents);
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/GroupChatOrchestrationTests.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/GroupChatOrchestrationTests.cs
index 22cf7db876..4a3734e9d1 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/GroupChatOrchestrationTests.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/GroupChatOrchestrationTests.cs
@@ -42,7 +42,7 @@ public class GroupChatOrchestrationTests
Assert.Equal("lmn", response);
}
- private static async Task ExecuteOrchestrationAsync(params Agent[] mockAgents)
+ private static async Task ExecuteOrchestrationAsync(params AIAgent[] mockAgents)
{
// Act
GroupChatOrchestration orchestration = new(new RoundRobinGroupChatManager() { MaximumInvocationCount = mockAgents.Length }, mockAgents);
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffOrchestrationTests.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffOrchestrationTests.cs
index 31ec9931da..2e6735a890 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffOrchestrationTests.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffOrchestrationTests.cs
@@ -42,7 +42,7 @@ public sealed class HandoffOrchestrationTests : IDisposable
public async Task HandoffOrchestrationWithSingleAgentAsync()
{
// Arrange
- Agent mockAgent1 =
+ AIAgent mockAgent1 =
this.CreateMockAgent(
"Agent1",
"Test Agent",
@@ -59,17 +59,17 @@ public sealed class HandoffOrchestrationTests : IDisposable
public async Task HandoffOrchestrationWithMultipleAgentsAsync()
{
// Arrange
- Agent mockAgent1 =
+ AIAgent mockAgent1 =
this.CreateMockAgent(
"Agent1",
"Test Agent",
Responses.Handoff("Agent2"));
- Agent mockAgent2 =
+ AIAgent mockAgent2 =
this.CreateMockAgent(
"Agent2",
"Test Agent",
Responses.Result("Final response"));
- Agent mockAgent3 =
+ AIAgent mockAgent3 =
this.CreateMockAgent(
"Agent3",
"Test Agent",
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffsTests.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffsTests.cs
index ce2fe86ca3..87ed27ea80 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffsTests.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/HandoffsTests.cs
@@ -34,9 +34,9 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source");
- Agent sourceAgent = CreateAgent("source", "Source Agent");
- Agent targetAgent1 = CreateAgent("target1", "Target Agent 1");
- Agent targetAgent2 = CreateAgent("target2", "Target Agent 2");
+ AIAgent sourceAgent = CreateAgent("source", "Source Agent");
+ AIAgent targetAgent1 = CreateAgent("target1", "Target Agent 1");
+ AIAgent targetAgent2 = CreateAgent("target2", "Target Agent 2");
// Act
handoffs.Add(sourceAgent, targetAgent1, targetAgent2);
@@ -58,8 +58,8 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source");
- Agent sourceAgent = CreateAgent("source", "Source Agent");
- Agent targetAgent = CreateAgent("target", "Target Agent");
+ AIAgent sourceAgent = CreateAgent("source", "Source Agent");
+ AIAgent targetAgent = CreateAgent("target", "Target Agent");
string customDescription = "Custom handoff description";
// Act
@@ -79,7 +79,7 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source");
- Agent sourceAgent = CreateAgent("source", "Source Agent");
+ AIAgent sourceAgent = CreateAgent("source", "Source Agent");
string targetName = "targetName";
string description = "Target description";
@@ -121,12 +121,12 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source1");
- Agent source1 = CreateAgent("source1", "Source Agent 1");
- Agent source2 = CreateAgent("source2", "Source Agent 2");
+ AIAgent source1 = CreateAgent("source1", "Source Agent 1");
+ AIAgent source2 = CreateAgent("source2", "Source Agent 2");
- Agent target1 = CreateAgent("target1", "Target Agent 1");
- Agent target2 = CreateAgent("target2", "Target Agent 2");
- Agent target3 = CreateAgent("target3", "Target Agent 3");
+ AIAgent target1 = CreateAgent("target1", "Target Agent 1");
+ AIAgent target2 = CreateAgent("target2", "Target Agent 2");
+ AIAgent target3 = CreateAgent("target3", "Target Agent 3");
// Act
handoffs.Add(source1, target1, target2);
@@ -155,9 +155,9 @@ public class HandoffsTests
public void StaticAddCreatesNewOrchestrationHandoffs()
{
// Arrange
- Agent source = CreateAgent("source", "Source Agent");
- Agent target1 = CreateAgent("target1", "Target Agent 1");
- Agent target2 = CreateAgent("target2", "Target Agent 2");
+ AIAgent source = CreateAgent("source", "Source Agent");
+ AIAgent target1 = CreateAgent("target1", "Target Agent 1");
+ AIAgent target2 = CreateAgent("target2", "Target Agent 2");
// Act
OrchestrationHandoffs handoffs =
@@ -183,8 +183,8 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source-id");
- Agent sourceAgent = CreateAgent(id: "source-id", name: null);
- Agent targetAgent = CreateAgent(id: "target-id", name: null, description: "Target Description");
+ AIAgent sourceAgent = CreateAgent(id: "source-id", name: null);
+ AIAgent targetAgent = CreateAgent(id: "target-id", name: null, description: "Target Description");
// Act
handoffs.Add(sourceAgent, targetAgent);
@@ -205,8 +205,8 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source");
- Agent sourceAgent = CreateAgent("source", "Source Agent");
- Agent targetAgent1 = CreateAgent("target1", name: "target 1");
+ AIAgent sourceAgent = CreateAgent("source", "Source Agent");
+ AIAgent targetAgent1 = CreateAgent("target1", name: "target 1");
// Act
handoffs.Add(sourceAgent, targetAgent1);
@@ -227,8 +227,8 @@ public class HandoffsTests
// Arrange
OrchestrationHandoffs handoffs = new("source");
- Agent sourceAgent = CreateAgent("source", "Source Agent");
- Agent targetAgent1 = CreateAgent("target1");
+ AIAgent sourceAgent = CreateAgent("source", "Source Agent");
+ AIAgent targetAgent1 = CreateAgent("target1");
// Act
InvalidOperationException ex = Assert.Throws(() => handoffs.Add(sourceAgent, targetAgent1));
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/MockAgent.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/MockAgent.cs
index 9f734694d2..78cd4e8680 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/MockAgent.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/MockAgent.cs
@@ -11,9 +11,9 @@ using Moq;
namespace Microsoft.Agents.Orchestration.UnitTest;
///
-/// Mock definition of .
+/// Mock definition of .
///
-internal sealed class MockAgent(int index) : Agent
+internal sealed class MockAgent(int index) : AIAgent
{
public static MockAgent CreateWithResponse(int index, string response)
{
diff --git a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/SequentialOrchestrationTests.cs b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/SequentialOrchestrationTests.cs
index c59bb8dae9..b5488a9596 100644
--- a/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/SequentialOrchestrationTests.cs
+++ b/dotnet/tests/Microsoft.Agents.Orchestration.UnitTests/SequentialOrchestrationTests.cs
@@ -42,7 +42,7 @@ public class SequentialOrchestrationTests
Assert.Equal("lmn", response);
}
- private static async Task ExecuteOrchestrationAsync(params Agent[] mockAgents)
+ private static async Task ExecuteOrchestrationAsync(params AIAgent[] mockAgents)
{
// Act
SequentialOrchestration orchestration = new(mockAgents);
diff --git a/dotnet/tests/Microsoft.Extensions.AI.Agents.Abstractions.UnitTests/AgentTests.cs b/dotnet/tests/Microsoft.Extensions.AI.Agents.Abstractions.UnitTests/AgentTests.cs
index 3d80335938..e9b4c2bd31 100644
--- a/dotnet/tests/Microsoft.Extensions.AI.Agents.Abstractions.UnitTests/AgentTests.cs
+++ b/dotnet/tests/Microsoft.Extensions.AI.Agents.Abstractions.UnitTests/AgentTests.cs
@@ -11,11 +11,11 @@ using Moq.Protected;
namespace Microsoft.Extensions.AI.Agents.Abstractions.UnitTests;
///
-/// Unit tests for the class.
+/// Unit tests for the class.
///
public class AgentTests
{
- private readonly Mock _agentMock;
+ private readonly Mock _agentMock;
private readonly Mock _agentThreadMock;
private readonly AgentRunResponse _invokeResponse = new();
private readonly List _invokeStreamingResponses = [];
@@ -30,7 +30,7 @@ public class AgentTests
this._invokeResponse = new AgentRunResponse(new ChatMessage(ChatRole.Assistant, "Hi"));
this._invokeStreamingResponses.Add(new AgentRunResponseUpdate(ChatRole.Assistant, "Hi"));
- this._agentMock = new Mock() { CallBase = true };
+ this._agentMock = new Mock() { CallBase = true };
this._agentMock
.Setup(x => x.RunAsync(
It.IsAny>(),
@@ -258,9 +258,9 @@ public class AgentTests
public abstract class TestAgentThread : AgentThread;
///
- /// Mock class to test the method.
+ /// Mock class to test the method.
///
- private sealed class MockAgent : Agent
+ private sealed class MockAgent : AIAgent
{
public new TThreadType ValidateOrCreateThreadType(
AgentThread? thread,
diff --git a/dotnet/tests/Microsoft.Extensions.AI.Agents.UnitTests/OpenTelemetryAgentTests.cs b/dotnet/tests/Microsoft.Extensions.AI.Agents.UnitTests/OpenTelemetryAgentTests.cs
index 80672e695a..653fde0eef 100644
--- a/dotnet/tests/Microsoft.Extensions.AI.Agents.UnitTests/OpenTelemetryAgentTests.cs
+++ b/dotnet/tests/Microsoft.Extensions.AI.Agents.UnitTests/OpenTelemetryAgentTests.cs
@@ -402,7 +402,7 @@ public class OpenTelemetryAgentTests
public void WithOpenTelemetry_ExtensionMethod_CreatesOpenTelemetryAgent()
{
// Arrange
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
@@ -434,9 +434,9 @@ public class OpenTelemetryAgentTests
mockAgent.Verify(a => a.RunAsync(messages, null, null, It.IsAny()), Times.Once);
}
- private static Mock CreateMockAgent(bool throwError)
+ private static Mock CreateMockAgent(bool throwError)
{
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
mockAgent.Setup(a => a.Description).Returns("Test Description");
@@ -465,9 +465,9 @@ public class OpenTelemetryAgentTests
return mockAgent;
}
- private static Mock CreateMockStreamingAgent(bool throwError)
+ private static Mock CreateMockStreamingAgent(bool throwError)
{
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
mockAgent.Setup(a => a.Description).Returns("Test Description");
@@ -531,7 +531,7 @@ public class OpenTelemetryAgentTests
public void Constructor_WithParameters_SetsProperties()
{
// Arrange
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
mockAgent.Setup(a => a.Description).Returns("Test Description");
@@ -553,7 +553,7 @@ public class OpenTelemetryAgentTests
{
// Arrange
var mockThread = new Mock().Object;
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.GetNewThread()).Returns(mockThread);
using var telemetryAgent = new OpenTelemetryAgent(mockAgent.Object);
@@ -570,7 +570,7 @@ public class OpenTelemetryAgentTests
public void Dispose_DisposesResources()
{
// Arrange
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
var telemetryAgent = new OpenTelemetryAgent(mockAgent.Object);
// Act & Assert - Should not throw
@@ -589,7 +589,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(activities)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
@@ -631,7 +631,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(activities)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns((string?)null); // Null name
@@ -665,7 +665,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(activities)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
@@ -899,7 +899,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(exportedMetrics)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
@@ -981,7 +981,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(exportedMetrics)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
@@ -1028,7 +1028,7 @@ public class OpenTelemetryAgentTests
.AddInMemoryExporter(activities)
.Build();
- var mockAgent = new Mock();
+ var mockAgent = new Mock();
mockAgent.Setup(a => a.Id).Returns("test-agent-id");
mockAgent.Setup(a => a.Name).Returns("TestAgent");
mockAgent.Setup(a => a.Description).Returns((string?)null); // Null description
diff --git a/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs b/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs
index 71f0de0515..8fbd3fa314 100644
--- a/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs
+++ b/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs
@@ -22,7 +22,7 @@ public class OpenAIAssistantFixture : IChatClientAgentFixture
private ChatClientAgent _agent;
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
- public Agent Agent => this._agent;
+ public AIAgent Agent => this._agent;
public IChatClient ChatClient => this._agent.ChatClient;
diff --git a/dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs b/dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs
index 78c42ca932..7edec6af58 100644
--- a/dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs
+++ b/dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs
@@ -27,7 +27,7 @@ public class OpenAIChatCompletionFixture : IChatClientAgentFixture
}
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
- public Agent Agent => this._agent;
+ public AIAgent Agent => this._agent;
public IChatClient ChatClient => this._agent.ChatClient;
diff --git a/dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs b/dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs
index ec46c01979..6a0a24c7d4 100644
--- a/dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs
+++ b/dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs
@@ -23,7 +23,7 @@ public class OpenAIResponseFixture(bool store) : IChatClientAgentFixture
private ChatClientAgent _agent;
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
- public Agent Agent => this._agent;
+ public AIAgent Agent => this._agent;
public IChatClient ChatClient => this._agent.ChatClient;