Python: [BREAKING] Renamed AgentProtocol to SupportsAgentRun (#3717)

* Renamed AgentProtocol to AgentLike

* Resolved comments

* Renamed AgentLike to SupportsAgentRun

* Resolved comments
This commit is contained in:
Dmytro Struk
2026-02-06 09:53:21 -08:00
committed by GitHub
Unverified
parent ac17adb595
commit 15256bb616
55 changed files with 354 additions and 354 deletions
@@ -757,11 +757,11 @@ class EntityDiscovery:
True if object appears to be a valid agent
"""
try:
# Try to import AgentProtocol for proper type checking
# Try to import SupportsAgentRun for proper type checking
try:
from agent_framework import AgentProtocol
from agent_framework import SupportsAgentRun
if isinstance(obj, AgentProtocol):
if isinstance(obj, SupportsAgentRun):
return True
except ImportError:
pass
@@ -7,7 +7,7 @@ import logging
from collections.abc import AsyncGenerator
from typing import Any
from agent_framework import AgentProtocol, Content, Workflow
from agent_framework import Content, SupportsAgentRun, Workflow
from ._conversations import ConversationStore, InMemoryConversationStore
from ._discovery import EntityDiscovery
@@ -285,7 +285,7 @@ class AgentFrameworkExecutor:
yield {"type": "error", "message": str(e), "entity_id": entity_id}
async def _execute_agent(
self, agent: AgentProtocol, request: AgentFrameworkRequest, trace_collector: Any
self, agent: SupportsAgentRun, request: AgentFrameworkRequest, trace_collector: Any
) -> AsyncGenerator[Any, None]:
"""Execute Agent Framework agent with trace collection and optional thread support.