universal-mcp-agents 0.1.23rc11__py3-none-any.whl → 0.1.23rc12__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 universal-mcp-agents might be problematic. Click here for more details.

@@ -52,7 +52,7 @@ class CodeActPlaybookAgent(BaseAgent):
52
52
  **kwargs,
53
53
  )
54
54
  self.model_instance = load_chat_model(model)
55
- self.agent_builder_model_instance = load_chat_model("anthropic:claude-sonnet-4-5-20250929", thinking = False)
55
+ self.agent_builder_model_instance = load_chat_model("anthropic:claude-sonnet-4-5-20250929", thinking=False)
56
56
  self.registry = registry
57
57
  self.agent_builder_registry = agent_builder_registry
58
58
  self.agent = agent_builder_registry.get_agent() if agent_builder_registry else None
@@ -91,16 +91,23 @@ Note that the following tools are pre-loaded for the agent's use, and can be inl
91
91
 
92
92
 
93
93
  AGENT_BUILDER_GENERATING_PROMPT = """
94
- You are tasked with generating a reusable agent function based on the final confirmed agent plan and preceding conversation history including user messages, assistant messages, and code executions.
95
- Create an appropriately named python function that combines relevent previously executed code from the conversation history to achieve the plan objectives.
94
+ You are tasked with generating granular, reusable Python code for an agent based on the final confirmed plan and the conversation history (user messages, assistant messages, and code executions).
95
+
96
+ Produce a set of small, single-purpose functions—typically one function per plan step—plus one top-level orchestrator function that calls the step functions in order to complete the task.
97
+
96
98
  Rules-
97
- - Do NOT include the searching and loading of functions. Assume that the functions have already been loaded. Imports should be included.
98
- - Your response must be **ONLY Python code** for the function.
99
- - Do not include any text, explanations, or Markdown.
100
- - The response must start with `def` or `async def` and define a single, complete, executable function.
101
- - The function parameters **must exactly match the external variables** in the agent plan. External variables are marked using backticks `` `variable_name` ``. Any variables in italics (i.e. enclosed in *...*) are to be used internally, but not as the main function paramters.
102
- - Any imports, variables, helper or child functions required must be defined **inside the main top-level function**.
103
- - Ensure that the outer function is self-contained and can run independently, based on previously validated code snippets.
99
+ - Do NOT include the searching and loading of functions. Assume required functions have already been loaded. Include imports you need.
100
+ - Your response must be **ONLY Python code**. No markdown or explanations.
101
+ - Define multiple top-level functions:
102
+ 1) One small, clear function for each plan step (as granular as practical).
103
+ 2) One top-level orchestrator function that calls the step functions in sequence to achieve the plan objectives.
104
+ - The orchestrator function's parameters **must exactly match the external variables** in the agent plan (the ones marked with backticks `` `variable_name` ``). Provide defaults exactly as specified in the plan when present. Variables in italics (i.e. enclosed in *...*) are internal and must not be orchestrator parameters.
105
+ - The orchestrator function MUST be declared with `def` or `async def` and be directly runnable with a single Python command (e.g., `image_generator(...)`). If it is async, assume the caller will `await` it.
106
+ - Step functions should accept only the inputs they need, return explicit outputs, and pass intermediate results forward via return values—not globals.
107
+ - Name functions in snake_case derived from their purpose/step. Use keyword arguments in calls; avoid positional-only calls.
108
+ - Keep the code self-contained and executable. Put imports at the top of the code. Do not nest functions unless strictly necessary.
109
+ - If previously executed code snippets exist, adapt and reuse their validated logic inside the appropriate step functions.
110
+ - Do not print the final output; return it from the orchestrator.
104
111
 
105
112
  Example:
106
113
 
@@ -113,16 +120,31 @@ If the plan has:
113
120
  "Upload *temp_file_path* to OneDrive folder onedrive_parent_folder(default = 'root')"
114
121
  ]
115
122
 
116
- Then the function signature should be:
123
+ Then the functions should look like:
117
124
 
118
125
  ```python
119
- def image_generator(image_prompt, style="comic", onedrive_parent_folder="root"):
120
- #Code based on previously executed snippets
126
+ from typing import Dict
127
+
128
+ def generate_image(image_prompt: str, style: str = "comic") -> Dict:
129
+ # previously validated code to call Gemini
130
+ ...
131
+
132
+ def save_temp_image(image_result: Dict) -> str:
133
+ # previously validated code to write bytes to a temp file
134
+ ...
121
135
 
122
- And all internal variables (e.g., *temp_file_path*) should be defined inside the function.
136
+ def upload_to_onedrive(temp_file_path: str, onedrive_parent_folder: str = "root") -> Dict:
137
+ # previously validated code to upload
138
+ ...
123
139
 
140
+ def image_generator(image_prompt: str, style: str = "comic", onedrive_parent_folder: str = "root") -> Dict:
141
+ image_result = generate_image(image_prompt=image_prompt, style=style)
142
+ temp_file_path = save_temp_image(image_result=image_result)
143
+ upload_result = upload_to_onedrive(temp_file_path=temp_file_path, onedrive_parent_folder=onedrive_parent_folder)
144
+ return upload_result
145
+ ```
124
146
 
125
- Use this convention consistently to generate the final agent function.
147
+ Use this convention consistently to generate the final code.
126
148
  Note that the following tools are pre-loaded for the agent's use, and can be included in your code-\n
127
149
  """
