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
@@ -3,7 +3,7 @@
import asyncio
from typing import Any
from agent_framework import AgentProtocol, AgentResponse, AgentThread, HostedMCPTool
from agent_framework import SupportsAgentRun, AgentResponse, AgentThread, HostedMCPTool
from agent_framework.azure import AzureAIAgentsProvider
from azure.identity.aio import AzureCliCredential
@@ -15,7 +15,7 @@ servers, including user approval workflows for function call security.
"""
async def handle_approvals_with_thread(query: str, agent: "AgentProtocol", thread: "AgentThread") -> AgentResponse:
async def handle_approvals_with_thread(query: str, agent: "SupportsAgentRun", thread: "AgentThread") -> AgentResponse:
"""Here we let the thread deal with the previous responses, and we just rerun with the approval."""
from agent_framework import ChatMessage
@@ -5,7 +5,7 @@ from datetime import datetime, timezone
from typing import Any
from agent_framework import (
AgentProtocol,
SupportsAgentRun,
AgentThread,
HostedMCPTool,
HostedWebSearchTool,
@@ -43,7 +43,7 @@ def get_time() -> str:
return f"The current UTC time is {current_time.strftime('%Y-%m-%d %H:%M:%S')}."
async def handle_approvals_with_thread(query: str, agent: "AgentProtocol", thread: "AgentThread"):
async def handle_approvals_with_thread(query: str, agent: "SupportsAgentRun", thread: "AgentThread"):
"""Here we let the thread deal with the previous responses, and we just rerun with the approval."""
from agent_framework import ChatMessage