Skip to content

Commit 10c5977

Browse files
authored
Merge pull request microsoft#547 from Fr4nc3/macae-rfa-agent-framework
Migrate from semantic-kernel to agent-framework
2 parents 176046f + 119c659 commit 10c5977

File tree

5 files changed

+11
-581
lines changed

5 files changed

+11
-581
lines changed

src/backend/common/config/app_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from azure.cosmos import CosmosClient
88
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential
99
from dotenv import load_dotenv
10-
from semantic_kernel import Kernel
10+
from agent_framework import Kernel
1111

1212
# Load environment variables from .env file
1313
load_dotenv()

src/backend/common/models/messages_kernel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from datetime import datetime, timezone
33
from enum import Enum
44
from typing import Any, Dict, List, Literal, Optional
5+
from pydantic import BaseModel, Field
56

6-
from semantic_kernel.kernel_pydantic import Field, KernelBaseModel
77

88
class DataType(str, Enum):
99
"""Enumeration of possible data types for documents in the database."""
@@ -74,7 +74,7 @@ class MessageRole(str, Enum):
7474
function = "function"
7575

7676

77-
class BaseDataModel(KernelBaseModel):
77+
class BaseDataModel(BaseModel):
7878
"""Base data model with common fields."""
7979

8080
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
@@ -151,7 +151,7 @@ class TeamSelectionRequest(BaseDataModel):
151151
team_id: str
152152

153153

154-
class TeamAgent(KernelBaseModel):
154+
class TeamAgent(BaseModel):
155155
"""Represents an agent within a team."""
156156

157157
input_key: str
@@ -169,7 +169,7 @@ class TeamAgent(KernelBaseModel):
169169
coding_tools: bool = False
170170

171171

172-
class StartingTask(KernelBaseModel):
172+
class StartingTask(BaseModel):
173173
"""Represents a starting task for a team."""
174174

175175
id: str
@@ -243,15 +243,15 @@ def update_step_counts(self):
243243

244244

245245
# Message classes for communication between agents
246-
class InputTask(KernelBaseModel):
246+
class InputTask(BaseModel):
247247
"""Message representing the initial input task from the user."""
248248

249249
session_id: str
250250
description: str # Initial goal
251251
# team_id: str
252252

253253

254-
class UserLanguage(KernelBaseModel):
254+
class UserLanguage(BaseModel):
255255
language: str
256256

257257

src/backend/common/utils/utils_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import Any, Dict
55

66
# Import agent factory and the new AppConfig
7-
from semantic_kernel.agents.azure_ai.azure_ai_agent import AzureAIAgent
7+
from agent_framework.azure import AzureAIAgentClient
88
from v3.magentic_agents.foundry_agent import FoundryAgentTemplate
99

1010
logging.basicConfig(level=logging.INFO)

src/backend/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
8+
"agent-framework==1.0.0b6",
89
"azure-ai-evaluation>=1.5.0",
910
"azure-ai-inference>=1.0.0b9",
1011
"azure-ai-projects==1.0.0",
@@ -27,9 +28,8 @@ dependencies = [
2728
"pytest-cov==5.0.0",
2829
"python-dotenv>=1.1.0",
2930
"python-multipart>=0.0.20",
30-
"semantic-kernel==1.35.3",
3131
"uvicorn>=0.34.2",
3232
"pylint-pydantic>=0.3.5",
3333
"pexpect>=4.9.0",
34-
"mcp>=1.13.1"
34+
"mcp>=1.13.1",
3535
]

0 commit comments

Comments
 (0)