Skip to content

Agent server langgraph sample has error in Teams coroutine 'AsyncItems.list' was never awaited #45308

@therealjohn

Description

@therealjohn

Deployed and published to M365, the calculator agent langgraph sample fails to respond from Teams.

2026-02-23T16:30:48.0907702Z stderr F /usr/local/lib/python3.12/site-packages/azure/ai/agentserver/langgraph/models/response_api_default_converter.py:251: RuntimeWarning: coroutine 'AsyncItems.list' was never awaited
2026-02-23T16:30:48.0908101Z stderr F   async for item in openai_client.conversations.items.list(conversation_id):
2026-02-23T16:30:48.0908266Z stderr F RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2026-02-23T16:30:48.0910872Z stdout F 2026-02-23 16:30:48,090 - azure.ai.agentserver - WARNING - Failed to fetch historical items for conversation conv_d3347f439cc3dff300BesVmRU3eoP5dKq9i0i2Dz8wGRFYziuW: 'async for' requires an object with __aiter__ method, got coroutine
2026-02-23T16:30:48.0910960Z stdout F Traceback (most recent call last):
2026-02-23T16:30:48.0910995Z stdout F   File "/usr/local/lib/python3.12/site-packages/azure/ai/agentserver/langgraph/models/response_api_default_converter.py", line 251, in _fetch_historical_items
2026-02-23T16:30:48.0911012Z stdout F     async for item in openai_client.conversations.items.list(conversation_id):
2026-02-23T16:30:48.0911056Z stdout F                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-02-23T16:30:48.0911072Z stdout F TypeError: 'async for' requires an object with __aiter__ method, got coroutine

azure-ai-agentserver-langgraph==1.0.0b13.

*b12 has other issues failing because of something related to tool call IDs.

Here is the sample: https://github.com/microsoft-foundry/foundry-samples/tree/main/samples/python/hosted-agents/langgraph/calculator-agent

It will respond in the playground, but fails from Teams.

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions