[python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot run
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- azure, python
- Domínio
- build-system, developer-experience
Direção de pesquisa
Comece em python/agent-framework/sample-agent/agent.py, na linha 40, e reproduza as falhas de importação com os comandos indicados na issue. Compare os metadados de dependências do sample com os pacotes agent-framework publicados e inspecione a README. O trabalho estará concluído quando o sample tiver pins de dependências compatíveis e testados, um alvo Python preciso e orientações claras sobre qualquer build pre-release necessário.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
Repo: https://github.com/microsoft/Agent365-Samples (visible from your local path Agent365-Samples)
Title: [python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot run
Body template:
Following the sample at python/agent-framework/sample-agent.
Environment:
- Python 3.12 (also tested 3.14)
- Fresh venv
- pip 25.0.1
Issue:
- agent-framework (latest 1.8.1) renamed
ChatAgent→Agent, breaking agent.py line 40 - agent_framework.azure (latest) does NOT export AzureOpenAIChatClient — only AI Search/Cosmos/Durable classes
- agent_framework_azure_ai 1.0.0rc6 (the only published version) imports BaseContextProvider
which doesn't exist in agent-framework-core 1.8.x - agent_framework_azure_ai 1.0.0rc6._client.py imports OpenAIResponsesOptions
which doesn't exist in agent-framework-openai 1.8.x - agent-framework-azure-ai 1.0.0rc6 cannot coexist with agent-framework-foundry which pins
agent-framework-core >= 1.0.0 (PEP 440 ordering excludes rc6)
Request:
- Pinned requirements.txt with exact tested versions
- Target Python version in the README
- Confirmation whether this sample requires an internal pre-release build
Expected behavior
No response
SDK Version
agent-framework-core 1.8.x
Python Version
3.12
OS
Windows 11
How to Reproduce
cd c:\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent
..venva365_py312\Scripts\Activate.ps1
1) The key test — does this import without ImportError now (at rc6)?
python -c "import agent_framework_azure_ai as az; print('OK:', sorted(x for x in dir(az) if not x.startswith('_')))"
2) Find the chat client / Azure OpenAI class specifically
python -c "import agent_framework_azure_ai as az; print([x for x in dir(az) if 'hatClient' in x or 'zureOpenAI' in x or 'penAI' in x])"
3) Get the constructor signature of whatever class exists
@'
import agent_framework_azure_ai as az
import inspect
for n in ["AzureOpenAIChatClient","AzureOpenAIClient","AzureAIChatClient","AzureAIClient","AzureOpenAIChatCompletionClient"]:
if hasattr(az, n):
print(n + ":", inspect.signature(getattr(az, n).init))
'@ | Set-Content -Path ._check_aiclient.py -Encoding UTF8
python ._check_aiclient.py
Remove-Item ._check_aiclient.py
being on agent-framework-core==1.0.0rc6 (consistent with agent-framework-azure-ai==1.0.0rc6), the import should succeed. Step 2 should reveal AzureOpenAIChatClient (or similar). Step 3 gives the exact kwargs.
agent-framework-core==1.0.0rc6 is installed. But the import chain still fails on BaseContextProvider. Two possibilities:
agent-framework-core 1.0.0rc6 itself never exported BaseContextProvider — it was a name used by agent-framework-azure-ai 1.0.0rc6 but never actually published in core. (Mismatch between sibling packages even at the SAME release tag.)
The agent_framework package being imported is shadowed by a stale install from elsewhere — Python might be loading from a different path than the rc6 install.
Output
1) The key test — does this import without ImportError now (at rc6)?
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> python -c "import agent_framework_azure_ai as az; print('OK:', sorted(x for x in dir(az) if not x.startswith('_')))"
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_skills.py:121: ExperimentalWarning: [SKILLS] SkillResource is experimental and may change or be removed in future versions without notice.
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_harness_memory.py:651: ExperimentalWarning: [HARNESS] MemoryStore is experimental and may change or be removed in future versions without notice.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_init_.py", line 5, in
from .agent_provider import AzureAIAgentsProvider # pyright: ignore[reportDeprecated]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_agent_provider.py", line 10, in
from agent_framework import (
ImportError: cannot import name 'BaseContextProvider' from 'agent_framework' (C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_init.py). Did you mean: 'ContextProvider'?
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent>
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> # 2) Find the chat client / Azure OpenAI class specifically
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> python -c "import agent_framework_azure_ai as az; print([x for x in dir(az) if 'hatClient' in x or 'zureOpenAI' in x or 'penAI' in x])"
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_skills.py:121: ExperimentalWarning: [SKILLS] SkillResource is experimental and may change or be removed in future versions without notice.
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_harness_memory.py:651: ExperimentalWarning: [HARNESS] MemoryStore is experimental and may change or be removed in future versions without notice.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_init_.py", line 5, in
from .agent_provider import AzureAIAgentsProvider # pyright: ignore[reportDeprecated]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_agent_provider.py", line 10, in
from agent_framework import (
ImportError: cannot import name 'BaseContextProvider' from 'agent_framework' (C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_init.py). Did you mean: 'ContextProvider'?
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent>
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> # 3) Get the constructor signature of whatever class exists
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> @'
import agent_framework_azure_ai as az
import inspect
for n in ["AzureOpenAIChatClient","AzureOpenAIClient","AzureAIChatClient","AzureAIClient","AzureOpenAIChatCompletionClient"]:
if hasattr(az, n):
print(n + ":", inspect.signature(getattr(az, n).init))
'@ | Set-Content -Path ._check_aiclient.py -Encoding UTF8
(.venva365_py312) PS C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent> python ._check_aiclient.py
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_skills.py:121: ExperimentalWarning: [SKILLS] SkillResource is experimental and may change or be removed in future versions without notice.
C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_harness_memory.py:651: ExperimentalWarning: [HARNESS] MemoryStore is experimental and may change or be removed in future versions without notice.
Traceback (most recent call last):
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent_check_aiclient.py", line 1, in
import agent_framework_azure_ai as az
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_init_.py", line 5, in
from .agent_provider import AzureAIAgentsProvider # pyright: ignore[reportDeprecated]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_azure_ai_agent_provider.py", line 10, in
from agent_framework import (
ImportError: cannot import name 'BaseContextProvider' from 'agent_framework' (C:\Users\ob\Documents\GIT\Agent365-Samples\python\agent-framework\sample-agent.venva365_py312\Lib\site-packages\agent_framework_init.py). Did you mean: 'ContextProvider'?
Screenshots
No response
Code of Conduct
- I agree to follow the Microsoft Open Source Code of Conduct.
- Linguagem predominante
- Python
- Estrelas
- 41
- Forks
- 23
- Merge médio
- 19h 58min
- PRs com merge (30d)
- 2
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/Agent365-python
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/Agent365-python#249 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 78/100
microsoft/Agent365-python#271 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
microsoft/Agent365-python#270 ·
-
Bug: NonRecordingSpan crashes with 'NonRecordingSpan object has no attribute context' when observability exporter is enabledTalvez livre de novo @nikhilNava assumiu há 131 dias e não há nenhum pull request aberto. Aberta
microsoft/Agent365-python#257 · 2 comentários · 1 responsável ·
-
Fix broken links in documentation to microsoft_agents_a365.notifications.models.agent_notification_activity.TModelTalvez livre de novo @JimDaly assumiu há 164 dias e não há nenhum pull request aberto. Aberta
microsoft/Agent365-python#239 · 1 reação · 2 responsáveis ·
Todas as issues de microsoft/Agent365-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
modelcontextprotocol/python-sdk#3648 ·
Mantenedores costumam responder em até 1 dia
-
docs good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
VenetoStato/giorgio#6 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Claiming namespace ddalusAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 70/100
EclipseFdn/open-vsx.org#13831 ·
Mantenedores costumam responder em até 1 dia