128
150
 
@@ -203,10 +203,10 @@ def create_meta_tools(tool_registry: AgentrRegistry) -> dict[str, Any]:
203
203
  )
204
204
 
205
205
  result_parts.append("Call load_functions to select the required functions only.")
206
- if 0 < len(connected_apps_in_results) < len(apps_in_results):
206
+ if 0 <= len(connected_apps_in_results) < len(apps_in_results):
207
207
  result_parts.append(
208
- "Unconnected app functions can also be loaded if required by the user, "
209
- "but prefer connected ones. Ask the user to choose if none of the "
208
+ "Unconnected app functions can also be loaded if asked for by the user, they will generate a connection link"
209
+ "but prefer connected ones. Ask the user to choose the app if none of the "
210
210
  "relevant apps are connected."
211
211
  )
212
212
 
@@ -396,7 +396,7 @@ def create_meta_tools(tool_registry: AgentrRegistry) -> dict[str, Any]:
396
396
  response = await markitdown.convert_to_markdown(uri)
397
397
  return response
398
398
 
399
- async def save_file(file_name: str, content: str) -> dict:
399
+ def save_file(file_name: str, content: str) -> dict:
400
400
  """
401
401
  Saves a file to the local filesystem.
402
402
 
@@ -418,7 +418,7 @@ def create_meta_tools(tool_registry: AgentrRegistry) -> dict[str, Any]:
418
418
  "file_path": Path(file_name).absolute(),
419
419
  }
420
420
 
421
- async def upload_file(file_name: str, mime_type: str, base64_data: str) -> dict:
421
+ def upload_file(file_name: str, mime_type: str, base64_data: str) -> dict:
422
422
  """
423
423
  Uploads a file to the server via the AgentrClient.
424
424
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp-agents
3
- Version: 0.1.23rc11
3
+ Version: 0.1.23rc12
4
4
  Summary: Add your description here
5
5
  Project-URL: Homepage, https://github.com/universal-mcp/applications
6
6
  Project-URL: Repository, https://github.com/universal-mcp/applications
@@ -22,14 +22,14 @@ universal_mcp/agents/builder/prompts.py,sha256=8Xs6uzTUHguDRngVMLak3lkXFkk2VV_uQ
22
22
  universal_mcp/agents/builder/state.py,sha256=7DeWllxfN-yD6cd9wJ3KIgjO8TctkJvVjAbZT8W_zqk,922
23
23
  universal_mcp/agents/codeact0/__init__.py,sha256=8-fvUo1Sm6dURGI-lW-X3Kd78LqySYbb5NMkNJ4NDwg,76
