mail-swarms 1.3.2__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 (137) hide show
  1. mail/__init__.py +35 -0
  2. mail/api.py +1964 -0
  3. mail/cli.py +432 -0
  4. mail/client.py +1657 -0
  5. mail/config/__init__.py +8 -0
  6. mail/config/client.py +87 -0
  7. mail/config/server.py +165 -0
  8. mail/core/__init__.py +72 -0
  9. mail/core/actions.py +69 -0
  10. mail/core/agents.py +73 -0
  11. mail/core/message.py +366 -0
  12. mail/core/runtime.py +3537 -0
  13. mail/core/tasks.py +311 -0
  14. mail/core/tools.py +1206 -0
  15. mail/db/__init__.py +0 -0
  16. mail/db/init.py +182 -0
  17. mail/db/types.py +65 -0
  18. mail/db/utils.py +523 -0
  19. mail/examples/__init__.py +27 -0
  20. mail/examples/analyst_dummy/__init__.py +15 -0
  21. mail/examples/analyst_dummy/agent.py +136 -0
  22. mail/examples/analyst_dummy/prompts.py +44 -0
  23. mail/examples/consultant_dummy/__init__.py +15 -0
  24. mail/examples/consultant_dummy/agent.py +136 -0
  25. mail/examples/consultant_dummy/prompts.py +42 -0
  26. mail/examples/data_analysis/__init__.py +40 -0
  27. mail/examples/data_analysis/analyst/__init__.py +9 -0
  28. mail/examples/data_analysis/analyst/agent.py +67 -0
  29. mail/examples/data_analysis/analyst/prompts.py +53 -0
  30. mail/examples/data_analysis/processor/__init__.py +13 -0
  31. mail/examples/data_analysis/processor/actions.py +293 -0
  32. mail/examples/data_analysis/processor/agent.py +67 -0
  33. mail/examples/data_analysis/processor/prompts.py +48 -0
  34. mail/examples/data_analysis/reporter/__init__.py +10 -0
  35. mail/examples/data_analysis/reporter/actions.py +187 -0
  36. mail/examples/data_analysis/reporter/agent.py +67 -0
  37. mail/examples/data_analysis/reporter/prompts.py +49 -0
  38. mail/examples/data_analysis/statistics/__init__.py +18 -0
  39. mail/examples/data_analysis/statistics/actions.py +343 -0
  40. mail/examples/data_analysis/statistics/agent.py +67 -0
  41. mail/examples/data_analysis/statistics/prompts.py +60 -0
  42. mail/examples/mafia/__init__.py +0 -0
  43. mail/examples/mafia/game.py +1537 -0
  44. mail/examples/mafia/narrator_tools.py +396 -0
  45. mail/examples/mafia/personas.py +240 -0
  46. mail/examples/mafia/prompts.py +489 -0
  47. mail/examples/mafia/roles.py +147 -0
  48. mail/examples/mafia/spec.md +350 -0
  49. mail/examples/math_dummy/__init__.py +23 -0
  50. mail/examples/math_dummy/actions.py +252 -0
  51. mail/examples/math_dummy/agent.py +136 -0
  52. mail/examples/math_dummy/prompts.py +46 -0
  53. mail/examples/math_dummy/types.py +5 -0
  54. mail/examples/research/__init__.py +39 -0
  55. mail/examples/research/researcher/__init__.py +9 -0
  56. mail/examples/research/researcher/agent.py +67 -0
  57. mail/examples/research/researcher/prompts.py +54 -0
  58. mail/examples/research/searcher/__init__.py +10 -0
  59. mail/examples/research/searcher/actions.py +324 -0
  60. mail/examples/research/searcher/agent.py +67 -0
  61. mail/examples/research/searcher/prompts.py +53 -0
  62. mail/examples/research/summarizer/__init__.py +18 -0
  63. mail/examples/research/summarizer/actions.py +255 -0
  64. mail/examples/research/summarizer/agent.py +67 -0
  65. mail/examples/research/summarizer/prompts.py +55 -0
  66. mail/examples/research/verifier/__init__.py +10 -0
  67. mail/examples/research/verifier/actions.py +337 -0
  68. mail/examples/research/verifier/agent.py +67 -0
  69. mail/examples/research/verifier/prompts.py +52 -0
  70. mail/examples/supervisor/__init__.py +11 -0
  71. mail/examples/supervisor/agent.py +4 -0
  72. mail/examples/supervisor/prompts.py +93 -0
  73. mail/examples/support/__init__.py +33 -0
  74. mail/examples/support/classifier/__init__.py +10 -0
  75. mail/examples/support/classifier/actions.py +307 -0
  76. mail/examples/support/classifier/agent.py +68 -0
  77. mail/examples/support/classifier/prompts.py +56 -0
  78. mail/examples/support/coordinator/__init__.py +9 -0
  79. mail/examples/support/coordinator/agent.py +67 -0
  80. mail/examples/support/coordinator/prompts.py +48 -0
  81. mail/examples/support/faq/__init__.py +10 -0
  82. mail/examples/support/faq/actions.py +182 -0
  83. mail/examples/support/faq/agent.py +67 -0
  84. mail/examples/support/faq/prompts.py +42 -0
  85. mail/examples/support/sentiment/__init__.py +15 -0
  86. mail/examples/support/sentiment/actions.py +341 -0
  87. mail/examples/support/sentiment/agent.py +67 -0
  88. mail/examples/support/sentiment/prompts.py +54 -0
  89. mail/examples/weather_dummy/__init__.py +23 -0
  90. mail/examples/weather_dummy/actions.py +75 -0
  91. mail/examples/weather_dummy/agent.py +136 -0
  92. mail/examples/weather_dummy/prompts.py +35 -0
  93. mail/examples/weather_dummy/types.py +5 -0
  94. mail/factories/__init__.py +27 -0
  95. mail/factories/action.py +223 -0
  96. mail/factories/base.py +1531 -0
  97. mail/factories/supervisor.py +241 -0
  98. mail/net/__init__.py +7 -0
  99. mail/net/registry.py +712 -0
  100. mail/net/router.py +728 -0
  101. mail/net/server_utils.py +114 -0
  102. mail/net/types.py +247 -0
  103. mail/server.py +1605 -0
  104. mail/stdlib/__init__.py +0 -0
  105. mail/stdlib/anthropic/__init__.py +0 -0
  106. mail/stdlib/fs/__init__.py +15 -0
  107. mail/stdlib/fs/actions.py +209 -0
  108. mail/stdlib/http/__init__.py +19 -0
  109. mail/stdlib/http/actions.py +333 -0
  110. mail/stdlib/interswarm/__init__.py +11 -0
  111. mail/stdlib/interswarm/actions.py +208 -0
  112. mail/stdlib/mcp/__init__.py +19 -0
  113. mail/stdlib/mcp/actions.py +294 -0
  114. mail/stdlib/openai/__init__.py +13 -0
  115. mail/stdlib/openai/agents.py +451 -0
  116. mail/summarizer.py +234 -0
  117. mail/swarms_json/__init__.py +27 -0
  118. mail/swarms_json/types.py +87 -0
  119. mail/swarms_json/utils.py +255 -0
  120. mail/url_scheme.py +51 -0
  121. mail/utils/__init__.py +53 -0
  122. mail/utils/auth.py +194 -0
  123. mail/utils/context.py +17 -0
  124. mail/utils/logger.py +73 -0
  125. mail/utils/openai.py +212 -0
  126. mail/utils/parsing.py +89 -0
  127. mail/utils/serialize.py +292 -0
  128. mail/utils/store.py +49 -0
  129. mail/utils/string_builder.py +119 -0
  130. mail/utils/version.py +20 -0
  131. mail_swarms-1.3.2.dist-info/METADATA +237 -0
  132. mail_swarms-1.3.2.dist-info/RECORD +137 -0
  133. mail_swarms-1.3.2.dist-info/WHEEL +4 -0
  134. mail_swarms-1.3.2.dist-info/entry_points.txt +2 -0
  135. mail_swarms-1.3.2.dist-info/licenses/LICENSE +202 -0
  136. mail_swarms-1.3.2.dist-info/licenses/NOTICE +10 -0
  137. mail_swarms-1.3.2.dist-info/licenses/THIRD_PARTY_NOTICES.md +12334 -0
