Skip to content

Commit d514c1a

Browse files
Merge branch 'macae-rfp-agent-framework' of https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator into psl-v4infrachanges
2 parents 17c61a0 + 095bb07 commit d514c1a

File tree

9 files changed

+179
-99
lines changed

9 files changed

+179
-99
lines changed

data/agent_teams/retail.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
"use_bing": false,
2020
"use_reasoning": false,
2121
"index_name": "macae-retail-customer-index",
22-
"index_foundry_name": "",
23-
"index_endpoint": "",
2422
"coding_tools": false
2523
},
2624
{
@@ -45,8 +43,8 @@
4543
"name": "AnalysisRecommendationAgent",
4644
"deployment_name": "o4-mini",
4745
"icon": "",
48-
"system_message": "You are a reasoning agent that can analyze customer data and provide recommendations for improving customer satisfaction and retention. You do not have access to any data sources, but you can reason based on the information provided to you by other agents. Use your reasoning skills to identify patterns, trends, and insights that can help improve customer satisfaction and retention. Provide actionable recommendations based on your analysis. You have access to other agents that can answer questions and provide data about customers, products, orders, inventory, and fulfilment. Use these agents to gather information as needed.",
49-
"description": "A reasoning agent that can analyze customer data and provide recommendations for improving customer satisfaction and retention.",
46+
"system_message": "You are a reasoning agent that can analyze customer and order data and provide recommendations for improving customer satisfaction and retention. You do not have access to any data sources, but you can reason based on the information provided to you by other agents. Use your reasoning skills to identify patterns, trends, and insights that can help improve customer satisfaction and retention. Provide actionable recommendations based on your analysis. You have access to other agents that can answer questions and provide data about customers, products, orders, inventory, and fulfilment. Use these agents to gather information as needed.",
47+
"description": "A reasoning agent that can analyze customer and order data and provide recommendations for improving customer satisfaction and retention.",
5048
"use_rag": false,
5149
"use_mcp": false,
5250
"use_bing": false,

data/agent_teams/rfp_analysis_team.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
"use_bing": false,
4040
"use_reasoning": false,
4141
"index_name": "macae-rfp-index",
42-
"index_foundry_name": "",
43-
"index_endpoint": "",
4442
"coding_tools": false
4543
},
4644
{
@@ -56,8 +54,6 @@
5654
"use_bing": false,
5755
"use_reasoning": false,
5856
"index_name": "macae-rfp-index",
59-
"index_foundry_name": "",
60-
"index_endpoint": "",
6157
"coding_tools": false
6258
}
6359
],

src/backend/common/database/database_base.py

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,30 @@ class DatabaseBase(ABC):
2121
@abstractmethod
2222
async def initialize(self) -> None:
2323
"""Initialize the database client and create containers if needed."""
24+
pass
2425

2526
@abstractmethod
2627
async def close(self) -> None:
2728
"""Close database connection."""
29+
pass
2830

2931
# Core CRUD Operations
3032
@abstractmethod
3133
async def add_item(self, item: BaseDataModel) -> None:
3234
"""Add an item to the database."""
35+
pass
3336

3437
@abstractmethod
3538
async def update_item(self, item: BaseDataModel) -> None:
3639
"""Update an item in the database."""
40+
pass
3741

3842
@abstractmethod
3943
async def get_item_by_id(
4044
self, item_id: str, partition_key: str, model_class: Type[BaseDataModel]
4145
) -> Optional[BaseDataModel]:
4246
"""Retrieve an item by its ID and partition key."""
47+
pass
4348

