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

* Rename AgentThread to AgentSession

* Add more renames

* Update readme files

* Revert nullable variable change and further fixes.

* Revert change in header name

* Fix some comments and tests

* Update changelog.

* Address PR feedback.

* Fixing code review comments.

* Fix new errors after merging latest code.
This commit is contained in:
westey
2026-01-26 16:30:25 +00:00
committed by GitHub
parent bbe096a764
commit a3a9147e61
223 changed files with 2529 additions and 2542 deletions
@@ -128,7 +128,7 @@ var agent = new ChatClientAgent(instrumentedChatClient,
.UseOpenTelemetry(SourceName, configure: (cfg) => cfg.EnableSensitiveData = true) // enable telemetry at the agent level
.Build();
var thread = await agent.GetNewThreadAsync();
var session = await agent.GetNewSessionAsync();
appLogger.LogInformation("Agent created successfully with ID: {AgentId}", agent.Id);
@@ -176,7 +176,7 @@ using (appLogger.BeginScope(new Dictionary<string, object> { ["SessionId"] = ses
Console.Write("Agent: ");
// Run the agent (this will create its own internal telemetry spans)
await foreach (var update in agent.RunStreamingAsync(userInput, thread))
await foreach (var update in agent.RunStreamingAsync(userInput, session))
{
Console.Write(update.Text);
}