Python: [BREAKING] updated structure and samples (#875)

* updated structure and samples

* updated names and removed cross tests

* updated projects etc

* updated tests

* updated test

* test fixes

* removed devui for now

* updated all-tests task

* removed old style configs

* remove coverage from tests

* updated to unit tests with all-tests

* updated foundry everywhere

* fix azure ai tests

* fix merge tests

* fix mypy
This commit is contained in:
Eduard van Valkenburg
2025-09-25 09:02:53 +02:00
committed by GitHub
Unverified
parent 366a7f7d47
commit 9355329dfd
169 changed files with 1159 additions and 1761 deletions
@@ -12,7 +12,7 @@ from agent_framework import (
AgentRunResponse,
FunctionInvocationContext,
)
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -166,7 +166,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=get_weather,
@@ -15,7 +15,7 @@ from agent_framework import (
FunctionMiddleware,
Role,
)
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -99,7 +99,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=get_weather,
@@ -7,7 +7,7 @@ from agent_framework import (
agent_middleware,
function_middleware,
)
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
"""
@@ -70,7 +70,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="TimeAgent",
instructions="You are a helpful time assistant. Call get_current_time when asked about time.",
tools=get_current_time,
@@ -5,7 +5,7 @@ from collections.abc import Awaitable, Callable
from typing import Annotated
from agent_framework import FunctionInvocationContext
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -58,7 +58,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="DataAgent",
instructions="You are a helpful data assistant. Use the data service tool to fetch information for users.",
tools=unstable_data_service,
@@ -10,7 +10,7 @@ from agent_framework import (
AgentRunContext,
FunctionInvocationContext,
)
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -83,7 +83,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=get_weather,
@@ -12,7 +12,7 @@ from agent_framework import (
ChatMessage,
Role,
)
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -110,7 +110,7 @@ async def pre_termination_middleware() -> None:
print("\n--- Example 1: Pre-termination Middleware ---")
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=get_weather,
@@ -137,7 +137,7 @@ async def post_termination_middleware() -> None:
print("\n--- Example 2: Post-termination Middleware ---")
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant.",
tools=get_weather,
@@ -6,7 +6,7 @@ from random import randint
from typing import Annotated
from agent_framework import FunctionInvocationContext
from agent_framework.foundry import FoundryChatClient
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from pydantic import Field
@@ -67,7 +67,7 @@ async def main() -> None:
# authentication option.
async with (
AzureCliCredential() as credential,
FoundryChatClient(async_credential=credential).create_agent(
AzureAIAgentClient(async_credential=credential).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather assistant. Use the weather tool to get current conditions.",
tools=get_weather,