universal-mcp-agents 0.1.4__py3-none-any.whl → 0.1.6__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.

Files changed (39) hide show
  1. universal_mcp/agents/__init__.py +19 -0
  2. universal_mcp/agents/autoagent/__init__.py +1 -1
  3. universal_mcp/agents/autoagent/__main__.py +1 -1
  4. universal_mcp/agents/autoagent/graph.py +2 -2
  5. universal_mcp/agents/base.py +24 -13
  6. universal_mcp/agents/bigtool/__init__.py +10 -8
  7. universal_mcp/agents/bigtool/__main__.py +6 -7
  8. universal_mcp/agents/bigtool/graph.py +18 -27
  9. universal_mcp/agents/bigtool/prompts.py +3 -3
  10. universal_mcp/agents/bigtool2/__init__.py +16 -3
  11. universal_mcp/agents/bigtool2/__main__.py +6 -5
  12. universal_mcp/agents/bigtool2/agent.py +1 -1
  13. universal_mcp/agents/bigtool2/graph.py +55 -20
  14. universal_mcp/agents/bigtool2/prompts.py +8 -5
  15. universal_mcp/agents/bigtoolcache/agent.py +2 -2
  16. universal_mcp/agents/bigtoolcache/graph.py +5 -6
  17. universal_mcp/agents/bigtoolcache/prompts.py +1 -2
  18. universal_mcp/agents/builder.py +47 -14
  19. universal_mcp/agents/cli.py +19 -5
  20. universal_mcp/agents/codeact/test.py +2 -1
  21. universal_mcp/agents/llm.py +7 -3
  22. universal_mcp/agents/planner/__init__.py +8 -2
  23. universal_mcp/agents/planner/__main__.py +10 -8
  24. universal_mcp/agents/planner/graph.py +6 -2
  25. universal_mcp/agents/planner/prompts.py +14 -1
  26. universal_mcp/agents/planner/state.py +0 -1
  27. universal_mcp/agents/react.py +36 -27
  28. universal_mcp/agents/shared/tool_node.py +2 -3
  29. universal_mcp/agents/simple.py +19 -3
  30. universal_mcp/agents/utils.py +36 -36
  31. universal_mcp/applications/ui/app.py +305 -0
  32. {universal_mcp_agents-0.1.4.dist-info → universal_mcp_agents-0.1.6.dist-info}/METADATA +2 -2
  33. universal_mcp_agents-0.1.6.dist-info/RECORD +50 -0
  34. universal_mcp/agents/autoagent/studio.py +0 -19
  35. universal_mcp/agents/bigtool/context.py +0 -24
  36. universal_mcp/agents/bigtool2/context.py +0 -32
  37. universal_mcp/agents/tools.py +0 -41
  38. universal_mcp_agents-0.1.4.dist-info/RECORD +0 -53
  39. {universal_mcp_agents-0.1.4.dist-info → universal_mcp_agents-0.1.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,305 @@
1
+ import re
2
+ from typing import Literal, TypedDict
3
+
4
+ import httpx
5
+ from loguru import logger
6
+ from markitdown import MarkItDown
7
+ from universal_mcp.applications.application import BaseApplication
8
+
9
+
10
+ class SeriesItem(TypedDict):
11
+ seriesName: str
12
+ value: float
13
+
14
+
15
+ class ChartDataItem(TypedDict):
16
+ xAxisLabel: str
17
+ series: list[SeriesItem]
18
+
19
+
20
+ class PieChartDataItem(TypedDict):
21
+ label: str
22
+ value: float
23
+
24
+
25
+ class ColumnDefinition(TypedDict):
26
+ key: str
27
+ label: str
28
+ type: Literal["string", "number", "date", "boolean"] | None
29
+
30
+
31
+ class UiApp(BaseApplication):
32
+ """An application for creating UI tools"""
33
+
34
+ def __init__(self, **kwargs):
35
+ """Initialize the DefaultToolsApp"""
36
+ super().__init__(name="ui")
37
+ self.markitdown = MarkItDown(enable_plugins=True)
38
+
39
+ def create_bar_chart(
40
+ self,
41
+ title: str,
42
+ data: list[ChartDataItem],
43
+ description: str | None = None,
44
+ y_axis_label: str | None = None,
45
+ ):
46
+ """Create a bar chart with multiple data series.
47
+
48
+ Args:
49
+ title (str): The title of the chart.
50
+ data (List[ChartDataItem]): Chart data with x-axis labels and series values.
51
+ description (Optional[str]): Optional description for the chart.
52
+ y_axis_label (Optional[str]): Optional label for the Y-axis.
53
+
54
+ Tags:
55
+ important
56
+ """
57
+ return "Success"
58
+
59
+ def create_line_chart(
60
+ self,
61
+ title: str,
62
+ data: list[ChartDataItem],
63
+ description: str | None = None,
64
+ y_axis_label: str | None = None,
65
+ ):
66
+ """Create a line chart with multiple data series.
67
+
68
+ Args:
69
+ title (str): The title of the chart.
70
+ data (List[ChartDataItem]): Chart data with x-axis labels and series values.
71
+ description (Optional[str]): Optional description for the chart.
72
+ y_axis_label (Optional[str]): Optional label for the Y-axis.
73
+
74
+ Tags:
75
+ important
76
+ """
77
+ return "Success"
78
+
79
+ def create_pie_chart(
80
+ self,
81
+ title: str,
82
+ data: list[PieChartDataItem],
83
+ description: str | None = None,
84
+ unit: str | None = None,
85
+ ):
86
+ """Create a pie chart.
87
+
88
+ Args:
89
+ title (str): The title of the chart.
90
+ data (List[PieChartDataItem]): Data for the pie chart with labels and values.
91
+ description (Optional[str]): Optional description for the chart.
92
+ unit (Optional[str]): Optional unit for the values.
93
+
94
+ Tags:
95
+ important
96
+ """
97
+ return "Success"
98
+
99
+ def create_table(
100
+ self,
101
+ title: str,
102
+ columns: list[ColumnDefinition],
103
+ data: list[dict],
104
+ description: str | None = None,
105
+ ):
106
+ """Create an interactive table with data.
107
+
108
+ The table will automatically have sorting, filtering, and search functionality.
109
+
110
+ Args:
111
+ title (str): The title of the table.
112
+ columns (List[ColumnDefinition]): Column configuration array.
113
+ data (List[dict]): Array of row objects. Each object should have keys matching the column keys.
114
+ description (Optional[str]): Optional description for the table.
115
+
116
+ Tags:
117
+ important
118
+ """
119
+ return "Success"
120
+
121
+ def _handle_response(self, response: httpx.Response):
122
+ """
123
+ Handle the HTTP response, returning JSON if possible, otherwise text.
124
+ """
125
+ try:
126
+ return response.json()
127
+ except Exception:
128
+ logger.warning(
129
+ f"Response is not JSON, returning text. Content-Type: {response.headers.get('content-type')}"
130
+ )
131
+ return {
132
+ "text": response.text,
133
+ "status_code": response.status_code,
134
+ "headers": dict(response.headers),
135
+ }
136
+
137
+ def http_get(
138
+ self, url: str, headers: dict | None = None, query_params: dict | None = None
139
+ ):
140
+ """
141
+ Perform a GET request to the specified URL with optional parameters.
142
+
143
+ Args:
144
+ url (str): The URL to send the GET request to. Example: "https://api.example.com/data"
145
+ headers (dict, optional): Optional HTTP headers to include in the request. Example: {"Authorization": "Bearer token"}
146
+ query_params (dict, optional): Optional dictionary of query parameters to include in the request. Example: {"page": 1}
147
+
148
+ Returns:
149
+ dict: The JSON response from the GET request, or text if not JSON.
150
+ Tags:
151
+ get, important
152
+ """
153
+ logger.debug(
154
+ f"GET request to {url} with headers {headers} and query params {query_params}"
155
+ )
156
+ response = httpx.get(url, params=query_params, headers=headers)
157
+ response.raise_for_status()
158
+ return self._handle_response(response)
159
+
160
+ def http_post(
161
+ self, url: str, headers: dict | None = None, body: dict | None = None
162
+ ):
163
+ """
164
+ Perform a POST request to the specified URL with optional parameters.
165
+
166
+ Args:
167
+ url (str): The URL to send the POST request to. Example: "https://api.example.com/data"
168
+ headers (dict, optional): Optional HTTP headers to include in the request. Example: {"Content-Type": "application/json"}
169
+ body (dict, optional): Optional JSON body to include in the request. Example: {"name": "John"}
170
+
171
+ Returns:
172
+ dict: The JSON response from the POST request, or text if not JSON.
173
+ Tags:
174
+ post, important
175
+ """
176
+ logger.debug(f"POST request to {url} with headers {headers} and body {body}")
177
+ response = httpx.post(url, json=body, headers=headers)
178
+ response.raise_for_status()
179
+ return self._handle_response(response)
180
+
181
+ def http_put(self, url: str, headers: dict | None = None, body: dict | None = None):
182
+ """
183
+ Perform a PUT request to the specified URL with optional parameters.
184
+
185
+ Args:
186
+ url (str): The URL to send the PUT request to. Example: "https://api.example.com/data/1"
187
+ headers (dict, optional): Optional HTTP headers to include in the request. Example: {"Authorization": "Bearer token"}
188
+ body (dict, optional): Optional JSON body to include in the request. Example: {"name": "Jane"}
189
+
190
+ Returns:
191
+ dict: The JSON response from the PUT request, or text if not JSON.
192
+ Tags:
193
+ put, important
194
+ """
195
+ logger.debug(f"PUT request to {url} with headers {headers} and body {body}")
196
+ response = httpx.put(url, json=body, headers=headers)
197
+ response.raise_for_status()
198
+ return self._handle_response(response)
199
+
200
+ def http_delete(
201
+ self, url: str, headers: dict | None = None, body: dict | None = None
202
+ ):
203
+ """
204
+ Perform a DELETE request to the specified URL with optional parameters.
205
+
206
+ Args:
207
+ url (str): The URL to send the DELETE request to. Example: "https://api.example.com/data/1"
208
+ headers (dict, optional): Optional HTTP headers to include in the request. Example: {"Authorization": "Bearer token"}
209
+ body (dict, optional): Optional JSON body to include in the request. Example: {"reason": "obsolete"}
210
+
211
+ Returns:
212
+ dict: The JSON response from the DELETE request, or text if not JSON.
213
+ Tags:
214
+ delete, important
215
+ """
216
+ logger.debug(f"DELETE request to {url} with headers {headers} and body {body}")
217
+ response = httpx.delete(url, json=body, headers=headers)
218
+ response.raise_for_status()
219
+ return self._handle_response(response)
220
+
221
+ def http_patch(
222
+ self, url: str, headers: dict | None = None, body: dict | None = None
223
+ ):
224
+ """
225
+ Perform a PATCH request to the specified URL with optional parameters.
226
+
227
+ Args:
228
+ url (str): The URL to send the PATCH request to. Example: "https://api.example.com/data/1"
229
+ headers (dict, optional): Optional HTTP headers to include in the request. Example: {"Authorization": "Bearer token"}
230
+ body (dict, optional): Optional JSON body to include in the request. Example: {"status": "active"}
231
+
232
+ Returns:
233
+ dict: The JSON response from the PATCH request, or text if not JSON.
234
+ Tags:
235
+ patch, important
236
+ """
237
+ logger.debug(f"PATCH request to {url} with headers {headers} and body {body}")
238
+ response = httpx.patch(url, json=body, headers=headers)
239
+ response.raise_for_status()
240
+ return self._handle_response(response)
241
+
242
+ async def read_file(self, uri: str) -> str:
243
+ """
244
+ This tool aims to extract the main text content from any url.
245
+ When faced with a question you do not know the answer to, call this tool as often as
246
+ needed to get the full context from any file in the user file attachments section.
247
+
248
+ Asynchronously converts a URI or local file path to markdown format
249
+ using the markitdown converter.
250
+ Args:
251
+ uri (str): The URI pointing to the resource or a local file path.
252
+ Supported schemes:
253
+ - http:// or https:// (Web pages, feeds, APIs)
254
+ - file:// (Local or accessible network files)
255
+ - data: (Embedded data)
256
+
257
+ Returns:
258
+ A string containing the markdown representation of the content at the specified URI
259
+
260
+ Raises:
261
+ ValueError: If the URI is invalid, empty, or uses an unsupported scheme
262
+ after automatic prefixing.
263
+
264
+ Tags:
265
+ convert, markdown, async, uri, transform, document, important
266
+ """
267
+ if not uri:
268
+ raise ValueError("URI cannot be empty")
269
+
270
+ known_schemes = ["http://", "https://", "file://", "data:"]
271
+ has_scheme = any(uri.lower().startswith(scheme) for scheme in known_schemes)
272
+ if not has_scheme and not re.match(r"^[a-zA-Z]+:", uri):
273
+ if re.match(r"^[a-zA-Z]:[\\/]", uri): # Check for Windows drive letter path
274
+ normalized_path = uri.replace("\\", "/") # Normalize backslashes
275
+ processed_uri = f"file:///{normalized_path}"
276
+ else: # Assume Unix-like path or simple relative path
277
+ processed_uri = (
278
+ f"file://{uri}" if uri.startswith("/") else f"file:///{uri}"
279
+ ) # Add leading slash if missing for absolute paths
280
+
281
+ uri_to_process = processed_uri
282
+ else:
283
+ # Use the uri as provided
284
+ uri_to_process = uri
285
+
286
+ return self.markitdown.convert_uri(uri_to_process).markdown
287
+
288
+ def list_tools(self):
289
+ """List all available tool methods in this application.
290
+
291
+ Returns:
292
+ list: A list of callable tool methods.
293
+ """
294
+ return [
295
+ self.create_bar_chart,
296
+ self.create_line_chart,
297
+ self.create_pie_chart,
298
+ self.create_table,
299
+ self.http_get,
300
+ self.http_post,
301
+ self.http_put,
302
+ self.http_delete,
303
+ self.http_patch,
304
+ self.read_file,
305
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp-agents
3
- Version: 0.1.4
3
+ Version: 0.1.6
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
@@ -11,11 +11,11 @@ Requires-Dist: langchain-anthropic>=0.3.19
11
11
  Requires-Dist: langchain-google-genai>=2.1.10
12
12
  Requires-Dist: langchain-openai>=0.3.32
13
13
  Requires-Dist: langgraph>=0.6.6
14
- Requires-Dist: universal-mcp-applications>=0.1.4
15
14
  Requires-Dist: universal-mcp>=0.1.24rc17
16
15
  Provides-Extra: dev
17
16
  Requires-Dist: pre-commit; extra == 'dev'
18
17
  Requires-Dist: ruff; extra == 'dev'
19
18
  Provides-Extra: test
19
+ Requires-Dist: pytest-asyncio>=1.1.0; extra == 'test'
20
20
  Requires-Dist: pytest-cov; extra == 'test'
21
21
  Requires-Dist: pytest<9.0.0,>=7.0.0; extra == 'test'
@@ -0,0 +1,50 @@
1
+ universal_mcp/agents/__init__.py,sha256=QfYDUZxIYQSqbpGt6NZ3U5tjf7SS1Y9uPzAwmaRoDrA,1186
2
+ universal_mcp/agents/base.py,sha256=h_FDAclpFKpaMCSNhBcwIMF0DLbZtyyoy_l71UxY4Aw,6892
3
+ universal_mcp/agents/builder.py,sha256=4RTROLljLzF4S3qrQrkl_mS3EipBBvqnvJflJ45oYCs,7850
4
+ universal_mcp/agents/cli.py,sha256=_rJV6TxBG2amH3o8mVs4pxViaTfkBhz6n5l6xhv4Z3g,1014
5
+ universal_mcp/agents/hil.py,sha256=XfQT8QcuDbiIpUU9N4WSbO2Tm9YNSuwRqyCTWmCWaZo,3818
6
+ universal_mcp/agents/llm.py,sha256=gnyCYW8Ohax8S9CXIfeI7hoBYNO0fa_1hJkIabCGoKY,1788
7
+ universal_mcp/agents/react.py,sha256=jH42VFAB-BuPUVpaMIspBjjukYEJan-DQxtNamD1o0I,3010
8
+ universal_mcp/agents/simple.py,sha256=Z5Ja12vJIhIHhB68WWH_5opln7FMDUiRfztKOj2Rx-U,1941
9
+ universal_mcp/agents/utils.py,sha256=g_v7IEKtx6CBQK-Nue_weVVie62KQLQjz7izU3kOWPQ,4988
10
+ universal_mcp/agents/autoagent/__init__.py,sha256=fDiruZjxHhGPa6gg88as0SKHV8c3Mq56CCshZDIcLt8,836
11
+ universal_mcp/agents/autoagent/__main__.py,sha256=S_inq-PR6KgJqcDhoXp_-PCehORF6WGputQ_hTrJOl0,654
12
+ universal_mcp/agents/autoagent/context.py,sha256=RgjW1uCslucxYJpdmi4govd-0V1_9e6Y_kjWl3FpLrE,847
13
+ universal_mcp/agents/autoagent/graph.py,sha256=JKdQy21w5jXyjyICTrhKS4MXHth6kHzREhR-DCU3Dws,6928
14
+ universal_mcp/agents/autoagent/prompts.py,sha256=v-EwzZ_0XPuBNd_r8aWxmKMSQlZLTVBr0o-dmTQMN1w,892
15
+ universal_mcp/agents/autoagent/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
16
+ universal_mcp/agents/autoagent/utils.py,sha256=AFq-8scw_WlSZxDnTzxSNrOSiGYsIlqkqtQLDWf_rMU,431
17
+ universal_mcp/agents/bigtool/__init__.py,sha256=Qw2C29q6R7TXmpzlSStwYM9Rbv9Iguj7U0p0CPy7thY,1782
18
+ universal_mcp/agents/bigtool/__main__.py,sha256=WkPJl8r7L0CZXoFCU8w7eFEejLI8KIflkWnvLFt8jdA,660
19
+ universal_mcp/agents/bigtool/graph.py,sha256=JAw7waUrAA7t6ZpbPcbnSu3sh6MhYfIUkJJfYc9mHCc,8528
20
+ universal_mcp/agents/bigtool/prompts.py,sha256=pzLNaLg5ftv8B8k7McpDrSkos0N5eR6rKcw5psudBFg,1662
21
+ universal_mcp/agents/bigtool/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
22
+ universal_mcp/agents/bigtool2/__init__.py,sha256=wkhjOeAHhIpuciLTbKZT3J2uPIJ0KFZpCDn0xX2plNs,2421
23
+ universal_mcp/agents/bigtool2/__main__.py,sha256=SAHfoLqDEhUj3dF3vSzfetCzPGMC3UPJxBySHujSrDY,669
24
+ universal_mcp/agents/bigtool2/agent.py,sha256=ef9IIxgJmr26eYWQdazrIA-IXHGRwT0XNyPThJR55Tk,436
25
+ universal_mcp/agents/bigtool2/graph.py,sha256=-JkU2SrIxBk0lbolKCUmJAbC0w2m9mMdaXn7L2-Z-W0,11100
26
+ universal_mcp/agents/bigtool2/prompts.py,sha256=rQFtZDkwU9z8d4PWdt6jpohGhyab658Xvk8hvNVBFBA,1843
27
+ universal_mcp/agents/bigtool2/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
28
+ universal_mcp/agents/bigtoolcache/__init__.py,sha256=YY7X8-XQ3AC2t_Y9MN9dZk5wTPu7iU6YS8Yhn_akgC0,1844
29
+ universal_mcp/agents/bigtoolcache/__main__.py,sha256=HkPEQqsdnWtDzWSbYdVBBc_JhpRi82TYuaubxNMtt4w,622
30
+ universal_mcp/agents/bigtoolcache/agent.py,sha256=GdIT7RZQ6SCIMrNUs4amZijBQk8d6YVh1fiYzLcUyO8,460
31
+ universal_mcp/agents/bigtoolcache/context.py,sha256=ny7gd-vvVpUOYAeQbAEUT0A6Vm6Nn2qGywxTzPBzYFg,929
32
+ universal_mcp/agents/bigtoolcache/graph.py,sha256=9BrHPEl7oUPvVy_gIQ3ewwK4oz9-0yElR2G8yAsaLA8,8645
33
+ universal_mcp/agents/bigtoolcache/prompts.py,sha256=XDU2uJWzwGwt8t3zGjOH16YIrHJCdPuLP5lyJ2llXFg,3226
34
+ universal_mcp/agents/bigtoolcache/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
35
+ universal_mcp/agents/bigtoolcache/tools_all.txt,sha256=g52i00AOh9VTDsAtIAF8vhqtTHQVmzTn61k724niEA0,95408
36
+ universal_mcp/agents/bigtoolcache/tools_important.txt,sha256=PD4klowvARwhbC8dcXMm_sGUWH7cAynX40nXLqeRbdQ,38593
37
+ universal_mcp/agents/codeact/__init__.py,sha256=qm06CsIodscl-XFfriYiPMDn7I_aIg48TTIw2ESgU2w,10263
38
+ universal_mcp/agents/codeact/sandbox.py,sha256=lGRzhuXTHCB1qauuOI3bH1-fPTsyL6Lf9EmMIz4C2xQ,1039
39
+ universal_mcp/agents/codeact/test.py,sha256=MT0v4HChoJU4MGb7oIDlG8lvBUymroXjAkP-ELu2fKw,498
40
+ universal_mcp/agents/codeact/utils.py,sha256=VuMvLTxBBh3pgaJk8RWj5AK8XZFF-1gnZJ6jFLeM_CI,1690
41
+ universal_mcp/agents/planner/__init__.py,sha256=b5HnTHXvs0y5KBwy9yr8d96MbyObUZ8QWrCFbUhdgGo,1335
42
+ universal_mcp/agents/planner/__main__.py,sha256=OfhTfYDZK_ZUfc8sX-Sa6TWk-dNqD2rl13Ln64mNAtw,771
43
+ universal_mcp/agents/planner/graph.py,sha256=qTXUVXiPWZP73GsY9mQEGmBtA-C1t06jpzgJINNpMFU,3241
44
+ universal_mcp/agents/planner/prompts.py,sha256=_JoHqiAvswtqCDu90AGUHmfsu8eWE1-_yI4LLn3pqMU,657
45
+ universal_mcp/agents/planner/state.py,sha256=qqyp-jSGsCxe1US-PRLT4-y1sITAcVE6nCMlQLnvop0,278
46
+ universal_mcp/agents/shared/tool_node.py,sha256=FiKY0AhxKIFpzGKGnyRL-6Dzuf0KUDmiQo7IhXmE27s,8861
47
+ universal_mcp/applications/ui/app.py,sha256=y1DcnX1Vg-d1cBtEP0_jUOR2ypbB0X7q4YiQNAg9WdY,11223
48
+ universal_mcp_agents-0.1.6.dist-info/METADATA,sha256=jFTf1cj81KgPlJ4emHKZzS5lbEkcw6_qdCbRsJokMeM,798
49
+ universal_mcp_agents-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
+ universal_mcp_agents-0.1.6.dist-info/RECORD,,
@@ -1,19 +0,0 @@
1
- import asyncio
2
-
3
- from universal_mcp.agentr.registry import AgentrRegistry
4
- from universal_mcp.agents.autoagent import build_graph
5
- from universal_mcp.tools import ToolManager
6
-
7
- tool_registry = AgentrRegistry()
8
- tool_manager = ToolManager()
9
-
10
-
11
- async def main():
12
- instructions = """
13
- You are a helpful assistant that can use tools to help the user. If a task requires multiple steps, you should perform separate different searches for different actions. Prefer completing one action before searching for another.
14
- """
15
- graph = await build_graph(tool_registry, instructions=instructions)
16
- return graph
17
-
18
-
19
- graph = asyncio.run(main())
@@ -1,24 +0,0 @@
1
- from dataclasses import dataclass, field
2
-
3
- from .prompts import SYSTEM_PROMPT
4
-
5
-
6
- @dataclass(kw_only=True)
7
- class Context:
8
- """The context for the agent."""
9
-
10
- system_prompt: str = field(
11
- default=SYSTEM_PROMPT,
12
- metadata={
13
- "description": "The system prompt to use for the agent's interactions. "
14
- "This prompt sets the context and behavior for the agent."
15
- },
16
- )
17
-
18
- model: str = field(
19
- default="anthropic/claude-4-sonnet-20250514",
20
- metadata={
21
- "description": "The name of the language model to use for the agent's main interactions. "
22
- "Should be in the form: provider/model-name."
23
- },
24
- )
@@ -1,32 +0,0 @@
1
- from dataclasses import dataclass, field
2
-
3
- from .prompts import SYSTEM_PROMPT
4
-
5
-
6
- @dataclass(kw_only=True)
7
- class Context:
8
- """The context for the agent."""
9
-
10
- system_prompt: str = field(
11
- default=SYSTEM_PROMPT,
12
- metadata={
13
- "description": "The system prompt to use for the agent's interactions. "
14
- "This prompt sets the context and behavior for the agent."
15
- },
16
- )
17
-
18
- model: str = field(
19
- default="anthropic/claude-4-sonnet-20250514",
20
- metadata={
21
- "description": "The name of the language model to use for the agent's main interactions. "
22
- "Should be in the form: provider/model-name."
23
- },
24
- )
25
-
26
- recursion_limit: int = field(
27
- default=10,
28
- metadata={
29
- "description": "The maximum number of times the agent can call itself recursively. "
30
- "This is to prevent infinite recursion."
31
- },
32
- )
@@ -1,41 +0,0 @@
1
- import json
2
-
3
- from langchain_mcp_adapters.client import MultiServerMCPClient
4
-
5
- from universal_mcp.agentr.integration import AgentrIntegration
6
- from universal_mcp.applications.utils import app_from_slug
7
- from universal_mcp.tools.adapters import ToolFormat
8
- from universal_mcp.tools.manager import ToolManager
9
- from universal_mcp.types import ToolConfig
10
-
11
-
12
- async def load_agentr_tools(agentr_servers: dict):
13
- tool_manager = ToolManager()
14
- for app_name, tool_names in agentr_servers.items():
15
- app = app_from_slug(app_name)
16
- integration = AgentrIntegration(name=app_name)
17
- app_instance = app(integration=integration)
18
- tool_manager.register_tools_from_app(
19
- app_instance, tool_names=tool_names["tools"]
20
- )
21
- tools = tool_manager.list_tools(format=ToolFormat.LANGCHAIN)
22
- return tools
23
-
24
-
25
- async def load_mcp_tools(mcp_servers: dict):
26
- client = MultiServerMCPClient(mcp_servers)
27
- tools = await client.get_tools()
28
- return tools
29
-
30
-
31
- async def load_tools(path: str) -> ToolConfig:
32
- with open(path) as f:
33
- data = json.load(f)
34
- config = ToolConfig.model_validate(data)
35
- agentr_tools = await load_agentr_tools(
36
- config.model_dump(exclude_none=True)["agentrServers"]
37
- )
38
- mcp_tools = await load_mcp_tools(
39
- config.model_dump(exclude_none=True)["mcpServers"]
40
- )
41
- return agentr_tools + mcp_tools
@@ -1,53 +0,0 @@
1
- universal_mcp/agents/__init__.py,sha256=s50fHbQ3ufC_7mwQydHoua4KJOjKjKcUrAgMN0A_34M,588
2
- universal_mcp/agents/base.py,sha256=gvo0nQDh6_LXbwRVWnGpL_u9e0ZSRe-ONHF9HPOzlj8,6086
3
- universal_mcp/agents/builder.py,sha256=4F29b9QjrzVhz-di7MFA3X9vr1jpcjlRSLgPWvmzJQY,6134
4
- universal_mcp/agents/cli.py,sha256=7GdRBpu9rhZPiC2vaNQXWI7K-0yCnvdlmE0IFpvy2Gk,539
5
- universal_mcp/agents/hil.py,sha256=XfQT8QcuDbiIpUU9N4WSbO2Tm9YNSuwRqyCTWmCWaZo,3818
6
- universal_mcp/agents/llm.py,sha256=k2aElFCAFEHSOTDVbA9NZrcWw6PMssG73_ZjVLYl3UM,1623
7
- universal_mcp/agents/react.py,sha256=XlttlICxHOMa87MgLcoknDzepVMLsw6_DrWH7hfbmVM,2562
8
- universal_mcp/agents/simple.py,sha256=Hr8sxDRW9VD3_ZaH-GhCgwe2XIRWEGn9ERYS25L6Los,1422
9
- universal_mcp/agents/tools.py,sha256=vjTFJy1qw7WmKw2eCGiW0M9CgYV91hem8h8W2dLDwzg,1407
10
- universal_mcp/agents/utils.py,sha256=eiR4CNf29ftqeySoCLjyh-gCXMout346_xA8i1Q9EAA,4516
11
- universal_mcp/agents/autoagent/__init__.py,sha256=RruAbcjyMTB-dIRkzFZYtQxrTpZetynBRYd1xD9noj8,836
12
- universal_mcp/agents/autoagent/__main__.py,sha256=HH5D5gSw6xirrSoj_0CCmQlVq_wfp--b6hZdiHGfXD8,654
13
- universal_mcp/agents/autoagent/context.py,sha256=RgjW1uCslucxYJpdmi4govd-0V1_9e6Y_kjWl3FpLrE,847
14
- universal_mcp/agents/autoagent/graph.py,sha256=ULTksF5qH-3whBvwP9Z2-0fiivudIx5482JWo70sneI,6928
15
- universal_mcp/agents/autoagent/prompts.py,sha256=v-EwzZ_0XPuBNd_r8aWxmKMSQlZLTVBr0o-dmTQMN1w,892
16
- universal_mcp/agents/autoagent/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
17
- universal_mcp/agents/autoagent/studio.py,sha256=6RHU5UTIfap3b3ZKYD_Z87ciKNjIQA4FGDw8c8nGA84,638
18
- universal_mcp/agents/autoagent/utils.py,sha256=AFq-8scw_WlSZxDnTzxSNrOSiGYsIlqkqtQLDWf_rMU,431
19
- universal_mcp/agents/bigtool/__init__.py,sha256=QfuZF1f7r2ACLc2_awyBiF7PATiE3-dv4x4VoYw5ljw,1875
20
- universal_mcp/agents/bigtool/__main__.py,sha256=_4HBqnlmdJwXOgeMITjBgaDHihED-aEgQmSXL9xcj0Y,602
21
- universal_mcp/agents/bigtool/context.py,sha256=KM_B-rvEulrvXSBrXAJpwxGHVMW0HgiYKMnmrL2pUEQ,688
22
- universal_mcp/agents/bigtool/graph.py,sha256=_3QHCobnELN1qyj3Eel9xhCAqiuNZzm7AZCg3M2fltM,9208
23
- universal_mcp/agents/bigtool/prompts.py,sha256=A6El6Qw9r_D8OD4IZKuYqvrJFJZZmUhrTKlyqFPf6c0,1666
24
- universal_mcp/agents/bigtool/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
25
- universal_mcp/agents/bigtool2/__init__.py,sha256=RgT8OqIFpYEIXI5MhMFlUfZAc7aYI0_aX3HkgjPZtwk,1801
26
- universal_mcp/agents/bigtool2/__main__.py,sha256=C4Mi8vM9kuGa_CryzIc9nL4-u73ZvSK5tOTbMDMN54I,605
27
- universal_mcp/agents/bigtool2/agent.py,sha256=UPhjGjWOE6tOkL7Mzx8nosJox5kERvnu1BCpfNQEqlg,436
28
- universal_mcp/agents/bigtool2/context.py,sha256=ny7gd-vvVpUOYAeQbAEUT0A6Vm6Nn2qGywxTzPBzYFg,929
29
- universal_mcp/agents/bigtool2/graph.py,sha256=8yWSolV8DUvoOjwzVGwZrYsIiqj9nGMGAK8tCp76nKA,9256
30
- universal_mcp/agents/bigtool2/prompts.py,sha256=Kn1sDrjH2xb3js_MPPu5PJHMP45unl93CdOC97Q_hzw,1652
31
- universal_mcp/agents/bigtool2/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
32
- universal_mcp/agents/bigtoolcache/__init__.py,sha256=YY7X8-XQ3AC2t_Y9MN9dZk5wTPu7iU6YS8Yhn_akgC0,1844
33
- universal_mcp/agents/bigtoolcache/__main__.py,sha256=HkPEQqsdnWtDzWSbYdVBBc_JhpRi82TYuaubxNMtt4w,622
34
- universal_mcp/agents/bigtoolcache/agent.py,sha256=LvzLV4lens_F8Or1Q3cGpo_ZAPxDEWFqtM707FRe9u4,448
35
- universal_mcp/agents/bigtoolcache/context.py,sha256=ny7gd-vvVpUOYAeQbAEUT0A6Vm6Nn2qGywxTzPBzYFg,929
36
- universal_mcp/agents/bigtoolcache/graph.py,sha256=ASOO3P5qUMFj7zwGyn592PpZclMHCYbfP2atMhMy2Cs,8628
37
- universal_mcp/agents/bigtoolcache/prompts.py,sha256=joVjGrgUA2KVNADohZlCc2inP6wdqg7Dgr_3mXzpHZE,3241
38
- universal_mcp/agents/bigtoolcache/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
39
- universal_mcp/agents/bigtoolcache/tools_all.txt,sha256=g52i00AOh9VTDsAtIAF8vhqtTHQVmzTn61k724niEA0,95408
40
- universal_mcp/agents/bigtoolcache/tools_important.txt,sha256=PD4klowvARwhbC8dcXMm_sGUWH7cAynX40nXLqeRbdQ,38593
41
- universal_mcp/agents/codeact/__init__.py,sha256=qm06CsIodscl-XFfriYiPMDn7I_aIg48TTIw2ESgU2w,10263
42
- universal_mcp/agents/codeact/sandbox.py,sha256=lGRzhuXTHCB1qauuOI3bH1-fPTsyL6Lf9EmMIz4C2xQ,1039
43
- universal_mcp/agents/codeact/test.py,sha256=AI3qWszpM46hF4wzuQm6A8g_UkhGmcg9KhHtk9u14ro,497
44
- universal_mcp/agents/codeact/utils.py,sha256=VuMvLTxBBh3pgaJk8RWj5AK8XZFF-1gnZJ6jFLeM_CI,1690
45
- universal_mcp/agents/planner/__init__.py,sha256=GNtoMfL1zFTksYtLpbOBN6yW1G-tMhVQDd9_TlWl3hk,1139
46
- universal_mcp/agents/planner/__main__.py,sha256=M4jZdWs7bWSG-J8iymwRR07Zmu89SAo6sDV3Ucqa1Bw,699
47
- universal_mcp/agents/planner/graph.py,sha256=JRndNhAWgmjOsltzvyV49GNSASXNwAvc7ERuhZNLNm4,3123
48
- universal_mcp/agents/planner/prompts.py,sha256=vLViZ4BeinqUe8gXACLl04UUnH-Hie5L2qDyhCmSNe0,32
49
- universal_mcp/agents/planner/state.py,sha256=EdrIELvxzBZtdC1FpmErYnCC7OSJ3Irx9QGiCBCeomA,279
50
- universal_mcp/agents/shared/tool_node.py,sha256=MMILT5o-ZNSmXDXavqyewWcgwmp0TFYInNX9MdUEvQM,8888
51
- universal_mcp_agents-0.1.4.dist-info/METADATA,sha256=9FhL5a3MTh_CJVgUtjRIpfD2oAdzMJz8te6rbjp_hV8,793
52
- universal_mcp_agents-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
- universal_mcp_agents-0.1.4.dist-info/RECORD,,