24
24
  universal_mcp/agents/codeact0/__main__.py,sha256=YyIoecUcKVUhTcCACzLlSmYrayMDsdwzDEqaV4VV4CE,766
25
- universal_mcp/agents/codeact0/agent.py,sha256=Hwp7awECd6DPYL39LzGFrsqTkV0uCXWuVEJ_dUHxB-0,23499
25
+ universal_mcp/agents/codeact0/agent.py,sha256=sJmTrFudHMJkkRVJgmd3KdB-kFU-yCwPvyRJE18pJ3g,23497
26
26
  universal_mcp/agents/codeact0/config.py,sha256=H-1woj_nhSDwf15F63WYn723y4qlRefXzGxuH81uYF0,2215
27
27
  universal_mcp/agents/codeact0/langgraph_agent.py,sha256=8nz2wq-LexImx-l1y9_f81fK72IQetnCeljwgnduNGY,420
28
28
  universal_mcp/agents/codeact0/llm_tool.py,sha256=-pAz04OrbZ_dJ2ueysT1qZd02DrbLY4EbU0tiuF_UNU,798
29
- universal_mcp/agents/codeact0/prompts.py,sha256=02VAmWca0rirdE1d-gBZgKIw4Jg20eciJ9jppyNbFzI,16250
29
+ universal_mcp/agents/codeact0/prompts.py,sha256=cI6_0sueTVx0ci8nNcBgcTuCM7FqorhmAxH0DA8QsCA,17554
30
30
  universal_mcp/agents/codeact0/sandbox.py,sha256=Zcr7fvYtcGbwNWd7RPV7-Btl2HtycPIPofEGVmzxSmE,4696
31
31
  universal_mcp/agents/codeact0/state.py,sha256=cf-94hfVub-HSQJk6b7_SzqBS-oxMABjFa8jqyjdDK0,1925
32
- universal_mcp/agents/codeact0/tools.py,sha256=Kr8FZ8DyrUhxekbW52bhY-y2EzCj1hzsvWOeyKfB_5Q,23265
32
+ universal_mcp/agents/codeact0/tools.py,sha256=7w-04moo7gBkqjmGzz_rTbmJEG23W0vd71pZ0D9CA9M,23299
33
33
  universal_mcp/agents/codeact0/utils.py,sha256=eOdqemLx6RqI5g--vtM9WP2LHrYXro2bxScNAVUU0Do,19683
34
34
  universal_mcp/agents/shared/__main__.py,sha256=XxH5qGDpgFWfq7fwQfgKULXGiUgeTp_YKfcxftuVZq8,1452
35
35
  universal_mcp/agents/shared/prompts.py,sha256=yjP3zbbuKi87qCj21qwTTicz8TqtkKgnyGSeEjMu3ho,3761
@@ -39,6 +39,6 @@ universal_mcp/applications/filesystem/app.py,sha256=0TRjjm8YnslVRSmfkXI7qQOAlqWl
39
39
  universal_mcp/applications/llm/__init__.py,sha256=_XGRxN3O1--ZS5joAsPf8IlI9Qa6negsJrwJ5VJXno0,46
40
40
  universal_mcp/applications/llm/app.py,sha256=2BIH6JDqw6LPD9Iuo3_LoXa48813o6G4gmeRBR_v9oc,12933
41
41
  universal_mcp/applications/ui/app.py,sha256=c7OkZsO2fRtndgAzAQbKu-1xXRuRp9Kjgml57YD2NR4,9459
42
- universal_mcp_agents-0.1.23rc11.dist-info/METADATA,sha256=-nhuSFRtXvQJz1HSDb-QxTFAMH399Ve8tYVAqIhLM9c,932
43
- universal_mcp_agents-0.1.23rc11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- universal_mcp_agents-0.1.23rc11.dist-info/RECORD,,
42
+ universal_mcp_agents-0.1.23rc12.dist-info/METADATA,sha256=Tiz4qteBYfyzlspE5SOXGzIptJ6btKPcgjJjnkxixTk,932
43
+ universal_mcp_agents-0.1.23rc12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ universal_mcp_agents-0.1.23rc12.dist-info/RECORD,,