@@ -0,0 +1,44 @@
1
+ SYSPROMPT = """You are analyst@{swarm}, a specialist agent for research and data analysis.
2
+
3
+ # Your Role
4
+ Analyze information, research topics, interpret data, and provide detailed analytical reports. Focus on facts, trends, and evidence-based conclusions.
5
+
6
+ # Critical Rule: Responding
7
+ You CANNOT talk to users directly or call `task_complete`. You MUST use `send_response` to reply to the agent who contacted you.
8
+ - When you receive a request, note the sender address
9
+ - After completing your analysis, call `send_response(target=<sender>, subject="Re: ...", body=<your analysis>)`
10
+ - Your response body must contain ALL findings - the requestor cannot see your work otherwise
11
+
12
+ # Tools
13
+
14
+ ## Communication
15
+ - `send_response(target, subject, body)`: Reply to the agent who requested analysis - THIS IS REQUIRED
16
+ - `send_request(target, subject, body)`: Ask another agent for additional data (if needed)
17
+ - `acknowledge_broadcast(note)`: Acknowledge a broadcast message
18
+ - `ignore_broadcast(reason)`: Ignore an irrelevant broadcast
19
+
20
+ # Workflow
21
+
22
+ 1. Receive request from another agent (note the sender address in the message)
23
+ 2. Analyze the question, data, or topic presented
24
+ 3. Synthesize findings into a clear response
25
+ 4. Call `send_response` to the original sender with your complete analysis
26
+
27
+ # Response Format
28
+
29
+ Structure your analysis clearly:
30
+ - Summary of findings (1-2 sentences)
31
+ - Key data points or observations
32
+ - Analysis and interpretation
33
+ - Conclusions or implications
34
+ - Limitations or areas of uncertainty
35
+
36
+ # Guidelines
37
+
38
+ - Ground analysis in available information
39
+ - Distinguish facts from inferences
40
+ - Quantify when possible (percentages, ranges, comparisons)
41
+ - Acknowledge limitations in data or analysis
42
+ - Match the requested format/length if specified
43
+ - Use "Re: <original subject>" as your response subject
44
+ - If you need more information to complete the analysis, specify what's needed"""
@@ -0,0 +1,15 @@
1
+ from .agent import (
2
+ LiteLLMConsultantFunction,
3
+ consultant_agent_params,
4
+ factory_consultant_dummy,
5
+ )
6
+ from .prompts import (
7
+ SYSPROMPT as CONSULTANT_SYSPROMPT,
8
+ )
9
+
10
+ __all__ = [
11
+ "factory_consultant_dummy",
12
+ "LiteLLMConsultantFunction",
13
+ "consultant_agent_params",
14
+ "CONSULTANT_SYSPROMPT",
15
+ ]
@@ -0,0 +1,136 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Addison Kline
3
+
4
+ import warnings
5
+ from collections.abc import Awaitable
6
+ from typing import Any, Literal
7
+
8
+ from mail.core.agents import AgentOutput
9
+ from mail.factories import AgentFunction
10
+ from mail.factories.base import LiteLLMAgentFunction
11
+
12
+ consultant_agent_params = {
13
+ "llm": "openai/gpt-5-mini",
14
+ "system": "mail.examples.consultant_dummy.prompts:SYSPROMPT",
15
+ }
16
+
17
+
18
+ def factory_consultant_dummy(
19
+ # REQUIRED
20
+ # top-level params
21
+ comm_targets: list[str],
22
+ tools: list[dict[str, Any]],
23
+ # instance params
24
+ user_token: str,
25
+ # internal params
26
+ llm: str,
27
+ system: str,
28
+ # OPTIONAL
29
+ # top-level params
30
+ name: str = "consultant",
31
+ enable_entrypoint: bool = False,
32
+ enable_interswarm: bool = False,
33
+ can_complete_tasks: bool = False,
34
+ tool_format: Literal["completions", "responses"] = "responses",
35
+ exclude_tools: list[str] = [],
36
+ # instance params
37
+ # ...
38
+ # internal params
39
+ reasoning_effort: Literal["low", "medium", "high"] | None = None,
40
+ thinking_budget: int | None = None,
41
+ max_tokens: int | None = None,
42
+ memory: bool = True,
43
+ use_proxy: bool = True,
44
+ ) -> AgentFunction:
45
+ warnings.warn(
46
+ "`mail.examples.consultant_dummy:factory_consultant_dummy` is deprecated and will be removed in a future version. "
47
+ "Use `mail.examples.consultant_dummy:LiteLLMConsultantFunction` instead.",
48
+ DeprecationWarning,
49
+ stacklevel=2,
50
+ )
51
+
52
+ litellm_consultant = LiteLLMConsultantFunction(
53
+ name=name,
54
+ comm_targets=comm_targets,
55
+ tools=tools,
56
+ llm=llm,
57
+ system=system,
58
+ user_token=user_token,
59
+ enable_entrypoint=enable_entrypoint,
60
+ enable_interswarm=enable_interswarm,
61
+ can_complete_tasks=can_complete_tasks,
62
+ reasoning_effort=reasoning_effort,
63
+ thinking_budget=thinking_budget,
64
+ max_tokens=max_tokens,
65
+ memory=memory,
66
+ use_proxy=use_proxy,
67
+ tool_format=tool_format,
68
+ exclude_tools=exclude_tools,
69
+ )
70
+
71
+ async def run(
72
+ messages: list[dict[str, Any]],
73
+ tool_choice: str | dict[str, str] = "required",
74
+ ) -> AgentOutput:
75
+ """
76
+ Execute the LiteLLM-based consultant agent function.
77
+ """
78
+ return await litellm_consultant(messages, tool_choice)
79
+
80
+ return run
81
+
82
+
83
+ class LiteLLMConsultantFunction(LiteLLMAgentFunction):
84
+ """
85
+ Class that represents a LiteLLM-based consultant agent function.
86
+ """
87
+
88
+ def __init__(
89
+ self,
90
+ name: str,
91
+ comm_targets: list[str],
92
+ tools: list[dict[str, Any]],
93
+ llm: str,
94
+ system: str,
95
+ user_token: str = "",
96
+ enable_entrypoint: bool = False,
97
+ enable_interswarm: bool = False,
98
+ can_complete_tasks: bool = False,
99
+ tool_format: Literal["completions", "responses"] = "responses",
100
+ exclude_tools: list[str] = [],
101
+ reasoning_effort: Literal["minimal", "low", "medium", "high"] | None = None,
102
+ thinking_budget: int | None = None,
103
+ max_tokens: int | None = None,
104
+ memory: bool = True,
105
+ use_proxy: bool = True,
106
+ _debug_include_mail_tools: bool = True,
107
+ ) -> None:
108
+ super().__init__(
109
+ name=name,
110
+ comm_targets=comm_targets,
111
+ tools=tools,
112
+ llm=llm,
113
+ system=system,
114
+ user_token=user_token,
115
+ enable_entrypoint=enable_entrypoint,
116
+ enable_interswarm=enable_interswarm,
117
+ can_complete_tasks=can_complete_tasks,
118
+ tool_format=tool_format,
119
+ exclude_tools=exclude_tools,
120
+ reasoning_effort=reasoning_effort,
121
+ thinking_budget=thinking_budget,
122
+ max_tokens=max_tokens,
123
+ memory=memory,
124
+ use_proxy=use_proxy,
125
+ _debug_include_mail_tools=_debug_include_mail_tools,
126
+ )
127
+
128
+ def __call__(
129
+ self,
130
+ messages: list[dict[str, Any]],
131
+ tool_choice: str | dict[str, str] = "required",
132
+ ) -> Awaitable[AgentOutput]:
133
+ """
134
+ Execute the LiteLLM-based consultant agent function.
135
+ """
136
+ return super().__call__(messages, tool_choice)
@@ -0,0 +1,42 @@
1
+ SYSPROMPT = """You are consultant@{swarm}, a specialist agent providing strategic advice and analysis.
2
+
3
+ # Your Role
4
+ Provide expert consulting on business, strategy, economics, and general advisory questions. Analyze scenarios, provide recommendations, and offer insights based on requests.
5
+
6
+ # Critical Rule: Responding
7
+ You CANNOT talk to users directly or call `task_complete`. You MUST use `send_response` to reply to the agent who contacted you.
8
+ - When you receive a request, note the sender address
9
+ - After formulating your advice, call `send_response(target=<sender>, subject="Re: ...", body=<your response>)`
10
+ - Your response body must contain ALL the information the requestor needs
11
+
12
+ # Tools
13
+
14
+ ## Communication
15
+ - `send_response(target, subject, body)`: Reply to the agent who requested advice - THIS IS REQUIRED
16
+ - `send_request(target, subject, body)`: Ask another agent for additional information (if needed)
17
+ - `acknowledge_broadcast(note)`: Acknowledge a broadcast message
18
+ - `ignore_broadcast(reason)`: Ignore an irrelevant broadcast
19
+
20
+ # Workflow
21
+
22
+ 1. Receive request from another agent (note the sender address in the message)
23
+ 2. Analyze the question or scenario presented
24
+ 3. Formulate a clear, actionable response
25
+ 4. Call `send_response` to the original sender with your complete advice
26
+
27
+ # Response Format
28
+
29
+ Structure your advice clearly:
30
+ - Executive summary (1-2 sentences)
31
+ - Key points or recommendations (bulleted if multiple)
32
+ - Supporting rationale
33
+ - Caveats or uncertainties (if any)
34
+
35
+ # Guidelines
36
+
37
+ - Be direct and actionable in your advice
38
+ - Support recommendations with reasoning
39
+ - Acknowledge uncertainty when appropriate
40
+ - Match the requested format/length if specified
41
+ - Use "Re: <original subject>" as your response subject
42
+ - If you lack information to answer properly, state what you need"""
@@ -0,0 +1,40 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Charon Labs
3
+
4
+ """Data Analysis example swarm.
5
+
6
+ This swarm demonstrates data processing pipelines with statistical analysis
7
+ and report generation. It uses a mix of real calculations and dummy data generation.
8
+
9
+ Agents:
10
+ - analyst: Entry point that coordinates analysis workflows
11
+ - processor: Handles data ingestion, cleaning, and transformation
12
+ - statistics: Performs statistical calculations (real implementations)
13
+ - reporter: Generates formatted reports and summaries
14
+ """
15
+
16
+ from mail.examples.data_analysis.analyst.agent import LiteLLMAnalystFunction
17
+ from mail.examples.data_analysis.processor.agent import LiteLLMProcessorFunction
18
+ from mail.examples.data_analysis.processor.actions import (
19
+ generate_sample_data,
20
+ parse_csv,
21
+ )
22
+ from mail.examples.data_analysis.statistics.agent import LiteLLMStatisticsFunction
23
+ from mail.examples.data_analysis.statistics.actions import (
24
+ calculate_statistics,
25
+ run_correlation,
26
+ )
27
+ from mail.examples.data_analysis.reporter.agent import LiteLLMReporterFunction
28
+ from mail.examples.data_analysis.reporter.actions import format_report
29
+
30
+ __all__ = [
31
+ "LiteLLMAnalystFunction",
32
+ "LiteLLMProcessorFunction",
33
+ "LiteLLMStatisticsFunction",
34
+ "LiteLLMReporterFunction",
35
+ "generate_sample_data",
36
+ "parse_csv",
37
+ "calculate_statistics",
38
+ "run_correlation",
39
+ "format_report",
40
+ ]
@@ -0,0 +1,9 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Charon Labs
3
+
4
+ """Analyst agent for the Data Analysis swarm."""
5
+
6
+ from mail.examples.data_analysis.analyst.agent import LiteLLMAnalystFunction
7
+ from mail.examples.data_analysis.analyst.prompts import SYSPROMPT
8
+
9
+ __all__ = ["LiteLLMAnalystFunction", "SYSPROMPT"]
@@ -0,0 +1,67 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Charon Labs
3
+
4
+ """Analyst agent for the Data Analysis swarm."""
5
+
6
+ from collections.abc import Awaitable
7
+ from typing import Any, Literal
8
+
9
+ from mail.core.agents import AgentOutput
10
+ from mail.factories.base import LiteLLMAgentFunction
11
+
12
+
13
+ class LiteLLMAnalystFunction(LiteLLMAgentFunction):
14
+ """
15
+ Lead analyst agent that orchestrates the data analysis workflow.
16
+
17
+ This agent serves as the entry point for data analysis requests and
18
+ coordinates processor, statistics, and reporter agents.
19
+ """
20
+
21
+ def __init__(
22
+ self,
23
+ name: str,
24
+ comm_targets: list[str],
25
+ tools: list[dict[str, Any]],
26
+ llm: str,
27
+ system: str,
28
+ user_token: str = "",
29
+ enable_entrypoint: bool = True,
30
+ enable_interswarm: bool = False,
31
+ can_complete_tasks: bool = True,
32
+ tool_format: Literal["completions", "responses"] = "responses",
33
+ exclude_tools: list[str] = [],
34
+ reasoning_effort: Literal["minimal", "low", "medium", "high"] | None = None,
35
+ thinking_budget: int | None = None,
36
+ max_tokens: int | None = None,
37
+ memory: bool = True,
38
+ use_proxy: bool = True,
39
+ _debug_include_mail_tools: bool = True,
40
+ ) -> None:
41
+ super().__init__(
42
+ name=name,
43
+ comm_targets=comm_targets,
44
+ tools=tools,
45
+ llm=llm,
46
+ system=system,
47
+ user_token=user_token,
48
+ enable_entrypoint=enable_entrypoint,
49
+ enable_interswarm=enable_interswarm,
50
+ can_complete_tasks=can_complete_tasks,
51
+ tool_format=tool_format,
52
+ exclude_tools=exclude_tools,
53
+ reasoning_effort=reasoning_effort,
54
+ thinking_budget=thinking_budget,
55
+ max_tokens=max_tokens,
56
+ memory=memory,
57
+ use_proxy=use_proxy,
58
+ _debug_include_mail_tools=_debug_include_mail_tools,
59
+ )
60
+
61
+ def __call__(
62
+ self,
63
+ messages: list[dict[str, Any]],
64
+ tool_choice: str | dict[str, str] = "required",
65
+ ) -> Awaitable[AgentOutput]:
66
+ """Execute the analyst agent function."""
67
+ return super().__call__(messages, tool_choice)
@@ -0,0 +1,53 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Charon Labs
3
+
4
+ SYSPROMPT = """You are analyst@{swarm}, the lead data analyst for this data analysis swarm.
5
+
6
+ # Your Role
7
+ Orchestrate data analysis workflows by coordinating specialist agents to process data, perform statistics, and generate reports.
8
+
9
+ # Critical Rules
10
+
11
+ 1. **You MUST call task_complete to end every task** - this is how the user receives their results
12
+ 2. Delegate work to specialist agents based on the analysis needs:
13
+ - `processor` - For data generation, parsing, and cleaning
14
+ - `statistics` - For statistical calculations and correlations
15
+ - `reporter` - For formatting and presenting results
16
+
17
+ # Available Agents
18
+
19
+ - **processor**: Generates sample datasets, parses CSV data, and performs data cleaning/transformation.
20
+ - **statistics**: Calculates descriptive statistics (mean, median, std, etc.) and correlation analysis.
21
+ - **reporter**: Formats analysis results into structured reports with tables and summaries.
22
+
23
+ # Communication Tools
24
+
25
+ - `send_request(target, subject, body)`: Delegate a task to another agent
26
+ - `send_broadcast(subject, body, targets)`: Notify multiple agents simultaneously
27
+ - `await_message(reason)`: Wait for responses from delegated tasks
28
+ - `task_complete(finish_message)`: Return your final answer to the user
29
+
30
+ # Workflow
31
+
32
+ 1. Receive analysis request from user
33
+ 2. Determine what data and analysis is needed
34
+ 3. If user doesn't provide data, ask processor to generate sample data
35
+ 4. Send data to statistics agent for analysis
36
+ 5. Send results to reporter for formatting
37
+ 6. Collect and synthesize all responses
38
+ 7. Call `task_complete` with the final report
39
+
40
+ # Available Datasets (via processor)
41
+
42
+ - **sales**: Sales data with date, product, quantity, revenue, region
43
+ - **users**: User data with user_id, signup_date, age, subscription_type, activity_score
44
+ - **inventory**: Inventory data with product_id, category, stock_level, reorder_point, unit_cost
45
+ - **weather**: Weather data with date, temperature, humidity, precipitation, wind_speed
46
+
47
+ # Guidelines
48
+
49
+ - Start with data preparation before analysis
50
+ - Request appropriate statistics based on the data type
51
+ - Always include a formatted report in your final response
52
+ - Explain findings in business terms, not just raw numbers
53
+ - If the user's request is unclear, ask for clarification"""
@@ -0,0 +1,13 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright (c) 2025 Charon Labs
3
+
4
+ """Processor agent for the Data Analysis swarm."""
5
+
6
+ from mail.examples.data_analysis.processor.agent import LiteLLMProcessorFunction
7
+ from mail.examples.data_analysis.processor.actions import (
8
+ generate_sample_data,
9
+ parse_csv,
10
+ )
11
+ from mail.examples.data_analysis.processor.prompts import SYSPROMPT
12
+
13
+ __all__ = ["LiteLLMProcessorFunction", "generate_sample_data", "parse_csv", "SYSPROMPT"]