4449
@abstractmethod
4550
async def query_items(
@@ -49,92 +54,113 @@ async def query_items(
4954
model_class: Type[BaseDataModel],
5055
) -> List[BaseDataModel]:
5156
"""Query items from the database and return a list of model instances."""
57+
pass
5258

5359
@abstractmethod
5460
async def delete_item(self, item_id: str, partition_key: str) -> None:
5561
"""Delete an item from the database."""
62+
pass
5663

5764
# Plan Operations
5865
@abstractmethod
5966
async def add_plan(self, plan: Plan) -> None:
6067
"""Add a plan to the database."""
68+
pass
6169

6270
@abstractmethod
6371
async def update_plan(self, plan: Plan) -> None:
6472
"""Update a plan in the database."""
73+
pass
6574

6675
@abstractmethod
6776
async def get_plan_by_plan_id(self, plan_id: str) -> Optional[Plan]:
6877
"""Retrieve a plan by plan_id."""
78+
pass
6979

7080
@abstractmethod
7181
async def get_plan(self, plan_id: str) -> Optional[Plan]:
7282
"""Retrieve a plan by plan_id."""
83+
pass
7384

7485
@abstractmethod
7586
async def get_all_plans(self) -> List[Plan]:
7687
"""Retrieve all plans for the user."""
88+
pass
7789

7890
@abstractmethod
7991
async def get_all_plans_by_team_id(self, team_id: str) -> List[Plan]:
8092
"""Retrieve all plans for a specific team."""
93+
pass
8194

8295
@abstractmethod
8396
async def get_all_plans_by_team_id_status(
8497
self, user_id: str, team_id: str, status: str
8598
) -> List[Plan]:
8699
"""Retrieve all plans for a specific team."""
100+
pass
87101

88102
# Step Operations
89103
@abstractmethod
90104
async def add_step(self, step: Step) -> None:
91105
"""Add a step to the database."""
106+
pass
92107

93108
@abstractmethod
94109
async def update_step(self, step: Step) -> None:
95110
"""Update a step in the database."""
111+
pass
96112

97113
@abstractmethod
98114
async def get_steps_by_plan(self, plan_id: str) -> List[Step]:
99115
"""Retrieve all steps for a plan."""
116+
pass
100117

101118
@abstractmethod
102119
async def get_step(self, step_id: str, session_id: str) -> Optional[Step]:
103120
"""Retrieve a step by step_id and session_id."""
121+
pass
104122

105123
# Team Operations
106124
@abstractmethod
107125
async def add_team(self, team: TeamConfiguration) -> None:
108126
"""Add a team configuration to the database."""
127+
pass
109128

110129
@abstractmethod
111130
async def update_team(self, team: TeamConfiguration) -> None:
112131
"""Update a team configuration in the database."""
132+
pass
113133

114134
@abstractmethod
115135
async def get_team(self, team_id: str) -> Optional[TeamConfiguration]:
116136
"""Retrieve a team configuration by team_id."""
137+
pass
117138

118139
@abstractmethod
119140
async def get_team_by_id(self, team_id: str) -> Optional[TeamConfiguration]:
120141
"""Retrieve a team configuration by internal id."""
142+
pass
121143

122144
@abstractmethod
123145
async def get_all_teams(self) -> List[TeamConfiguration]:
124146
"""Retrieve all team configurations for the given user."""
147+
pass
125148

126149
@abstractmethod
127150
async def delete_team(self, team_id: str) -> bool:
128151
"""Delete a team configuration by team_id and return True if deleted."""
152+
pass
129153

130154
# Data Management Operations
131155
@abstractmethod
132156
async def get_data_by_type(self, data_type: str) -> List[BaseDataModel]:
133157
"""Retrieve all data of a specific type."""
158+
pass
134159

135160
@abstractmethod
136161
async def get_all_items(self) -> List[Dict[str, Any]]:
137162
"""Retrieve all items as dictionaries."""
163+
pass
138164

139165
# Context Manager Support
140166
async def __aenter__(self):
@@ -149,47 +175,59 @@ async def __aexit__(self, exc_type, exc, tb):
149175
@abstractmethod
150176
async def get_steps_for_plan(self, plan_id: str) -> List[Step]:
151177
"""Convenience method aliasing get_steps_by_plan for compatibility."""
178+
pass
152179

153180
@abstractmethod
154181
async def get_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
155182
"""Retrieve the current team for a user."""
183+
pass
156184

157185
@abstractmethod
158186
async def delete_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
159187
"""Retrieve the current team for a user."""
188+
pass
160189

161190
@abstractmethod
162191
async def set_current_team(self, current_team: UserCurrentTeam) -> None:
192+
"""Set the current team for a user."""
163193
pass
164194

165195
@abstractmethod
166196
async def update_current_team(self, current_team: UserCurrentTeam) -> None:
167197
"""Update the current team for a user."""
198+
pass
168199

169200
@abstractmethod
170201
async def delete_plan_by_plan_id(self, plan_id: str) -> bool:
171-
"""Retrieve the current team for a user."""
202+
"""Delete a plan by plan_id and return True if deleted."""
203+
pass
172204

173205
@abstractmethod
174206
async def add_mplan(self, mplan: messages.MPlan) -> None:
175-
"""Add a team configuration to the database."""
207+
"""Add an mplan configuration to the database."""
208+
pass
176209

177210
@abstractmethod
178211
async def update_mplan(self, mplan: messages.MPlan) -> None:
179-
"""Update a team configuration in the database."""
212+
"""Update an mplan configuration in the database."""
213+
pass
180214

181215
@abstractmethod
182216
async def get_mplan(self, plan_id: str) -> Optional[messages.MPlan]:
183-
"""Retrieve a mplan configuration by plan_id."""
217+
"""Retrieve an mplan configuration by plan_id."""
218+
pass
184219

185220
@abstractmethod
186221
async def add_agent_message(self, message: AgentMessageData) -> None:
222+
"""Add an agent message to the database."""
187223
pass
188224

189225
@abstractmethod
190226
async def update_agent_message(self, message: AgentMessageData) -> None:
191227
"""Update an agent message in the database."""
228+
pass
192229

193230
@abstractmethod
194231
async def get_agent_messages(self, plan_id: str) -> Optional[AgentMessageData]:
195-
"""Retrieve an agent message by message_id."""
232+
"""Retrieve agent messages by plan_id."""
233+
pass

src/backend/v4/magentic_agents/proxy_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def get_new_thread(self, **kwargs: Any) -> AgentThread:
8181
A new AgentThread instance
8282
"""
8383
return AgentThread(**kwargs)
84-
8584
async def run(
8685
self,
8786
messages: str | ChatMessage | list[str] | list[ChatMessage] | None = None,
@@ -161,7 +160,7 @@ async def _invoke_stream_internal(
161160
)
162161
logger.debug("ProxyAgent: Message text: %s", message_text[:100])
163162

164-
clarification_req_text = f"I need clarification about: {message_text}"
163+
clarification_req_text = f"{message_text}"
165164
clarification_request = UserClarificationRequest(
166165
question=clarification_req_text,
167166
request_id=str(uuid.uuid4()),

0 commit comments

Comments
 (0)