open-swarm 0.1.1744936333__py3-none-any.whl → 0.1.1744936380__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: open-swarm
3
- Version: 0.1.1744936333
3
+ Version: 0.1.1744936380
4
4
  Summary: Open Swarm: Orchestrating AI Agent Swarms with Django
5
5
  Project-URL: Homepage, https://github.com/yourusername/open-swarm
6
6
  Project-URL: Documentation, https://github.com/yourusername/open-swarm/blob/main/README.md
@@ -111,6 +111,106 @@ Open Swarm can be used in two primary ways:
111
111
 
112
112
  ---
113
113
 
114
+ ## Environment Variables
115
+
116
+ Open Swarm and its blueprints use a variety of environment variables for configuration, security, and integration with external services. Set these in your shell, `.env` file, Docker environment, or deployment platform as appropriate.
117
+
118
+ ### Core Framework Environment Variables
119
+
120
+ | Variable | Description | Default / Required |
121
+ |--------------------------|------------------------------------------------------------------|----------------------------|
122
+ | `OPENAI_API_KEY` | API key for OpenAI LLMs (used by agents and blueprints) | Required for OpenAI usage |
123
+ | `SWARM_API_KEY` | API key for securing API endpoints (swarm-api) | Optional (recommended) |
124
+ | `LITELLM_BASE_URL` | Override base URL for LiteLLM/OpenAI-compatible endpoints | Optional |
125
+ | `LITELLM_API_KEY` | API key for LiteLLM endpoints | Optional |
126
+ | `SWARM_CONFIG_PATH` | Path to the main Swarm config file (`swarm_config.json`) | `../swarm_config.json` |
127
+ | `BLUEPRINT_DIRECTORY` | Directory containing blueprint files | `src/swarm/blueprints` |
128
+ | `DJANGO_SECRET_KEY` | Django secret key (for API mode) | Auto-generated/dev default |
129
+ | `DJANGO_DEBUG` | Enable Django debug mode | `True` |
130
+ | `DJANGO_ALLOWED_HOSTS` | Comma-separated allowed hosts for Django API | `localhost,127.0.0.1` |
131
+ | `API_AUTH_TOKEN` | Token for authenticating API requests | Optional |
132
+ | `DJANGO_LOG_LEVEL` | Log level for Django app | `INFO` |
133
+ | `SWARM_LOG_LEVEL` | Log level for Swarm app | `DEBUG` |
134
+ | `REDIS_HOST` | Host for Redis (if used) | `localhost` |
135
+ | `REDIS_PORT` | Port for Redis (if used) | `6379` |
136
+ | `DJANGO_CSRF_TRUSTED_ORIGINS` | Comma-separated trusted origins for CSRF protection | `http://localhost:8000,...`|
137
+ | `ENABLE_ADMIN` | Enable admin web interface | `false` |
138
+ | `ENABLE_API_AUTH` | Require API authentication | `true` |
139
+
140
+ #### Blueprint/Tool-Specific Variables
141
+ - Some blueprints and MCP tools may require additional env vars (e.g., Google API keys, Slack tokens, etc.).
142
+ - Refer to the blueprint's docstring or config for details.
143
+
144
+ #### Usage Example
145
+ ```bash
146
+ export OPENAI_API_KEY="sk-..."
147
+ export SWARM_API_KEY="..."
148
+ export LITELLM_BASE_URL="https://open-litellm.fly.dev/v1"
149
+ # ... set other variables as needed
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Toolbox Functionality
155
+
156
+ Open Swarm ships with a growing toolbox of agent and blueprint utilities. All features listed below have robust, passing tests unless marked as **WIP** (Work In Progress).
157
+
158
+ ### Task Scheduler Toolbox
159
+ - **Schedule jobs with `at`:**
160
+ - Schedule a shell script or command to run at a specific time (uses the system `at` command).
161
+ - **Test Status:** Passing
162
+ - **List scheduled `at` jobs:**
163
+ - List all jobs currently scheduled with `at`.
164
+ - **Test Status:** Passing
165
+ - **Remove `at` jobs:**
166
+ - Remove a scheduled job by its job ID.
167
+ - **Test Status:** Passing
168
+ - **Schedule jobs with `cron`:**
169
+ - Schedule recurring jobs using cron expressions (uses the system `crontab`).
170
+ - **Test Status:** Passing
171
+ - **List scheduled `cron` jobs:**
172
+ - List all jobs currently scheduled with `crontab`.
173
+ - **Test Status:** Passing
174
+ - **Remove `cron` jobs:**
175
+ - Remove a scheduled cron job by its job ID.
176
+ - **Test Status:** Passing
177
+
178
+ ### Slash Command Framework
179
+ - **Global slash command registry:**
180
+ - Blueprints can register and use slash commands (e.g., `/help`, `/agent`, `/model`).
181
+ - Built-in demo commands: `/help`, `/agent`, `/model`.
182
+ - **Test Status:** Passing
183
+ - **Blueprint Integration:**
184
+ - Blueprints can access the global registry and add their own commands.
185
+ - **Test Status:** Passing
186
+
187
+ #### Usage Example (Slash Commands)
188
+ ```python
189
+ from swarm.extensions.blueprint.slash_commands import slash_command_registry
190
+
191
+ @slash_command_registry.register('/hello')
192
+ def hello_command(args):
193
+ return f"Hello, {args}!"
194
+ ```
195
+
196
+ #### Usage Example (Task Scheduler)
197
+ ```python
198
+ from swarm.extensions.task_scheduler_toolbox import schedule_at_job, list_at_jobs, remove_at_job
199
+
200
+ job_id = schedule_at_job('/path/to/script.sh', run_time='now + 5 minutes')
201
+ jobs = list_at_jobs()
202
+ remove_at_job(job_id)
203
+ ```
204
+
205
+ ---
206
+
207
+ ## Developer Notes
208
+ - System dependencies are mocked in tests for CI and portability.
209
+ - Any toolbox feature not listed as **Passing** above is considered **WIP** and may not be stable.
210
+ - Contributions and feedback are welcome!
211
+
212
+ ---
213
+
114
214
  ## Quickstart 1: Using `swarm-cli` Locally (via PyPI)
115
215
 
116
216
  This is the recommended way to use `swarm-cli` for managing and running blueprints on your local machine.
@@ -252,8 +252,8 @@ swarm/views/message_views.py,sha256=sDUnXyqKXC8WwIIMAlWf00s2_a2T9c75Na5FvYMJwBM,
252
252
  swarm/views/model_views.py,sha256=aAbU4AZmrOTaPeKMWtoKK7FPYHdaN3Zbx55JfKzYTRY,2937
253
253
  swarm/views/utils.py,sha256=geX3Z5ZDKFYyXYBMilc-4qgOSjhujK3AfRtvbXgFpXk,3643
254
254
  swarm/views/web_views.py,sha256=ExQQeJpZ8CkLZQC_pXKOOmdnEy2qR3wEBP4LLp27DPU,7404
255
- open_swarm-0.1.1744936333.dist-info/METADATA,sha256=eXj_YZGiLtK_ixP5nKD6huvEqCqWuTvgB60MLdhfPXY,13678
256
- open_swarm-0.1.1744936333.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
257
- open_swarm-0.1.1744936333.dist-info/entry_points.txt,sha256=fo28d0_zJrytRsh8QqkdlWQT_9lyAwYUx1WuSTDI3HM,177
258
- open_swarm-0.1.1744936333.dist-info/licenses/LICENSE,sha256=BU9bwRlnOt_JDIb6OT55Q4leLZx9RArDLTFnlDIrBEI,1062
259
- open_swarm-0.1.1744936333.dist-info/RECORD,,
255
+ open_swarm-0.1.1744936380.dist-info/METADATA,sha256=6jAoAMBD-G-pIG9bHtrF_Eh8wcDIoX713LmnnMHF8z0,18813
256
+ open_swarm-0.1.1744936380.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
257
+ open_swarm-0.1.1744936380.dist-info/entry_points.txt,sha256=fo28d0_zJrytRsh8QqkdlWQT_9lyAwYUx1WuSTDI3HM,177
258
+ open_swarm-0.1.1744936380.dist-info/licenses/LICENSE,sha256=BU9bwRlnOt_JDIb6OT55Q4leLZx9RArDLTFnlDIrBEI,1062
259
+ open_swarm-0.1.1744936380.dist-info/RECORD,,