Skip to content

.NET: [BREAKING] Rename AgentThread to AgentSession - #3430

Merged
westey (westey-m) merged 12 commits into
microsoft:mainfrom
westey-m:agentsession-rename
Jan 26, 2026
Merged

.NET: [BREAKING] Rename AgentThread to AgentSession#3430
westey (westey-m) merged 12 commits into
microsoft:mainfrom
westey-m:agentsession-rename

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

#775

Description

  • Renaming AgentThread to AgentSession to better describe what it represents.

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.

@markwallace-microsoftMark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Jan 26, 2026
@github-actionsgithub-actionsBot changed the title [BREAKING] Rename AgentThread to AgentSession.NET: [BREAKING] Rename AgentThread to AgentSessionJan 26, 2026
@westey-m
westey (westey-m) marked this pull request as ready for review January 26, 2026 10:47
CopilotAI review requested due to automatic review settings January 26, 2026 10:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Renames the core conversation state abstraction in the .NET SDK from AgentThread to AgentSession across product code, tests, and samples to better reflect that it can hold broader conversational state (not just chat history).

Changes:

  • Renamed public APIs and implementations from AgentThread/*Thread* to AgentSession/*Session* across the SDK surface.
  • Updated hosting/session persistence abstractions (AgentSessionStore, in-memory/no-op stores) and related integration points (A2A, Azure Functions, Durable Task).
  • Updated unit/integration tests and samples/docs to use the new session terminology.

Reviewed changes

Copilot reviewed 221 out of 221 changed files in this pull request and generated 9 comments.

Show a summary per file
FileDescription
dotnet/src/Microsoft.Agents.AI/OpenTelemetryAgent.csRename run pipeline parameters from thread to session.
dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProviderScope.csRenames scope field from ThreadId to SessionId.
dotnet/src/Microsoft.Agents.AI/LoggingAgent.csUpdates agent run signatures to AgentSession; remarks updated (needs wording fix).
dotnet/src/Microsoft.Agents.AI/FunctionInvocationDelegatingAgent.csForwards session through delegating agent.
dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.csUpdates JSON-serializable state types to session equivalents.
dotnet/src/Microsoft.Agents.AI/AgentExtensions.csRenames optional function invocation context from thread to session.
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowsJsonUtilities.csUpdates workflow agent state serialization to session type.
dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/AIAgentHostExecutor.csStores/restores agent session in workflow checkpointing instead of thread.
dotnet/src/Microsoft.Agents.AI.Purview/ScopedContentProcessor.csRenames threadId parameter to sessionId for Purview correlation.
dotnet/src/Microsoft.Agents.AI.Purview/PurviewWrapper.csRenames thread ID extraction and flow to session; still uses ConversationId mapping.
dotnet/src/Microsoft.Agents.AI.Purview/PurviewAgent.csUpdates agent wrapper APIs to session.
dotnet/src/Microsoft.Agents.AI.Purview/IScopedContentProcessor.csRenames interface contract to session terminology.
dotnet/src/Microsoft.Agents.AI.Mem0/Mem0ProviderScope.csUpdates docs to session wording (property naming needs alignment).
dotnet/src/Microsoft.Agents.AI.Hosting/NoopAgentThreadStore.csRemoves thread store in favor of session store.
dotnet/src/Microsoft.Agents.AI.Hosting/NoopAgentSessionStore.csAdds no-op session store implementation.
dotnet/src/Microsoft.Agents.AI.Hosting/Local/InMemoryAgentSessionStore.csReplaces in-memory thread store with in-memory session store.
dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilderExtensions.csRenames builder APIs to WithInMemorySessionStore / WithSessionStore.
dotnet/src/Microsoft.Agents.AI.Hosting/AgentSessionStore.csRenames abstract store contract from thread to session.
dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/README.mdUpdates Azure Functions docs to use session terminology.
dotnet/src/Microsoft.Agents.AI.Hosting.A2A/AIAgentExtensions.csRenames A2A host integration from thread store to session store.
dotnet/src/Microsoft.Agents.AI.Hosting.A2A.AspNetCore/EndpointRouteBuilderExtensions.csUpdates DI/service lookup to AgentSessionStore.
dotnet/src/Microsoft.Agents.AI.DurableTask/EntityAgentWrapper.csUpdates wrapper signatures to accept session.
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAgentSession.csRenames durable thread object to durable session object.
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAgentJsonUtilities.csUpdates JSON context to serialize DurableAgentSession.
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAgentContext.csRenames CurrentThread to CurrentSession.
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgentProxy.csUpdates proxy APIs and validation to durable sessions.
dotnet/src/Microsoft.Agents.AI.DurableTask/AgentEntity.csCreates a new session for streaming agent execution.
dotnet/src/Microsoft.Agents.AI.CopilotStudio/CopilotStudioAgentThread.csRemoves Copilot Studio thread type.
dotnet/src/Microsoft.Agents.AI.CopilotStudio/CopilotStudioAgentSession.csAdds Copilot Studio session type.
dotnet/src/Microsoft.Agents.AI.Abstractions/DelegatingAIAgent.csUpdates delegating base agent APIs to session.
dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.csUpdates docs to associate provider with a session.
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentRunOptions.csUpdates XML docs to reference session-based Run APIs.
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.csUpdates XML docs to reference session-based streaming APIs.
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.csUpdates XML docs to reference session-based non-streaming APIs.
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentAbstractionsJsonUtilities.csUpdates JSON context types to session-based states.
dotnet/src/Microsoft.Agents.AI.AGUI/AGUIChatClient.csUpdates comments to session terminology (execution-thread wording needs care in some places).
dotnet/src/Microsoft.Agents.AI.A2A/A2AJsonUtilities.csUpdates JSON context to session-based state type.
dotnet/src/Microsoft.Agents.AI.A2A/A2AAgentSession.csRenames A2A thread object to session object and updates serialization.
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.csUpdates fixture APIs to accept AgentSession.
dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.csUpdates fixture APIs to accept AgentSession.
dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.csUpdates fixture APIs to accept AgentSession.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/WorkflowHostSmokeTests.csUpdates workflow agent tests to use InMemoryAgentSession.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/SpecializedExecutorSmokeTests.csUpdates smoke tests and test types to session variants.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/SampleSmokeTest.csUpdates sample smoke test state variable from thread to session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/13_Subworkflow_Checkpointing.csUpdates sample workflow entrypoint to accept/return session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/12_HandOff_HostAsAgent.csUpdates sample to use session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/11_Concurrent_HostAsAgent.csUpdates sample to use session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/10_Sequential_HostAsAgent.csUpdates sample to use session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/07_GroupChat_Workflow_HostAsAgent.csUpdates sample to use session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/Sample/06_GroupChat_Workflow.csUpdates sample agent to implement session APIs.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RepresentationTests.csUpdates test agent API surface to session.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InProcessExecutionTests.csUpdates test agent + internal session class naming/docs.
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AgentWorkflowBuilderTests.csUpdates builder tests and test agents to session APIs.
dotnet/tests/Microsoft.Agents.AI.UnitTests/TestAIAgent.csUpdates test helper delegates to session-based signatures.
dotnet/tests/Microsoft.Agents.AI.UnitTests/OpenTelemetryAgentTests.csUpdates tests to use session-based callbacks.
dotnet/tests/Microsoft.Agents.AI.UnitTests/LoggingAgentTests.csUpdates tests to use session-based callbacks.
dotnet/tests/Microsoft.Agents.AI.UnitTests/FunctionInvocationDelegatingAgentTests.csUpdates middleware callback signature to session.
dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgent_DeserializeSessionTests.csRenames and updates deserialize tests to session type.
dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentExtensionsTests.csUpdates agent extension tests to session type.
dotnet/tests/Microsoft.Agents.AI.UnitTests/AIAgentBuilderTests.csUpdates generic middleware signature from thread to session.
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.UnitTests/TestAgent.csUpdates test agent and dummy session type.
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.csUpdates validation to reference session terminology.
dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/AIAgentExtensionsTests.csUpdates A2A extension tests to session-based APIs.
dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/DurableAgentThreadTests.csRemoves durable thread serialization tests.
dotnet/tests/Microsoft.Agents.AI.DurableTask.UnitTests/DurableAgentSessionTests.csAdds durable session serialization tests.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TimeToLiveTests.csUpdates TTL tests to use session.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ExternalClientTests.csUpdates external client tests to use session.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/AgentEntityTests.csUpdates entity tests to use session.
dotnet/tests/Microsoft.Agents.AI.Declarative.UnitTests/AggregatorPromptAgentFactoryTests.csUpdates test agent to session APIs.
dotnet/tests/Microsoft.Agents.AI.AzureAI.UnitTests/AzureAIProjectChatClientTests.csUpdates tests to use session and ChatClientAgentSession.
dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/TestJsonSerializerContext.csUpdates JSON context types to session state types.
dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/ServiceIdAgentThreadTests.csRemoves thread-based ServiceId agent tests.
dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentThreadTests.csRemoves A2A thread tests.
dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentSessionTests.csAdds A2A session tests.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunTests.csUpdates skipped conformance test name to session.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunStreamingTests.csUpdates skipped conformance test name to session.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.csUpdates fixture API to session.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.csUpdates fixture APIs to session.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.csUpdates fixture APIs to session.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunTests.csUpdates conformance override name to session.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunStreamingTests.csUpdates conformance override name to session.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.csUpdates fixture APIs to session.
dotnet/tests/AgentConformance.IntegrationTests/Support/SessionCleanup.csRenames cleanup helper to delete sessions.
dotnet/tests/AgentConformance.IntegrationTests/IAgentFixture.csUpdates fixture contract to session APIs.
dotnet/tests/AgentConformance.IntegrationTests/ChatClientAgentRunTests.csUpdates conformance tests to create/use sessions.
dotnet/tests/AgentConformance.IntegrationTests/ChatClientAgentRunStreamingTests.csUpdates conformance tests to create/use sessions.
dotnet/samples/M365Agent/Agents/WeatherForecastAgent.csUpdates sample agent override signatures to session.
dotnet/samples/M365Agent/AFAgentApplication.csUpdates Bot Framework sample state handling to session serialization.
dotnet/samples/GettingStarted/Workflows/Observability/WorkflowAsAnAgent/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/Workflows/Declarative/HostedWorkflow/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/Workflows/Agents/WorkflowAsAnAgent/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/Workflows/Agents/CustomAgentExecutors/Program.csUpdates sample executor state from thread to session.
dotnet/samples/GettingStarted/ModelContextProtocol/ResponseAgent_Hosted_MCP/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step15_ComputerUse/Program.csUpdates sample to create/use sessions and resume with session.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step13_Plugins/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step12_Middleware/Program.csUpdates sample middleware signatures and session usage.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step11_AsFunctionTool/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step10_UsingImages/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step08_DependencyInjection/Program.csUpdates sample service state from thread to session.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step07_Observability/Program.csUpdates sample to create/use sessions (streaming + non-streaming).
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step06_PersistedConversations/Program.csUpdates sample persistence to serialize/deserialize sessions.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step04_UsingFunctionToolsWithApprovals/Program.csUpdates sample to create/use sessions and continue with session.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step03_UsingFunctionTools/Program.csUpdates sample to create/use sessions (streaming + non-streaming).
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step02_MultiturnConversation/README.mdUpdates docs to use GetNewSessionAsync.
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step02_MultiturnConversation/Program.csUpdates sample to create/use sessions with Foundry conversations.
dotnet/samples/GettingStarted/Agents/Agent_Step20_AdditionalAIContext/Program.csUpdates sample to create/use sessions and persist state.
dotnet/samples/GettingStarted/Agents/Agent_Step18_DeepResearch/Program.csUpdates sample to create/use session for streaming.
dotnet/samples/GettingStarted/Agents/Agent_Step17_BackgroundResponses/Program.csUpdates sample to use session for continuation/resumption.
dotnet/samples/GettingStarted/Agents/Agent_Step16_ChatReduction/Program.csUpdates sample to use session (chat history access via services).
dotnet/samples/GettingStarted/Agents/Agent_Step13_BackgroundResponsesWithToolsAndPersistence/Program.csUpdates sample persistence helpers to use session.
dotnet/samples/GettingStarted/Agents/Agent_Step11_UsingImages/Program.csUpdates sample to create/use session for streaming.
dotnet/samples/GettingStarted/Agents/Agent_Step09_DependencyInjection/Program.csUpdates sample service state from thread to session.
dotnet/samples/GettingStarted/Agents/Agent_Step06_PersistedConversations/Program.csUpdates sample persistence to serialize/deserialize sessions.
dotnet/samples/GettingStarted/Agents/Agent_Step04_UsingFunctionToolsWithApprovals/Program.csUpdates sample to create/use session and continue with session.
dotnet/samples/GettingStarted/Agents/Agent_Step02_MultiturnConversation/Program.csUpdates sample to create/use session for multi-turn context.
dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step04_FoundryServiceRAG/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step03_CustomRAGDataSource/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/TextSearchStore/TextSearchStore.csUpdates comments (needs thread-vs-session wording correction for locking).
dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/AgentWithOpenAI/README.mdUpdates docs to refer to AgentSession.
dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step05_Conversation/README.mdUpdates docs and code snippets to AgentSession.
dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step05_Conversation/Program.csUpdates sample to create/use session for multi-turn conversation.
dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient/OpenAIResponseClientAgent.csUpdates sample wrapper methods to accept session.
dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/OpenAIChatClientAgent.csUpdates sample wrapper methods to accept session.
dotnet/samples/GettingStarted/AgentWithMemory/AgentWithMemory_Step02_MemoryUsingMem0/Program.csUpdates sample to use session terminology and serialize/deserialize session.
dotnet/samples/GettingStarted/AgentWithMemory/AgentWithMemory_Step01_ChatHistoryMemory/Program.csUpdates sample to use sessions (contains a new-guid bug + typo).
dotnet/samples/GettingStarted/AgentWithAnthropic/Agent_Anthropic_Step03_UsingFunctionTools/Program.csUpdates sample to create/use sessions.
dotnet/samples/GettingStarted/AgentProviders/Agent_With_OpenAIAssistants/Program.csUpdates sample to create/use session.
dotnet/samples/GettingStarted/AgentProviders/Agent_With_AzureAIProject/Program.csUpdates sample to create/use session.
dotnet/samples/GettingStarted/AgentProviders/Agent_With_AzureAIAgentsPersistent/Program.csUpdates sample to create/use session.
dotnet/samples/GettingStarted/AgentOpenTelemetry/Program.csUpdates sample to create/use session for streaming.
dotnet/samples/GettingStarted/AGUI/Step05_StateManagement/Server/SharedStateAgent.csUpdates wrapper to flow session.
dotnet/samples/GettingStarted/AGUI/Step05_StateManagement/Client/StatefulAgent.csUpdates wrapper to flow session.
dotnet/samples/GettingStarted/AGUI/Step05_StateManagement/Client/Program.csUpdates sample to create/use session and print run session id.
dotnet/samples/GettingStarted/AGUI/Step04_HumanInLoop/Server/ServerFunctionApprovalServerAgent.csUpdates wrapper to flow session.
dotnet/samples/GettingStarted/AGUI/Step04_HumanInLoop/Client/ServerFunctionApprovalClientAgent.csUpdates wrapper to flow session.
dotnet/samples/GettingStarted/AGUI/Step04_HumanInLoop/Client/Program.csUpdates client sample to track session rather than thread.
dotnet/samples/GettingStarted/AGUI/Step03_FrontendTools/Client/Program.csUpdates sample to create/use session and print run session id.
dotnet/samples/GettingStarted/AGUI/Step02_BackendTools/Client/Program.csUpdates sample to create/use session and print run session id.
dotnet/samples/GettingStarted/AGUI/Step01_GettingStarted/Client/Program.csUpdates sample to create/use session and print run session id.
dotnet/samples/GettingStarted/A2A/A2AAgent_PollingForTaskCompletion/Program.csUpdates sample to create/use session for continuation polling.
dotnet/samples/DurableAgents/ConsoleApps/07_ReliableStreaming/RedisStreamResponseHandler.csUpdates durable sample to use CurrentSession.
dotnet/samples/DurableAgents/ConsoleApps/07_ReliableStreaming/Program.csUpdates durable sample to create/use session.
dotnet/samples/DurableAgents/ConsoleApps/06_LongRunningTools/Program.csUpdates durable sample orchestration to use sessions.
dotnet/samples/DurableAgents/ConsoleApps/05_AgentOrchestration_HITL/Program.csUpdates durable sample orchestration to use sessions.
dotnet/samples/DurableAgents/ConsoleApps/04_AgentOrchestration_Conditionals/Program.csUpdates durable sample orchestration to use sessions.
dotnet/samples/DurableAgents/ConsoleApps/02_AgentOrchestration_Chaining/README.mdUpdates docs to AgentSession.
dotnet/samples/DurableAgents/ConsoleApps/02_AgentOrchestration_Chaining/Program.csUpdates orchestration sample to use sessions.
dotnet/samples/DurableAgents/ConsoleApps/01_SingleAgent/Program.csUpdates single-agent durable sample to use sessions.
dotnet/samples/AzureFunctions/08_ReliableStreaming/RedisStreamResponseHandler.csUpdates Azure Functions sample to use CurrentSession.
dotnet/samples/AzureFunctions/08_ReliableStreaming/FunctionTriggers.csUpdates sample trigger to create/use session.
dotnet/samples/AzureFunctions/06_LongRunningTools/Tools.csUpdates comment to session terminology.
dotnet/samples/AzureFunctions/06_LongRunningTools/FunctionTriggers.csUpdates orchestration sample to use sessions.
dotnet/samples/AzureFunctions/05_AgentOrchestration_HITL/FunctionTriggers.csUpdates orchestration sample to use sessions.
dotnet/samples/AzureFunctions/04_AgentOrchestration_Conditionals/FunctionTriggers.csUpdates orchestration sample to use sessions.
dotnet/samples/AzureFunctions/02_AgentOrchestration_Chaining/README.mdUpdates docs to AgentSession.
dotnet/samples/AzureFunctions/02_AgentOrchestration_Chaining/Program.csUpdates sample comments to session terminology.
dotnet/samples/AzureFunctions/02_AgentOrchestration_Chaining/FunctionTriggers.csUpdates orchestration sample to use sessions.
dotnet/samples/AgentWebChat/AgentWebChat.Web/OpenAIResponsesAgentClient.csRenames threadId parameter to sessionId and maps to ConversationId.
dotnet/samples/AgentWebChat/AgentWebChat.Web/OpenAIChatCompletionsAgentClient.csRenames threadId parameter to sessionId.
dotnet/samples/AgentWebChat/AgentWebChat.Web/IAgentClient.csRenames threadId parameter to sessionId; adds AgentClientSession wrapper (naming needs alignment).
dotnet/samples/AgentWebChat/AgentWebChat.Web/A2AAgentClient.csRenames threadId parameter to sessionId, still maps to A2A context id.
dotnet/samples/AgentWebChat/AgentWebChat.AgentHost/Program.csUpdates host builder to use in-memory session store.
dotnet/samples/AGUIClientServer/AGUIDojoServer/SharedState/SharedStateAgent.csUpdates wrapper to flow session through.
dotnet/samples/AGUIClientServer/AGUIDojoServer/PredictiveStateUpdates/PredictiveStateUpdatesAgent.csUpdates wrapper to flow session through.
dotnet/samples/AGUIClientServer/AGUIDojoServer/AgenticUI/AgenticUIAgent.csUpdates wrapper to flow session through.
dotnet/samples/AGUIClientServer/AGUIClient/Program.csUpdates sample to create/use session and print run session id.
dotnet/samples/A2AClientServer/A2AClient/Program.csUpdates sample to create/use session.
Comments suppressed due to low confidence (2)

dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAgentSession.cs:40

  • serializedSession parameter documentation says "serialized thread data". Please update to "serialized session data" to match the rename and avoid confusion.
    dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAgentSession.cs:11
  • The class summary still says "An agent thread implementation" even though the type is now DurableAgentSession. Update the summary to say "session" for correctness and discoverability.

Comment threaddotnet/samples/AgentWebChat/AgentWebChat.Web/IAgentClient.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Mem0/Mem0ProviderScope.cs
Comment threaddotnet/src/Microsoft.Agents.AI/LoggingAgent.cs Outdated

@westey-mwestey (westey-m) left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Replied to review comments

Comment threaddotnet/src/Microsoft.Agents.AI.Mem0/Mem0ProviderScope.cs
Comment threaddotnet/src/Microsoft.Agents.AI/LoggingAgent.cs Outdated
Comment threaddotnet/samples/AgentWebChat/AgentWebChat.Web/IAgentClient.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryAgentSession.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryAgentSession.cs Outdated
Comment threaddotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.cs Outdated
Chris Gillum (cgillum) added a commit to microsoft/agent-framework-durable-extension that referenced this pull request Jul 27, 2026
The Microsoft Agent Framework renamed AgentThread to AgentSession
(microsoft/agent-framework#3430). The durable extension's core types were
already migrated, but its HTTP and MCP wire contracts, a few Python public
symbols, and the docs still used "thread".
Incoming requests continue to accept the deprecated thread_id / threadId
names, so existing callers keep working. Responses and the MCP tool schema
now expose session_id / x-ms-session-id / sessionId only.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationUsage: [Issues, PRs], Target: documentation in the code base and learn docs.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@westey-m@lokitoth@SergeyMenshykh@markwallace-microsoft