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.

Files changed (65) hide show
  1. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/PKG-INFO +1 -1
  2. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/pyproject.toml +1 -1
  3. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/agent.py +61 -31
  4. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/tools.py +0 -6
  5. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/uv.lock +1 -1
  6. universal_mcp_agents-0.1.22/bech.py +0 -38
  7. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/evals.yml +0 -0
  8. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/lint.yml +0 -0
  9. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/release-please.yml +0 -0
  10. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.github/workflows/tests.yml +0 -0
  11. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.gitignore +0 -0
  12. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/.pre-commit-config.yaml +0 -0
  13. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/GEMINI.md +0 -0
  14. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/PROMPTS.md +0 -0
  15. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/README.md +0 -0
  16. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/bump_and_release.sh +0 -0
  17. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/__init__.py +0 -0
  18. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/dataset.py +0 -0
  19. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/codeact.jsonl +0 -0
  20. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/exact.jsonl +0 -0
  21. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/datasets/tasks.jsonl +0 -0
  22. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/evaluators.py +0 -0
  23. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/prompts.py +0 -0
  24. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/run.py +0 -0
  25. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/evals/utils.py +0 -0
  26. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/tests/test_agents.py +0 -0
  27. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/__init__.py +0 -0
  28. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/base.py +0 -0
  29. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/__init__.py +0 -0
  30. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/__main__.py +0 -0
  31. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/agent.py +0 -0
  32. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/context.py +0 -0
  33. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/graph.py +0 -0
  34. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/prompts.py +0 -0
  35. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/state.py +0 -0
  36. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/bigtool/tools.py +0 -0
  37. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/__main__.py +0 -0
  38. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/builder.py +0 -0
  39. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/helper.py +0 -0
  40. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/prompts.py +0 -0
  41. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/builder/state.py +0 -0
  42. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/cli.py +0 -0
  43. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/__init__.py +0 -0
  44. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/__main__.py +0 -0
  45. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/config.py +0 -0
  46. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/langgraph_agent.py +0 -0
  47. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/llm_tool.py +0 -0
  48. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/prompts.py +0 -0
  49. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/sandbox.py +0 -0
  50. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/state.py +0 -0
  51. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/codeact0/utils.py +0 -0
  52. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/hil.py +0 -0
  53. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/llm.py +0 -0
  54. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/react.py +0 -0
  55. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/sandbox.py +0 -0
  56. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/__main__.py +0 -0
  57. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/prompts.py +0 -0
  58. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/shared/tool_node.py +0 -0
  59. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/simple.py +0 -0
  60. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/agents/utils.py +0 -0
  61. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/filesystem/__init__.py +0 -0
  62. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/filesystem/app.py +0 -0
  63. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/llm/__init__.py +0 -0
  64. {universal_mcp_agents-0.1.22 → universal_mcp_agents-0.1.23rc1}/src/universal_mcp/applications/llm/app.py +0 -0
  65. {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.22
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
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "universal-mcp-agents"
9
- version = "0.1.22"
9
+ version = "0.1.23-rc1"
10
10
  description = "Add your description here"
11
11
  readme = "README.md"
12
12
  authors = [
@@ -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
- # Generate playbook metadata (name and description) before moving to generation
230
- meta_id = str(uuid.uuid4())
231
- writer({
232
- "type": "custom",
233
- id: meta_id,
234
- "name": "metadata",
235
- "data": {"update": bool(self.playbook)}
236
- })
237
- meta_instructions = self.instructions + PLAYBOOK_META_PROMPT
238
- messages = [{"role": "system", "content": meta_instructions}] + state["messages"]
239
-
240
- model_with_structured_output = self.playbook_model_instance.with_structured_output(PlaybookMeta)
241
- meta_response = model_with_structured_output.invoke(messages)
242
- meta = cast(PlaybookMeta, meta_response)
243
-
244
- writer({"type": "custom", id: meta_id, "name": "metadata", "data": {"name": meta.name, "description": meta.description}})
245
- return Command(goto="playbook", update={"playbook_mode": "generating", "playbook_name": meta.name, "playbook_description": meta.description})
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: generate_id,
323
+ id: self.meta_id,
308
324
  "name": "generating",
309
- "data": {"id": str(res.id), "update": bool(self.playbook)}
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(content=json.dumps(response.dict()), additional_kwargs={"type": "generating", "id": str(res.id), "update": bool(self.playbook)})
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
 
@@ -4976,7 +4976,7 @@ wheels = [
4976
4976
 
4977
4977
  [[package]]
4978
4978
  name = "universal-mcp-agents"
4979
- version = "0.1.21"
4979
+ version = "0.1.22"
4980
4980
  source = { editable = "." }
4981
4981
  dependencies = [
4982
4982
  { name = "langchain-anthropic" },
@@ -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())