Azure / Azure/azure-sdk-for-python

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

Open
#45,308 1 comment 1 reaction 2 assignees Claimed by @lusu-msft View on GitHub
bug Client customer-reported Hosted Agents needs-team-attention Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.