Skip to content

Align notebook with updated basic workflow code - #705

Open
Marietta (marietta-a) wants to merge 1 commit into
microsoft:mainfrom
marietta-a:fix/lesson8_01.dotnet-agent-framework-workflow-ghmodel-basic.ipynb
Open

Align notebook with updated basic workflow code#705
Marietta (marietta-a) wants to merge 1 commit into
microsoft:mainfrom
marietta-a:fix/lesson8_01.dotnet-agent-framework-workflow-ghmodel-basic.ipynb

Conversation

@marietta-a

Copy link
Copy Markdown
Contributor

This PR aligns the notebook with the updated basic workflow in #653

Copilot AI lite review requested due to automatic review settings August 4, 2026 09:19
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for contributing Marietta (@marietta-a)! We will review the pull request and get back to you soon.

Copilot AI 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

This PR updates the Lesson 08 “basic workflow” .NET notebook to match the newer workflow sample introduced in PR #653, primarily by switching to the current agent creation, streaming execution, and streaming event types.

Changes:

  • Updated referenced SDK/package versions in the notebook (including moving to floating major versions for some packages).
  • Migrated agent creation from GetOpenAIResponseClient(...).CreateAIAgent(...) to GetChatClient(...).AsIChatClient().AsAIAgent(...).
  • Updated streaming execution/event handling (StreamAsyncRunStreamingAsync, AgentRunUpdateEventAgentResponseUpdateEvent).
Suppressed comments (3)

08-multi-agent/code_samples/workflows-agent-framework/dotNET/01.dotnet-agent-framework-workflow-ghmodel-basic.ipynb:205

  • This cell output lists floating versions (e.g., OpenTelemetry.Api, 1.*) while execution_count is null, so the stored "Installed Packages" output may be stale/misleading. Consider clearing outputs and letting readers run the cell to see resolved versions.
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Azure.Identity, 1.15.0</span></li><li><span>OpenTelemetry.Api, 1.*</span></li><li><span>System.Linq.Async, 6.0.3</span></li></ul></div></div>"
      ]

08-multi-agent/code_samples/workflows-agent-framework/dotNET/01.dotnet-agent-framework-workflow-ghmodel-basic.ipynb:249

  • This cell output shows a floating version (Microsoft.Agents.AI.Workflows, 1.*) rather than the resolved version, which can be confusing in a saved notebook. Consider clearing outputs (or re-running and capturing resolved versions).
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Agents.AI.Workflows, 1.*</span></li></ul></div></div>"
      ]

08-multi-agent/code_samples/workflows-agent-framework/dotNET/01.dotnet-agent-framework-workflow-ghmodel-basic.ipynb:277

  • This cell output shows a floating/prerelease range (Microsoft.Agents.AI.OpenAI, 1.*-*) rather than the resolved version. For a saved notebook, it’s clearer either to capture the resolved version or clear this output.
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Agents.AI.OpenAI, 1.*-*</span></li></ul></div></div>"
      ]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 212 to +215
"#r \"nuget: Azure.Identity, 1.15.0\"\n",
"#r \"nuget: System.Linq.Async, 6.0.3\"\n",
"#r \"nuget: OpenTelemetry.Api, 1.0.0\"\n",
"#r \"nuget: OpenTelemetry.Api, 1.0.0\""
"#r \"nuget: OpenTelemetry.Api, 1.*\"\n",
"#r \"nuget: OpenTelemetry.Api, 1.*\""
Comment on lines 146 to 151
"outputs": [
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Extensions.AI, 9.9.1</span></li></ul></div></div>"
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Extensions.AI, 10.*</span></li></ul></div></div>"
]
Comment on lines +329 to 330
"// #r \"nuget: Microsoft.Extensions.AI.OpenAI, 1.*-*\""
]
Comment on lines 588 to 594
"string messageData=\"\";\n",
"await foreach (WorkflowEvent evt in run.WatchStreamAsync().ConfigureAwait(false))\n",
"{\n",
" if (evt is AgentRunUpdateEvent executorComplete)\n",
" if (evt is AgentResponseUpdateEvent executorComplete)\n",
" {\n",
" if(id==\"\")\n",
" {\n",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants