unique_orchestrator 1.1.1__py3-none-any.whl → 1.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of unique_orchestrator might be problematic. Click here for more details.

@@ -2,7 +2,7 @@ from enum import StrEnum
2
2
  from pathlib import Path
3
3
  from typing import Annotated, Any, Generic, Literal, TypeVar
4
4
 
5
- from pydantic import BaseModel, Field, ValidationInfo, field_validator
5
+ from pydantic import BaseModel, Field, ValidationInfo, field_validator, model_validator
6
6
  from unique_deep_research.config import DeepResearchToolConfig
7
7
  from unique_deep_research.service import DeepResearchTool
8
8
  from unique_follow_up_questions.config import FollowUpQuestionsConfig
@@ -22,6 +22,10 @@ from unique_toolkit.agentic.evaluation.schemas import EvaluationMetricName
22
22
  from unique_toolkit.agentic.history_manager.history_manager import (
23
23
  UploadedContentConfig,
24
24
  )
25
+ from unique_toolkit.agentic.tools.a2a import (
26
+ REFERENCING_INSTRUCTIONS_FOR_SYSTEM_PROMPT,
27
+ REFERENCING_INSTRUCTIONS_FOR_USER_PROMPT,
28
+ )
25
29
  from unique_toolkit.agentic.tools.a2a.evaluation import SubAgentEvaluationServiceConfig
26
30
  from unique_toolkit.agentic.tools.config import get_configuration_dict
27
31
  from unique_toolkit.agentic.tools.tool import ToolBuildConfig
@@ -201,6 +205,22 @@ class InputTokenDistributionConfig(BaseModel):
201
205
  return int(self.percent_for_history * max_input_token)
202
206
 
203
207
 
208
+ class SubAgentsConfig(BaseModel):
209
+ model_config = get_configuration_dict()
210
+ use_sub_agent_references: bool = Field(
211
+ default=True,
212
+ description="Whether to use sub agent references in the main agent's response. Only has an effect if sub agents are used.",
213
+ )
214
+ referencing_instructions_for_system_prompt: str = Field(
215
+ default=REFERENCING_INSTRUCTIONS_FOR_SYSTEM_PROMPT,
216
+ description="Referencing instructions for the main agent's system prompt.",
217
+ )
218
+ referencing_instructions_for_user_prompt: str = Field(
219
+ default=REFERENCING_INSTRUCTIONS_FOR_USER_PROMPT,
220
+ description="Referencing instructions for the main agent's user prompt. Should correspond to a short reminder.",
221
+ )
222
+
223
+
204
224
  class ExperimentalConfig(BaseModel):
205
225
  """Experimental features this part of the configuration might evolve in the future continuously"""
206
226
 
@@ -232,6 +252,8 @@ class ExperimentalConfig(BaseModel):
232
252
  max_tool_calls_per_iteration=5
233
253
  )
234
254
 
255
+ sub_agents_config: SubAgentsConfig = SubAgentsConfig()
256
+
235
257
 
236
258
  class UniqueAIAgentConfig(BaseModel):
237
259
  model_config = get_configuration_dict(frozen=True)
@@ -256,3 +278,9 @@ class UniqueAIConfig(BaseModel):
256
278
  space: UniqueAISpaceConfig = UniqueAISpaceConfig()
257
279
 
258
280
  agent: UniqueAIAgentConfig = UniqueAIAgentConfig()
281
+
282
+ @model_validator(mode="after")
283
+ def disable_sub_agent_referencing_if_not_used(self) -> "UniqueAIConfig":
284
+ if not any(tool.is_sub_agent for tool in self.space.tools):
285
+ self.agent.experimental.sub_agents_config.use_sub_agent_references = False
286
+ return self
@@ -73,7 +73,12 @@ This tool is called {{ tool_description.display_name }} by the user.
73
73
  - {{ meta.message }}
74
74
  {%- endif -%}
75
75
  {%- endfor -%}
76
- {%- endif -%}
76
+ {%- endif %}
77
+
78
+ {% if use_sub_agent_references and sub_agent_referencing_instructions | length > 0 %}
79
+ # Special Instructions: Referencing Sub Agents Answers
80
+ {{ sub_agent_referencing_instructions }}
81
+ {%- endif %}
77
82
 
78
83
  {# Answer Style Section #}
79
84
  # Answer Style
@@ -6,13 +6,18 @@
6
6
  - date_string: The current date in formatted string
7
7
  - mcp_server_user_prompts: List of unique server-wide user prompts from MCP servers
8
8
  - tool_descriptions_with_user_prompts: List of UniqueToolDescription objects with user prompts
9
- #}{{ query }}
9
+ #}
10
+ # User Query
11
+ {{ query }}
10
12
 
11
- {%- if mcp_server_user_prompts and mcp_server_user_prompts|length > 0 %}
13
+ {% if use_sub_agent_references and sub_agent_referencing_instructions | length > 0 %}
14
+ # Sub Agents Referencing Reminder
15
+ {{ sub_agent_referencing_instructions }}
16
+ {%- endif %}
12
17
 
13
- ## MCP Server Context
18
+ {%- if mcp_server_user_prompts and mcp_server_user_prompts|length > 0 %}
19
+ # MCP Server Context
14
20
  {%- for server_prompt in mcp_server_user_prompts %}
15
-
16
21
  {{ server_prompt }}
17
22
  {%- endfor %}
18
23
  {%- endif %}
@@ -256,12 +256,19 @@ class UniqueAI:
256
256
 
257
257
  query = self._event.payload.user_message.text
258
258
 
259
+ use_sub_agent_references = (
260
+ self._config.agent.experimental.sub_agents_config.use_sub_agent_references
261
+ )
262
+ sub_agent_referencing_instructions = self._config.agent.experimental.sub_agents_config.referencing_instructions_for_user_prompt
263
+
259
264
  user_msg = user_message_template.render(
260
265
  query=query,
261
266
  tool_descriptions=tool_descriptions,
262
267
  used_tools=used_tools,
263
268
  mcp_server_user_prompts=list(mcp_server_user_prompts),
264
269
  tool_descriptions_with_user_prompts=tool_descriptions_with_user_prompts,
270
+ use_sub_agent_references=use_sub_agent_references,
271
+ sub_agent_referencing_instructions=sub_agent_referencing_instructions,
265
272
  )
266
273
  return user_msg
267
274
 
@@ -283,6 +290,11 @@ class UniqueAI:
283
290
  mcp_server.system_prompt for mcp_server in self._mcp_servers
284
291
  ]
285
292
 
293
+ use_sub_agent_references = (
294
+ self._config.agent.experimental.sub_agents_config.use_sub_agent_references
295
+ )
296
+ sub_agent_referencing_instructions = self._config.agent.experimental.sub_agents_config.referencing_instructions_for_system_prompt
297
+
286
298
  system_message = system_prompt_template.render(
287
299
  model_info=self._config.space.language_model.model_dump(mode="json"),
288
300
  date_string=date_string,
@@ -294,6 +306,8 @@ class UniqueAI:
294
306
  max_loop_iterations=self._config.agent.max_loop_iterations,
295
307
  current_iteration=self.current_iteration_index + 1,
296
308
  mcp_server_system_prompts=mcp_server_system_prompts,
309
+ use_sub_agent_references=use_sub_agent_references,
310
+ sub_agent_referencing_instructions=sub_agent_referencing_instructions,
297
311
  )
298
312
  return system_message
299
313
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_orchestrator
3
- Version: 1.1.1
3
+ Version: 1.2.1
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Andreas Hauri
@@ -14,12 +14,12 @@ Requires-Dist: pydantic-settings (>=2.10.1,<3.0.0)
14
14
  Requires-Dist: pytest (>=8.4.1,<9.0.0)
15
15
  Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
16
16
  Requires-Dist: typing-extensions (>=4.9.0,<5.0.0)
17
- Requires-Dist: unique-deep-research (>=2.0.0,<3.0.0)
17
+ Requires-Dist: unique-deep-research (>=3.0.0,<4.0.0)
18
18
  Requires-Dist: unique-follow-up-questions (>=1.0.0,<2.0.0)
19
19
  Requires-Dist: unique-internal-search (>=1.0.0,<2.0.0)
20
20
  Requires-Dist: unique-sdk (>=0.10.24,<0.11.0)
21
21
  Requires-Dist: unique-stock-ticker (>=1.0.0,<2.0.0)
22
- Requires-Dist: unique-toolkit (>=1.8.0,<2.0.0)
22
+ Requires-Dist: unique-toolkit (>=1.11.0,<2.0.0)
23
23
  Requires-Dist: unique-web-search (>=1.0.0,<2.0.0)
24
24
  Description-Content-Type: text/markdown
25
25
 
@@ -33,6 +33,12 @@ All notable changes to this project will be documented in this file.
33
33
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
34
34
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
35
35
 
36
+ ## [1.2.1] - 2025-10-07
37
+ - upgrade to deep research 3.0.0
38
+
39
+ ## [1.2.0] - 2025-10-07
40
+ - Add sub agent response referencing.
41
+
36
42
  ## [1.1.1] - 2025-10-03
37
43
  - Adapt orchestrator to toolkit 1.8.0.
38
44
 
@@ -64,3 +70,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
64
70
 
65
71
  ## [0.0.1] - 2025-08-18
66
72
  - Initial release of `orchestrator`.
73
+
@@ -0,0 +1,11 @@
1
+ unique_orchestrator/config.py,sha256=OqXs0697mEoPEh8baM1z4mU909QD_D812jq8ZQ8wLwc,9512
2
+ unique_orchestrator/prompts/generic_reference_prompt.jinja2,sha256=fYPaiE-N1gSoOqu85OeEBa_ttAim8grOhHuOHJjSHNU,2663
3
+ unique_orchestrator/prompts/system_prompt.jinja2,sha256=YXFdx3PG2p4TKfjEpz7guIw2GaKoY-4zRMEzXaKhHXE,7213
4
+ unique_orchestrator/prompts/user_message_prompt.jinja2,sha256=BQokpBh3H2J-rFk8i-PRph3jy4T1gAJPPb1mxxRWNuM,878
5
+ unique_orchestrator/tests/test_unique_ai_reference_order.py,sha256=8mZeVP1k8neH4qrFW3oa3zwIdaq2c7R1VvurC7kjBU8,4445
6
+ unique_orchestrator/unique_ai.py,sha256=8sBD5P16XcJ_3BXywBuZRRa4h89ANAi8h3VA4V2G_sI,16471
7
+ unique_orchestrator/unique_ai_builder.py,sha256=m9-k9oVY7RR9ntrWEzBs0gcycNk4JcbqNfqW-DlJXrc,7507
8
+ unique_orchestrator-1.2.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
9
+ unique_orchestrator-1.2.1.dist-info/METADATA,sha256=AYwq3UqeiP9pTYh-mxJPjdcwqkz-rObVFxPTmtJN32Y,2156
10
+ unique_orchestrator-1.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
+ unique_orchestrator-1.2.1.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- unique_orchestrator/config.py,sha256=0hGPvAoZ-3Q-PknUI13g_oBBPkfFT1rgmmgxTA9cqKc,8265
2
- unique_orchestrator/prompts/generic_reference_prompt.jinja2,sha256=fYPaiE-N1gSoOqu85OeEBa_ttAim8grOhHuOHJjSHNU,2663
3
- unique_orchestrator/prompts/system_prompt.jinja2,sha256=0FrDZbfpVMjf4G1VBOavG1aUlZTDDDdn_aUGjeVac4g,7018
4
- unique_orchestrator/prompts/user_message_prompt.jinja2,sha256=KLCfbxMu5R7_V8-AHkdXEmVorcSHNej_xM_7xJyNkl0,692
5
- unique_orchestrator/tests/test_unique_ai_reference_order.py,sha256=8mZeVP1k8neH4qrFW3oa3zwIdaq2c7R1VvurC7kjBU8,4445
6
- unique_orchestrator/unique_ai.py,sha256=OFzgyPWvh5mK4p3OxII3hKpQt_dhHBD2BbtHakZ35n8,15635
7
- unique_orchestrator/unique_ai_builder.py,sha256=m9-k9oVY7RR9ntrWEzBs0gcycNk4JcbqNfqW-DlJXrc,7507
8
- unique_orchestrator-1.1.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
9
- unique_orchestrator-1.1.1.dist-info/METADATA,sha256=2gUxO5WspiMNuKncOtwIFPLByQ9pSEBCzMOREkvuoaU,2033
10
- unique_orchestrator-1.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
- unique_orchestrator-1.1.1.dist-info/RECORD,,