universal-mcp-agents 0.1.22__tar.gz → 0.1.23rc1__tar.gz
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.
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/PKG-INFO +1 -1
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/pyproject.toml +1 -1
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/agent.py +61 -31
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/tools.py +0 -6
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/uv.lock +1 -1
- universal_mcp_agents-0.1.22/bech.py +0 -38
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/evals.yml +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/lint.yml +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/release-please.yml +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/tests.yml +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.gitignore +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.pre-commit-config.yaml +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/GEMINI.md +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/PROMPTS.md +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/README.md +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/bump_and_release.sh +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/dataset.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/codeact.jsonl +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/exact.jsonl +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/tasks.jsonl +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/evaluators.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/prompts.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/run.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/utils.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/tests/test_agents.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/base.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/__main__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/agent.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/context.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/graph.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/prompts.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/state.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/tools.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/__main__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/builder.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/helper.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/prompts.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/state.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/cli.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/__main__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/config.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/langgraph_agent.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/llm_tool.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/prompts.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/sandbox.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/state.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/utils.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/hil.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/llm.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/react.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/sandbox.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/__main__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/prompts.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/tool_node.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/simple.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/utils.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/filesystem/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/filesystem/app.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/llm/__init__.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/llm/app.py +0 -0
- {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/ui/app.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: universal-mcp-agents
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.23rc1
|
|
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
|
|
@@ -39,7 +39,6 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
39
39
|
instructions: str,
|
|
40
40
|
model: str,
|
|
41
41
|
memory: BaseCheckpointSaver | None = None,
|
|
42
|
-
tools: ToolConfig | None = None,
|
|
43
42
|
registry: ToolRegistry | None = None,
|
|
44
43
|
playbook_registry: object | None = None,
|
|
45
44
|
sandbox_timeout: int = 20,
|
|
@@ -54,10 +53,10 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
54
53
|
)
|
|
55
54
|
self.model_instance = load_chat_model(model)
|
|
56
55
|
self.playbook_model_instance = load_chat_model("azure/gpt-4.1")
|
|
57
|
-
self.tools_config = tools or {}
|
|
58
56
|
self.registry = registry
|
|
59
57
|
self.playbook_registry = playbook_registry
|
|
60
58
|
self.playbook = playbook_registry.get_agent() if playbook_registry else None
|
|
59
|
+
self.tools_config = self.playbook.tools if self.playbook else {}
|
|
61
60
|
self.eval_fn = eval_unsafe
|
|
62
61
|
self.sandbox_timeout = sandbox_timeout
|
|
63
62
|
self.default_tools = {
|
|
@@ -169,7 +168,7 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
169
168
|
self.tools_config.extend(new_tool_ids)
|
|
170
169
|
self.exported_tools = await self.registry.export_tools(new_tool_ids, ToolFormat.LANGCHAIN)
|
|
171
170
|
self.final_instructions, self.tools_context = create_default_prompt(
|
|
172
|
-
self.exported_tools, self.additional_tools, self.instructions, await get_connected_apps_string(self.registry)
|
|
171
|
+
self.exported_tools, self.additional_tools, self.instructions, await get_connected_apps_string(self.registry), self.playbook
|
|
173
172
|
)
|
|
174
173
|
if ask_user:
|
|
175
174
|
tool_messages.append(AIMessage(content=ai_msg))
|
|
@@ -226,23 +225,47 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
226
225
|
|
|
227
226
|
t = user_text.lower()
|
|
228
227
|
if t == "yes, this is great":
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
228
|
+
self.meta_id = str(uuid.uuid4())
|
|
229
|
+
name, description = None, None
|
|
230
|
+
if self.playbook:
|
|
231
|
+
# Update flow: use existing name/description and do not re-generate
|
|
232
|
+
name = getattr(self.playbook, "name", None)
|
|
233
|
+
description = getattr(self.playbook, "description", None)
|
|
234
|
+
writer({
|
|
235
|
+
"type": "custom",
|
|
236
|
+
id: self.meta_id,
|
|
237
|
+
"name": "generating",
|
|
238
|
+
"data": {
|
|
239
|
+
"update": True,
|
|
240
|
+
"name": name,
|
|
241
|
+
"description": description,
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
else:
|
|
245
|
+
writer({
|
|
246
|
+
"type": "custom",
|
|
247
|
+
id: self.meta_id,
|
|
248
|
+
"name": "generating",
|
|
249
|
+
"data": {"update": False}
|
|
250
|
+
})
|
|
251
|
+
|
|
252
|
+
meta_instructions = self.instructions + PLAYBOOK_META_PROMPT
|
|
253
|
+
messages = [{"role": "system", "content": meta_instructions}] + state["messages"]
|
|
254
|
+
|
|
255
|
+
model_with_structured_output = self.playbook_model_instance.with_structured_output(PlaybookMeta)
|
|
256
|
+
meta_response = model_with_structured_output.invoke(messages)
|
|
257
|
+
meta = cast(PlaybookMeta, meta_response)
|
|
258
|
+
name, description = meta.name, meta.description
|
|
259
|
+
|
|
260
|
+
# Emit intermediary UI update with created name/description
|
|
261
|
+
writer({
|
|
262
|
+
"type": "custom",
|
|
263
|
+
id: self.meta_id,
|
|
264
|
+
"name": "generating",
|
|
265
|
+
"data": {"update": False, "name": name, "description": description}
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
return Command(goto="playbook", update={"playbook_mode": "generating", "playbook_name": name, "playbook_description": description})
|
|
246
269
|
if t == "i would like to modify the plan":
|
|
247
270
|
prompt_ai = AIMessage(content="What would you like to change about the plan? Let me know and I'll update the plan accordingly.", additional_kwargs={"stream": "true"})
|
|
248
271
|
return Command(update={"playbook_mode": "planning", "messages": [prompt_ai]})
|
|
@@ -253,13 +276,6 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
253
276
|
return Command(goto="call_model", update={"playbook_mode": "inactive"})
|
|
254
277
|
|
|
255
278
|
elif playbook_mode == "generating":
|
|
256
|
-
generate_id = str(uuid.uuid4())
|
|
257
|
-
writer({
|
|
258
|
-
"type": "custom",
|
|
259
|
-
id: generate_id,
|
|
260
|
-
"name": "generating",
|
|
261
|
-
"data": {"update": bool(self.playbook)}
|
|
262
|
-
})
|
|
263
279
|
generating_instructions = self.instructions + PLAYBOOK_GENERATING_PROMPT
|
|
264
280
|
messages = [{"role": "system", "content": generating_instructions}] + state["messages"]
|
|
265
281
|
|
|
@@ -304,11 +320,25 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
304
320
|
|
|
305
321
|
writer({
|
|
306
322
|
"type": "custom",
|
|
307
|
-
id:
|
|
323
|
+
id: self.meta_id,
|
|
308
324
|
"name": "generating",
|
|
309
|
-
"data": {
|
|
325
|
+
"data": {
|
|
326
|
+
"id": str(res.id),
|
|
327
|
+
"update": bool(self.playbook),
|
|
328
|
+
"name": final_name,
|
|
329
|
+
"description": final_description,
|
|
330
|
+
}
|
|
310
331
|
})
|
|
311
|
-
mock_assistant_message = AIMessage(
|
|
332
|
+
mock_assistant_message = AIMessage(
|
|
333
|
+
content=json.dumps(response.dict()),
|
|
334
|
+
additional_kwargs={
|
|
335
|
+
"type": "generating",
|
|
336
|
+
"id": str(res.id),
|
|
337
|
+
"update": bool(self.playbook),
|
|
338
|
+
"name": final_name,
|
|
339
|
+
"description": final_description,
|
|
340
|
+
},
|
|
341
|
+
)
|
|
312
342
|
|
|
313
343
|
return Command(
|
|
314
344
|
update={"messages": [mock_assistant_message], "playbook_mode": "normal"}
|
|
@@ -320,7 +350,7 @@ class CodeActPlaybookAgent(BaseAgent):
|
|
|
320
350
|
self.tools_config.extend(state.get("selected_tool_ids", []))
|
|
321
351
|
self.exported_tools = await self.registry.export_tools(self.tools_config, ToolFormat.LANGCHAIN)
|
|
322
352
|
self.final_instructions, self.tools_context = create_default_prompt(
|
|
323
|
-
self.exported_tools, self.additional_tools, self.instructions, await get_connected_apps_string(self.registry)
|
|
353
|
+
self.exported_tools, self.additional_tools, self.instructions, await get_connected_apps_string(self.registry), self.playbook
|
|
324
354
|
)
|
|
325
355
|
if state.get("playbook_mode") in ["planning", "confirming", "generating"]:
|
|
326
356
|
return "playbook"
|
|
@@ -14,12 +14,6 @@ def enter_playbook_mode():
|
|
|
14
14
|
"""Call this function to enter playbook mode. Playbook mode is when the user wants to store a repeated task as a script with some inputs for the future."""
|
|
15
15
|
return
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
def exit_playbook_mode():
|
|
19
|
-
"""Call this function to exit playbook mode. Playbook mode is when the user wants to store a repeated task as a script with some inputs for the future."""
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
17
|
def create_meta_tools(tool_registry: AgentrRegistry) -> dict[str, Any]:
|
|
24
18
|
"""Create the meta tools for searching and loading tools"""
|
|
25
19
|
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
from universal_mcp.agentr.registry import AgentrRegistry
|
|
2
|
-
from universal_mcp.agents import get_agent
|
|
3
|
-
from langgraph.checkpoint.memory import MemorySaver
|
|
4
|
-
from universal_mcp.agents.utils import messages_to_list
|
|
5
|
-
import time
|
|
6
|
-
from loguru import logger
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
async def main():
|
|
10
|
-
start_time = time.time()
|
|
11
|
-
memory = MemorySaver()
|
|
12
|
-
logger.info(f"Checkpointer: Time consumed: {time.time() - start_time}")
|
|
13
|
-
agent_cls = get_agent("codeact-repl")
|
|
14
|
-
logger.info(f"Get class: Time consumed: {time.time() - start_time}")
|
|
15
|
-
registry = AgentrRegistry()
|
|
16
|
-
logger.info(f"Init Registry: Time consumed: {time.time() - start_time}")
|
|
17
|
-
agent = agent_cls(
|
|
18
|
-
name="CodeAct Agent",
|
|
19
|
-
instructions="Be very concise in your answers.",
|
|
20
|
-
model="anthropic:claude-4-sonnet-20250514",
|
|
21
|
-
tools={},
|
|
22
|
-
registry=registry,
|
|
23
|
-
memory=memory,
|
|
24
|
-
)
|
|
25
|
-
logger.info(f"Create agent: Time consumed: {time.time() - start_time}")
|
|
26
|
-
print("Init agent...")
|
|
27
|
-
await agent.ainit()
|
|
28
|
-
logger.info(f"Init Agent: Time consumed: {time.time() - start_time}")
|
|
29
|
-
print("Starting agent...")
|
|
30
|
-
async for e in agent.stream(user_input="hi"):
|
|
31
|
-
logger.info(f"First token: Time consumed: {time.time() - start_time}")
|
|
32
|
-
print(e)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if __name__ == "__main__":
|
|
36
|
-
import asyncio
|
|
37
|
-
|
|
38
|
-
asyncio.run(main())
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/release-please.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/codeact.jsonl
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/exact.jsonl
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/tasks.jsonl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/__init__.py
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/hil.py
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/llm.py
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/react.py
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/sandbox.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/simple.py
RENAMED
|
File without changes
|
{universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|