Skip to content

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

Since session is less tied to any specific underlying chat history storage mechanism, it is less likely to be confused for creating a service side artifact, so renaming to CreateSession.

#2542

Description

  • Rename GetNewSession to CreateSession

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings January 29, 2026 14:42
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET workflows Related to Workflows in agent-framework labels Jan 29, 2026
@github-actions github-actions bot changed the title [BREAKING] Rename GetNewSession to CreateSession .NET: [BREAKING] Rename GetNewSession to CreateSession Jan 29, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a breaking API change that renames GetNewSessionAsync to CreateSessionAsync across the entire Agent Framework codebase. The motivation is that "CreateSession" better reflects the operation since sessions are less tied to specific underlying chat history storage mechanisms, reducing potential confusion about whether service-side artifacts are being created.

Changes:

  • Renamed the abstract method AIAgent.GetNewSessionAsync to AIAgent.CreateSessionAsync
  • Updated all concrete implementations across 11+ agent types (ChatClientAgent, DurableAIAgent, WorkflowHostAgent, A2AAgent, CopilotStudioAgent, GitHubCopilotAgent, PurviewAgent, etc.)
  • Updated all 115+ test files to use the new method name
  • Updated 50+ sample applications and demonstration code
  • Updated XML documentation comments, error messages, and README files to reference the new method name

Reviewed changes

Copilot reviewed 124 out of 124 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs Core abstract method renamed with comprehensive XML documentation
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentSession.cs XML documentation references updated to new method name
dotnet/src/Microsoft.Agents.AI.Abstractions/DelegatingAIAgent.cs Delegation to inner agent updated
dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.cs Core implementation and 3 overloads renamed consistently
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgent.cs DurableTask implementation updated with error message fix
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgentProxy.cs Proxy implementation updated with error message fix
dotnet/src/Microsoft.Agents.AI.DurableTask/AgentEntity.cs Entity implementation updated
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.cs Workflow host implementation updated
dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/AIAgentHostExecutor.cs Internal workflow executor updated
dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs A2A agent and overload updated
dotnet/src/Microsoft.Agents.AI.CopilotStudio/CopilotStudioAgent.cs Copilot Studio agent and overload updated
dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs GitHub Copilot agent and overload updated
dotnet/src/Microsoft.Agents.AI.Purview/PurviewAgent.cs Purview wrapper agent updated
dotnet/src/Microsoft.Agents.AI.Hosting/NoopAgentSessionStore.cs Session store implementation updated
dotnet/src/Microsoft.Agents.AI.Hosting/Local/InMemoryAgentSessionStore.cs In-memory session store updated
dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/README.md Azure Functions documentation updated
dotnet/tests/** (40+ files) All test implementations and test method names updated
dotnet/samples/** (60+ files) All sample code and documentation updated

@westey-m westey-m added this pull request to the merge queue Jan 30, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 30, 2026
* Rename GetNewSession to CreateSession

* Address copilot feedback

* Suppress warning

* Suppress warning

* Fix further warnings.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET workflows Related to Workflows in agent-framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants