swarms 7.8.4__py3-none-any.whl → 7.8.7__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.
Files changed (58) hide show
  1. swarms/agents/ape_agent.py +5 -22
  2. swarms/agents/consistency_agent.py +1 -1
  3. swarms/agents/i_agent.py +1 -1
  4. swarms/agents/reasoning_agents.py +99 -3
  5. swarms/agents/reasoning_duo.py +1 -1
  6. swarms/cli/main.py +1 -1
  7. swarms/communication/__init__.py +1 -0
  8. swarms/communication/duckdb_wrap.py +32 -2
  9. swarms/communication/pulsar_struct.py +45 -19
  10. swarms/communication/redis_wrap.py +56 -11
  11. swarms/communication/supabase_wrap.py +1659 -0
  12. swarms/prompts/prompt.py +0 -3
  13. swarms/schemas/agent_completion_response.py +71 -0
  14. swarms/schemas/agent_rag_schema.py +7 -0
  15. swarms/schemas/conversation_schema.py +9 -0
  16. swarms/schemas/llm_agent_schema.py +99 -81
  17. swarms/schemas/swarms_api_schemas.py +164 -0
  18. swarms/structs/__init__.py +14 -11
  19. swarms/structs/agent.py +219 -199
  20. swarms/structs/agent_rag_handler.py +685 -0
  21. swarms/structs/base_swarm.py +2 -1
  22. swarms/structs/conversation.py +608 -87
  23. swarms/structs/csv_to_agent.py +153 -100
  24. swarms/structs/deep_research_swarm.py +197 -193
  25. swarms/structs/dynamic_conversational_swarm.py +18 -7
  26. swarms/structs/hiearchical_swarm.py +1 -1
  27. swarms/structs/hybrid_hiearchical_peer_swarm.py +2 -18
  28. swarms/structs/image_batch_processor.py +261 -0
  29. swarms/structs/interactive_groupchat.py +356 -0
  30. swarms/structs/ma_blocks.py +75 -0
  31. swarms/structs/majority_voting.py +1 -1
  32. swarms/structs/mixture_of_agents.py +1 -1
  33. swarms/structs/multi_agent_router.py +3 -2
  34. swarms/structs/rearrange.py +3 -3
  35. swarms/structs/sequential_workflow.py +3 -3
  36. swarms/structs/swarm_matcher.py +500 -411
  37. swarms/structs/swarm_router.py +15 -97
  38. swarms/structs/swarming_architectures.py +1 -1
  39. swarms/tools/mcp_client_call.py +3 -0
  40. swarms/utils/__init__.py +10 -2
  41. swarms/utils/check_all_model_max_tokens.py +43 -0
  42. swarms/utils/generate_keys.py +0 -27
  43. swarms/utils/history_output_formatter.py +5 -20
  44. swarms/utils/litellm_wrapper.py +208 -60
  45. swarms/utils/output_types.py +24 -0
  46. swarms/utils/vllm_wrapper.py +5 -6
  47. swarms/utils/xml_utils.py +37 -2
  48. {swarms-7.8.4.dist-info → swarms-7.8.7.dist-info}/METADATA +31 -55
  49. {swarms-7.8.4.dist-info → swarms-7.8.7.dist-info}/RECORD +53 -48
  50. swarms/structs/multi_agent_collab.py +0 -242
  51. swarms/structs/output_types.py +0 -6
  52. swarms/utils/markdown_message.py +0 -21
  53. swarms/utils/visualizer.py +0 -510
  54. swarms/utils/wrapper_clusterop.py +0 -127
  55. /swarms/{tools → schemas}/tool_schema_base_model.py +0 -0
  56. {swarms-7.8.4.dist-info → swarms-7.8.7.dist-info}/LICENSE +0 -0
  57. {swarms-7.8.4.dist-info → swarms-7.8.7.dist-info}/WHEEL +0 -0
  58. {swarms-7.8.4.dist-info → swarms-7.8.7.dist-info}/entry_points.txt +0 -0
@@ -7,7 +7,7 @@ from swarms.structs.agent import Agent
7
7
  from swarms.prompts.ag_prompt import aggregator_system_prompt_main
8
8
  from swarms.utils.loguru_logger import initialize_logger
9
9
  import concurrent.futures
10
- from swarms.structs.output_types import OutputType
10
+ from swarms.utils.output_types import OutputType
11
11
  from swarms.structs.conversation import Conversation
12
12
  from swarms.utils.history_output_formatter import (
13
13
  history_output_formatter,
@@ -16,12 +16,13 @@ from pydantic import BaseModel, Field
16
16
  from swarms.utils.function_caller_model import OpenAIFunctionCaller
17
17
  from swarms.structs.agent import Agent
18
18
  from swarms.structs.conversation import Conversation
19
- from swarms.structs.output_types import OutputType
19
+ from swarms.utils.output_types import OutputType
20
20
  from swarms.utils.any_to_str import any_to_str
21
21
  from swarms.utils.history_output_formatter import (
22
22
  history_output_formatter,
23
23
  )
24
24
  from swarms.utils.formatter import formatter
25
+ from typing import Callable, Union
25
26
 
26
27
 
27
28
  class AgentResponse(BaseModel):
@@ -59,7 +60,7 @@ class MultiAgentRouter:
59
60
  self,
60
61
  name: str = "swarm-router",
61
62
  description: str = "Routes tasks to specialized agents based on their capabilities",
62
- agents: List[Agent] = [],
63
+ agents: List[Union[Agent, Callable]] = [],
63
64
  model: str = "gpt-4o-mini",
64
65
  temperature: float = 0.1,
65
66
  shared_memory_system: callable = None,
@@ -2,7 +2,7 @@ import asyncio
2
2
  import json
3
3
  import uuid
4
4
  from concurrent.futures import ThreadPoolExecutor
5
- from typing import Any, Callable, Dict, List, Optional
5
+ from typing import Any, Callable, Dict, List, Optional, Union
6
6
 
7
7
 
8
8
  from swarms.structs.agent import Agent
@@ -15,7 +15,7 @@ from swarms.utils.history_output_formatter import (
15
15
  from swarms.utils.loguru_logger import initialize_logger
16
16
  from swarms.telemetry.main import log_agent_data
17
17
  from swarms.structs.conversation import Conversation
18
- from swarms.structs.output_types import OutputType
18
+ from swarms.utils.output_types import OutputType
19
19
  from swarms.structs.multi_agent_exec import get_agents_info
20
20
 
21
21
  logger = initialize_logger(log_folder="rearrange")
@@ -68,7 +68,7 @@ class AgentRearrange(BaseSwarm):
68
68
  id: str = swarm_id(),
69
69
  name: str = "AgentRearrange",
70
70
  description: str = "A swarm of agents for rearranging tasks.",
71
- agents: List[Agent] = None,
71
+ agents: List[Union[Agent, Callable]] = None,
72
72
  flow: str = None,
73
73
  max_loops: int = 1,
74
74
  verbose: bool = True,
@@ -1,8 +1,8 @@
1
1
  from concurrent.futures import ThreadPoolExecutor, as_completed
2
- from typing import List, Optional
2
+ from typing import Callable, List, Optional, Union
3
3
 
4
4
  from swarms.structs.agent import Agent
5
- from swarms.structs.output_types import OutputType
5
+ from swarms.utils.output_types import OutputType
6
6
  from swarms.structs.rearrange import AgentRearrange
7
7
  from swarms.utils.loguru_logger import initialize_logger
8
8
 
@@ -31,7 +31,7 @@ class SequentialWorkflow:
31
31
  self,
32
32
  name: str = "SequentialWorkflow",
33
33
  description: str = "Sequential Workflow, where agents are executed in a sequence.",
34
- agents: List[Agent] = [],
34
+ agents: List[Union[Agent, Callable]] = [],
35
35
  max_loops: int = 1,
36
36
  output_type: OutputType = "dict",
37
37
  shared_memory_system: callable = None,