Python Agent Framework sample fails to import with currently resolved SDK dependencies

未关闭
#270 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
backend

调研方向

从 python/agent-framework/sample-agent 目录开始,复现 uv 安装和 python -c "import agent" 命令,然后检查 sample 的 import 和依赖声明。根据已解析的 Agent Framework 依赖中可用的 API 更新 sample,并通过 smoke test 验证应用程序导入和 agent 构造均能成功。

由索引模型根据 Issue 内容生成。

描述

Title: Python Agent Framework sample fails to import with currently resolved SDK dependencies

Description:

Summary

The Python Agent Framework sample uses SDK APIs that are unavailable in the dependency versions resolved during setup.

I encountered this in a local copy of the sample. I also checked upstream main on September 9, 2026 and confirmed that it contains the same imports and unconstrained Agent Framework dependency.

Sample: https://github.com/microsoft/Agent365-Samples/tree/main/python/agent-framework/sample-agent

Environment
  • macOS, Apple Silicon ARM64
  • Python 3.11.15
  • agent-framework-core==1.17.0
  • agent-framework-openai==1.14.2
  • agent-framework-azure-ai==1.0.0rc6
  • microsoft-agents-a365-tooling-extensions-agentframework==1.0.0
Steps to Reproduce

From an unmodified copy of the sample directory:

uv venv --python 3.11
source .venv/bin/activate
uv pip install -e .
python -c "import agent"

Dependency resolution can change over time; the versions above describe the environment where I observed the failure.

Actual Behavior

Importing the sample fails before startup or credential validation:

ImportError: cannot import name 'ChatAgent' from 'agent_framework'

After updating that import and its constructor locally, the next import fails:

ImportError: cannot import name 'AzureOpenAIChatClient' from 'agent_framework.azure'
Expected Behavior

Following the documented installation steps should produce an application that imports successfully with the resolved dependencies.

Suggested Resolution

Update the sample to APIs compatible with the Agent 365 integration and provide a tested dependency set. An import and agent-construction smoke test would help catch future SDK incompatibilities.

主要语言
Python
星标
41
派生
23
平均合并
7 小时 43 分钟
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/Agent365-python 的其他 Issue

查看 microsoft/Agent365-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。