microsoft/semantic-kernel · error · NotImplementedError
The AutoGenConversableAgent does not support streaming.
Error message
The AutoGenConversableAgent does not support streaming.
What it means
Raised unconditionally by AutoGenConversableAgent.invoke_stream, which overrides the streaming entry point to signal that AutoGen 0.2 ConversableAgent does not support streaming responses. Any caller that routes through invoke_stream (e.g. generic streaming code paths) hits this immediately.
Source
Thrown at python/semantic_kernel/agents/autogen/autogen_conversable_agent.py:266
messages=[message.to_dict() async for message in thread.get_messages()],
)
logger.info("Called AutoGenConversableAgent.a_generate_reply.")
yield await self._create_reply_content(reply, thread)
@override
def invoke_stream(
self,
messages: str | ChatMessageContent | list[str | ChatMessageContent] | None = None,
*,
thread: AgentThread | None = None,
kernel: "Kernel | None" = None,
arguments: KernelArguments | None = None,
**kwargs: Any,
) -> AsyncIterable[AgentResponseItem["StreamingChatMessageContent"]]:
"""Invoke the agent with a stream of messages."""
raise NotImplementedError("The AutoGenConversableAgent does not support streaming.")
@staticmethod
def _to_chat_message_content(message: dict[str, Any]) -> ChatMessageContent:
"""Translate an AutoGen message to a Semantic Kernel ChatMessageContent."""
items: list[TextContent | FunctionCallContent | FunctionResultContent] = []
role = AuthorRole(message.get("role"))
name: str = message.get("name", "")
content = message.get("content")
if content is not None:
text = TextContent(text=content)
items.append(text)
if role == AuthorRole.ASSISTANT:
tool_calls = message.get("tool_calls")
if tool_calls is not None:
for tool_call in tool_calls:
items.append(View on GitHub (pinned to c028a0c7dc)
Solutions
- Use the non-streaming `agent.invoke(...)` (or get_response) for AutoGenConversableAgent.
- Branch in your runner: check `isinstance(agent, AutoGenConversableAgent)` and call invoke instead of invoke_stream.
- Switch to an agent type that supports streaming (e.g. ChatCompletionAgent) if streaming is mandatory.
Example fix
# before
async for chunk in agent.invoke_stream(messages='hi', thread=thread):
...
# after
async for response in agent.invoke(messages='hi', thread=thread):
... Defensive patterns
Strategy: type-guard
Validate before calling
from semantic_kernel.agents.autogen import AutoGenConversableAgent streaming = not isinstance(agent, AutoGenConversableAgent)
Type guard
from semantic_kernel.agents.autogen import AutoGenConversableAgent
def supports_streaming(agent) -> bool:
return not isinstance(agent, AutoGenConversableAgent) Try / catch
from semantic_kernel.agents.autogen import AutoGenConversableAgent
if isinstance(agent, AutoGenConversableAgent):
responses = [r async for r in agent.invoke(messages=msg, thread=thread)]
else:
async for chunk in agent.invoke_stream(messages=msg, thread=thread):
... Prevention
- Branch your runner on agent type to choose invoke vs invoke_stream.
- Do not assume all agents support streaming.
When it happens
Trigger: Calling `async for chunk in agent.invoke_stream(...)` on an AutoGenConversableAgent; a framework/orchestrator that always uses the streaming API regardless of agent type.
Common situations: Generic agent runner that picks invoke_stream for all agents; migrating from a streaming-capable agent to AutoGenConversableAgent without switching to non-streaming invoke.
Related errors
- Streaming text contents not implemented.
- Streaming chat message contents not implemented.
- Unable to get channel keys. Channel type not configured.
- Unable to create channel. Channel type not configured.
- Cannot retrieve chat history, since the thread has been dele
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/d2e463f3f31bce01.
Report an issue: GitHub.