Skip to content

Lesson 14 + 08-multi-agent workflow notebooks fail to import on current agent-framework #544

@HamidOna

Description

@HamidOna

Describe the bug

The lesson 14 notebooks and the Python multi-agent workflow samples don't run on the current agent-framework. Three failure modes:

ImportError: cannot import name 'ChatMessage':

  • 14-microsoft-agent-framework/code-samples/14-concurrent.ipynb
  • 14-microsoft-agent-framework/code-samples/14-conditional-workflow.ipynb
  • 14-microsoft-agent-framework/code-samples/14-handoff.ipynb
  • 14-microsoft-agent-framework/code-samples/14-human-loop.ipynb
  • 14-microsoft-agent-framework/code-samples/14-middleware.ipynb
  • 14-microsoft-agent-framework/code-samples/14-sequential.ipynb
  • 08-multi-agent/code_samples/workflows-agent-framework/python/02.python-agent-framework-workflow-ghmodel-sequential.ipynb
  • 08-multi-agent/code_samples/workflows-agent-framework/python/03.python-agent-framework-workflow-ghmodel-concurrent.ipynb

ImportError: cannot import name 'HostedWebSearchTool':

  • 08-multi-agent/code_samples/workflows-agent-framework/python/04.python-agent-framework-workflow-aifoundry-condition.ipynb

AttributeError: 'OpenAIChatClient' object has no attribute 'create_agent':

  • 08-multi-agent/code_samples/workflows-agent-framework/python/01.python-agent-framework-workflow-ghmodel-basic.ipynb

The lessons 01–13 notebooks don't have this issue, so the migration looks partial.

To Reproduce

  1. Pull main.
  2. Create a fresh venv and pip install -r requirements.txt. This resolves agent-framework==1.0.0b260212.
  3. Run any of the notebooks above (e.g. jupyter nbconvert --to notebook --execute 14-microsoft-agent-framework/code-samples/14-sequential.ipynb). It fails on the first cell.

Expected behavior

The notebooks should at least import and run end-to-end against whatever requirements.txt resolves.

Additional context

  • Python 3.13.5 on Windows 11
  • agent-framework 1.0.0b260212

ChatMessage, HostedWebSearchTool, and OpenAIChatClient.create_agent aren't in the current package. Looks like they were renamed or restructured and these notebooks just haven't been updated yet.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions