open-swarm 0.1.1743070217__tar.gz → 0.1.1743364176__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.
- open_swarm-0.1.1743364176/.gitignore +197 -0
- open_swarm-0.1.1743364176/PKG-INFO +286 -0
- open_swarm-0.1.1743364176/README.md +199 -0
- open_swarm-0.1.1743364176/pyproject.toml +160 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/__init__.py +0 -2
- open_swarm-0.1.1743364176/src/swarm/auth.py +60 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/README.md +67 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/burnt_noodles/blueprint_burnt_noodles.py +412 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/chatbot/blueprint_chatbot.py +98 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/chatbot/templates/chatbot/chatbot.html +33 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/digitalbutlers/blueprint_digitalbutlers.py +183 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/dilbot_universe/blueprint_dilbot_universe.py +285 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/divine_code/apps.py +11 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/divine_code/blueprint_divine_code.py +219 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/django_chat/apps.py +6 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/django_chat/blueprint_django_chat.py +84 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/django_chat/templates/django_chat/django_chat_webpage.html +37 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/django_chat/urls.py +8 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/django_chat/views.py +32 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/echocraft/blueprint_echocraft.py +44 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/apps.py +11 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/blueprint_family_ties.py +152 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/models.py +19 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/serializers.py +7 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/settings.py +16 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/urls.py +10 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/family_ties/views.py +26 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/gaggle/blueprint_gaggle.py +184 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/gotchaman/blueprint_gotchaman.py +232 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/mcp_demo/blueprint_mcp_demo.py +133 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/messenger/templates/messenger/messenger.html +46 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/mission_improbable/blueprint_mission_improbable.py +234 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/monkai_magic/blueprint_monkai_magic.py +248 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/nebula_shellz/blueprint_nebula_shellz.py +156 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/omniplex/blueprint_omniplex.py +221 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/rue_code/blueprint_rue_code.py +291 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/suggestion/blueprint_suggestion.py +110 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/unapologetic_press/blueprint_unapologetic_press.py +298 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/whiskeytango_foxtrot/apps.py +11 -0
- open_swarm-0.1.1743364176/src/swarm/blueprints/whiskeytango_foxtrot/blueprint_whiskeytango_foxtrot.py +256 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/__init__.py +51 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/agent_utils.py +21 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/blueprint_base.py +160 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/blueprint_discovery.py +126 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/cli_handler.py +185 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/config_loader.py +122 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/blueprint/django_utils.py +305 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/interactive_mode.py +1 -1
- open_swarm-0.1.1743364176/src/swarm/extensions/cli/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/cli/commands/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/config/config_loader.py +91 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/config/utils/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/extensions/launchers/swarm_cli.py +216 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/llm/chat_completion.py +26 -55
- open_swarm-0.1.1743364176/src/swarm/management/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/management/commands/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/management/commands/runserver.py +58 -0
- open_swarm-0.1.1743364176/src/swarm/migrations/__init__.py +0 -0
- open_swarm-0.1.1743364176/src/swarm/permissions.py +38 -0
- open_swarm-0.1.1743364176/src/swarm/serializers.py +103 -0
- open_swarm-0.1.1743364176/src/swarm/settings.py +174 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/fonts/fontawesome-webfont.ttf +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/fonts/fontawesome-webfont.woff +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/fonts/fontawesome-webfont.woff2 +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/markedjs/marked.min.js +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/adjustments-horizontal.svg +27 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/alert-triangle.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/archive.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/artboard.svg +27 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/automatic-gearbox.svg +23 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/box-multiple.svg +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/carambola.svg +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/copy.svg +20 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/download.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/edit.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/filled/carambola.svg +13 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/filled/paint.svg +13 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/headset.svg +22 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/layout-sidebar-left-collapse.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/layout-sidebar-left-expand.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/layout-sidebar-right-collapse.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/layout-sidebar-right-expand.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/message-chatbot.svg +22 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/message-star.svg +22 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/message-x.svg +23 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/message.svg +21 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/paperclip.svg +18 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/playlist-add.svg +22 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/robot.svg +26 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/search.svg +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/settings.svg +20 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/thumb-down.svg +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/contrib/tabler-icons/thumb-up.svg +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/css/dropdown.css +22 -0
- open_swarm-0.1.1743364176/src/swarm/static/htmx/htmx.min.js +0 -0
- open_swarm-0.1.1743364176/src/swarm/static/js/dropdown.js +23 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/base.css +470 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/chat-history.css +286 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/chat.css +251 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/chatbot.css +74 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/chatgpt.css +62 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/colors/corporate.css +74 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/colors/pastel.css +81 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/colors/tropical.css +82 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/general.css +142 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/layout.css +167 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/layouts/messenger-layout.css +17 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/layouts/minimalist-layout.css +57 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/layouts/mobile-layout.css +8 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/messages.css +84 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/messenger.css +135 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/settings.css +91 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/simple.css +44 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/slack.css +58 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/style.css +156 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/theme.css +30 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/css/toast.css +40 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/auth.js +9 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/blueprint.js +41 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/blueprintUtils.js +12 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/chatLogic.js +79 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/debug.js +63 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/events.js +98 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/main.js +19 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/messages.js +264 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/messengerLogic.js +355 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/apiService.js +84 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/blueprintManager.js +162 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/chatHistory.js +110 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/debugLogger.js +14 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/eventHandlers.js +107 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/messageProcessor.js +120 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/state.js +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/userInteractions.js +29 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/modules/validation.js +23 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/rendering.js +119 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/settings.js +130 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/sidebar.js +94 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/simpleLogic.js +37 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/slackLogic.js +66 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/splash.js +76 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/theme.js +111 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/toast.js +36 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/ui.js +265 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/js/validation.js +57 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/animated_spinner.svg +12 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/arrow_down.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/arrow_left.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/arrow_right.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/arrow_up.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/attach.svg +8 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/avatar.svg +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/canvas.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/chat_history.svg +4 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/close.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/copy.svg +4 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/dark_mode.svg +3 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/edit.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/layout.svg +9 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/logo.svg +29 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/logout.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/mobile.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/new_chat.svg +4 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/not_visible.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/plus.svg +7 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/run_code.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/save.svg +4 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/search.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/settings.svg +4 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/speaker.svg +5 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/stop.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/thumbs_down.svg +3 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/thumbs_up.svg +3 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/toggle_off.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/toggle_on.svg +6 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/trash.svg +10 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/undo.svg +3 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/visible.svg +8 -0
- open_swarm-0.1.1743364176/src/swarm/static/rest_mode/svg/voice.svg +10 -0
- open_swarm-0.1.1743364176/src/swarm/templates/account/login.html +22 -0
- open_swarm-0.1.1743364176/src/swarm/templates/account/signup.html +32 -0
- open_swarm-0.1.1743364176/src/swarm/templates/base.html +30 -0
- open_swarm-0.1.1743364176/src/swarm/templates/chat.html +43 -0
- open_swarm-0.1.1743364176/src/swarm/templates/index.html +35 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/chat_sidebar.html +55 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/header.html +45 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/main_chat_pane.html +41 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/settings_dialog.html +97 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/splash_screen.html +7 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/components/top_bar.html +28 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/message_ui.html +50 -0
- open_swarm-0.1.1743364176/src/swarm/templates/rest_mode/slackbot.html +30 -0
- open_swarm-0.1.1743364176/src/swarm/templates/simple_blueprint_page.html +24 -0
- open_swarm-0.1.1743364176/src/swarm/templates/websocket_partials/final_system_message.html +3 -0
- open_swarm-0.1.1743364176/src/swarm/templates/websocket_partials/system_message.html +4 -0
- open_swarm-0.1.1743364176/src/swarm/templates/websocket_partials/user_message.html +5 -0
- open_swarm-0.1.1743364176/src/swarm/urls.py +72 -0
- open_swarm-0.1.1743364176/src/swarm/utils/log_utils.py +63 -0
- open_swarm-0.1.1743364176/src/swarm/views/api_views.py +55 -0
- open_swarm-0.1.1743364176/src/swarm/views/chat_views.py +162 -0
- open_swarm-0.1.1743364176/src/swarm/views/core_views.py +113 -0
- open_swarm-0.1.1743364176/src/swarm/views/model_views.py +78 -0
- open_swarm-0.1.1743364176/src/swarm/views/utils.py +81 -0
- open_swarm-0.1.1743364176/tests/__init__.py +0 -0
- open_swarm-0.1.1743364176/tests/api/test_chat_completions_auth_async.py +178 -0
- open_swarm-0.1.1743364176/tests/api/test_chat_completions_failing_async.py +161 -0
- open_swarm-0.1.1743364176/tests/api/test_chat_completions_validation_async.py +179 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_burnt_noodles.py +177 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_chatbot.py +57 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_digitalbutlers.py +31 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_dilbot_universe.py +74 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_divine_code.py +67 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_echocraft.py +75 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_family_ties.py +48 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_gaggle.py +75 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_gotchaman.py +71 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_mcp_demo.py +87 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_mission_improbable.py +61 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_monkai_magic.py +67 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_nebula_shellz.py +25 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_omniplex.py +87 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_suggestion.py +62 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_unapologetic_press.py +61 -0
- open_swarm-0.1.1743364176/tests/blueprints/test_whiskeytangofoxtrot.py +101 -0
- open_swarm-0.1.1743364176/tests/cli/test_launchers.py +174 -0
- open_swarm-0.1.1743364176/tests/cli/test_list_blueprints.py +24 -0
- open_swarm-0.1.1743364176/tests/conftest.py +78 -0
- open_swarm-0.1.1743364176/tests/swarm_config.json +242 -0
- open_swarm-0.1.1743364176/tests/system/test_burnt_noodles.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_chucks_angels.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_digitalbutlers.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_dilbot_universe.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_divine_code.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_django_chat.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_echocraft.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_family_ties.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_flock.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_gaggle.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_gotchaman.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_monkai-magic.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_nebula_shellz.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_omniplex.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_rue-code.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_suggestion.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_unapologetic_press.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_university.sh +2 -0
- open_swarm-0.1.1743364176/tests/system/test_whiskeytango_foxtrot.sh +2 -0
- open_swarm-0.1.1743364176/tests/unit/blueprints/rue_code/test_rue_code_tools.py +78 -0
- open_swarm-0.1.1743364176/tests/unit/test_blueprint_base_config.py +112 -0
- open_swarm-0.1.1743070217/PKG-INFO +0 -258
- open_swarm-0.1.1743070217/README.md +0 -215
- open_swarm-0.1.1743070217/pyproject.toml +0 -61
- open_swarm-0.1.1743070217/setup.cfg +0 -4
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/PKG-INFO +0 -258
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/SOURCES.txt +0 -124
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/dependency_links.txt +0 -1
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/entry_points.txt +0 -3
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/requires.txt +0 -35
- open_swarm-0.1.1743070217/src/open_swarm.egg-info/top_level.txt +0 -1
- open_swarm-0.1.1743070217/src/swarm/agent/agent.py +0 -49
- open_swarm-0.1.1743070217/src/swarm/auth.py +0 -56
- open_swarm-0.1.1743070217/src/swarm/core.py +0 -326
- open_swarm-0.1.1743070217/src/swarm/extensions/blueprint/__init__.py +0 -36
- open_swarm-0.1.1743070217/src/swarm/extensions/blueprint/agent_utils.py +0 -45
- open_swarm-0.1.1743070217/src/swarm/extensions/blueprint/blueprint_base.py +0 -562
- open_swarm-0.1.1743070217/src/swarm/extensions/blueprint/blueprint_discovery.py +0 -112
- open_swarm-0.1.1743070217/src/swarm/extensions/blueprint/django_utils.py +0 -203
- open_swarm-0.1.1743070217/src/swarm/extensions/config/config_loader.py +0 -208
- open_swarm-0.1.1743070217/src/swarm/extensions/launchers/swarm_cli.py +0 -304
- open_swarm-0.1.1743070217/src/swarm/extensions/mcp/__init__.py +0 -1
- open_swarm-0.1.1743070217/src/swarm/extensions/mcp/cache_utils.py +0 -36
- open_swarm-0.1.1743070217/src/swarm/extensions/mcp/mcp_client.py +0 -341
- open_swarm-0.1.1743070217/src/swarm/extensions/mcp/mcp_constants.py +0 -7
- open_swarm-0.1.1743070217/src/swarm/extensions/mcp/mcp_tool_provider.py +0 -110
- open_swarm-0.1.1743070217/src/swarm/serializers.py +0 -12
- open_swarm-0.1.1743070217/src/swarm/settings.py +0 -189
- open_swarm-0.1.1743070217/src/swarm/types.py +0 -126
- open_swarm-0.1.1743070217/src/swarm/urls.py +0 -89
- open_swarm-0.1.1743070217/src/swarm/views/api_views.py +0 -46
- open_swarm-0.1.1743070217/src/swarm/views/chat_views.py +0 -76
- open_swarm-0.1.1743070217/src/swarm/views/core_views.py +0 -118
- open_swarm-0.1.1743070217/src/swarm/views/model_views.py +0 -135
- open_swarm-0.1.1743070217/src/swarm/views/utils.py +0 -457
- open_swarm-0.1.1743070217/tests/test_apps.py +0 -11
- open_swarm-0.1.1743070217/tests/test_blueprint_base.py +0 -155
- open_swarm-0.1.1743070217/tests/test_blueprint_base_unit.py +0 -85
- open_swarm-0.1.1743070217/tests/test_blueprint_discovery.py +0 -146
- open_swarm-0.1.1743070217/tests/test_blueprint_filter.py +0 -24
- open_swarm-0.1.1743070217/tests/test_blueprint_runner.py +0 -71
- open_swarm-0.1.1743070217/tests/test_blueprints.py +0 -118
- open_swarm-0.1.1743070217/tests/test_chat.py +0 -153
- open_swarm-0.1.1743070217/tests/test_config_loader.py +0 -380
- open_swarm-0.1.1743070217/tests/test_core_chatmessage.py +0 -15
- open_swarm-0.1.1743070217/tests/test_list_models.py +0 -104
- open_swarm-0.1.1743070217/tests/test_message_sequence.py +0 -102
- open_swarm-0.1.1743070217/tests/test_models.py +0 -58
- open_swarm-0.1.1743070217/tests/test_openai_api_key_handling.py +0 -34
- open_swarm-0.1.1743070217/tests/test_redact.py +0 -104
- open_swarm-0.1.1743070217/tests/test_resource_timeout.py +0 -59
- open_swarm-0.1.1743070217/tests/test_settings.py +0 -16
- open_swarm-0.1.1743070217/tests/test_setup_wizard.py +0 -113
- open_swarm-0.1.1743070217/tests/test_swarm_init.py +0 -66
- open_swarm-0.1.1743070217/tests/test_swarm_types.py +0 -36
- open_swarm-0.1.1743070217/tests/test_util.py +0 -16
- open_swarm-0.1.1743070217/tests/test_utils_coverage.py +0 -79
- open_swarm-0.1.1743070217/tests/test_views.py +0 -116
- open_swarm-0.1.1743070217/tests/test_wsgi.py +0 -10
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/LICENSE +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/agent/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/apps.py +0 -0
- {open_swarm-0.1.1743070217/src/swarm/extensions/cli → open_swarm-0.1.1743364176/src/swarm/blueprints/divine_code}/__init__.py +0 -0
- {open_swarm-0.1.1743070217/src/swarm/extensions/cli/commands → open_swarm-0.1.1743364176/src/swarm/blueprints/flock}/__init__.py +0 -0
- {open_swarm-0.1.1743070217/src/swarm/extensions/config/utils → open_swarm-0.1.1743364176/src/swarm/blueprints/rue_code}/__init__.py +0 -0
- {open_swarm-0.1.1743070217/src/swarm/migrations → open_swarm-0.1.1743364176/src/swarm/blueprints/whiskeytango_foxtrot}/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/consumers.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/blueprint_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/common_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/modes/rest_mode.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/output_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/blueprint/spinner.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/blueprint_runner.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/cli_args.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/blueprint_management.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/config_management.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/edit_config.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/list_blueprints.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/validate_env.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/commands/validate_envvars.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/interactive_shell.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/main.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/selection.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/utils/discover_commands.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/utils/env_setup.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/cli/utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/config/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/config/config_manager.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/config/server_config.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/config/setup_wizard.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/config/utils/logger.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/launchers/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/launchers/build_launchers.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/launchers/build_swarm_wrapper.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/launchers/swarm_api.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/extensions/launchers/swarm_wrapper.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/messages.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/migrations/0010_initial_chat_models.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/models.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/repl/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/repl/repl.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/tool_executor.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/util.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/color_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/context_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/general_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/logger.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/logger_setup.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/message_sequence.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/message_utils.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/utils/redact.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/views/__init__.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/views/message_views.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/views/web_views.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/src/swarm/wsgi.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_blueprint_loading.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_cli_mode_selection.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_core_filter_duplicate_system_messages.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_core_filter_messages.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_core_truncate_message_history.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_core_update_null_content.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_dummy.py +0 -0
- {open_swarm-0.1.1743070217 → open_swarm-0.1.1743364176}/tests/test_truncate_message_history.py +0 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Distribution / packaging
|
10
|
+
.Python
|
11
|
+
build/
|
12
|
+
develop-eggs/
|
13
|
+
dist/
|
14
|
+
downloads/
|
15
|
+
eggs/
|
16
|
+
.eggs/
|
17
|
+
lib/
|
18
|
+
lib64/
|
19
|
+
parts/
|
20
|
+
sdist/
|
21
|
+
var/
|
22
|
+
wheels/
|
23
|
+
share/python-wheels/
|
24
|
+
db.sqlite3-*
|
25
|
+
*.egg-info/
|
26
|
+
.installed.cfg
|
27
|
+
*.egg
|
28
|
+
MANIFEST
|
29
|
+
|
30
|
+
# PyInstaller
|
31
|
+
# Usually these files are written by a python script from a template
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
33
|
+
*.manifest
|
34
|
+
*.spec
|
35
|
+
|
36
|
+
# Installer logs
|
37
|
+
pip-log.txt
|
38
|
+
pip-delete-this-directory.txt
|
39
|
+
|
40
|
+
# Unit test / coverage reports
|
41
|
+
htmlcov/
|
42
|
+
.tox/
|
43
|
+
.nox/
|
44
|
+
.coverage
|
45
|
+
.coverage.*
|
46
|
+
.cache
|
47
|
+
nosetests.xml
|
48
|
+
coverage.xml
|
49
|
+
*.cover
|
50
|
+
*.py,cover
|
51
|
+
.hypothesis/
|
52
|
+
.pytest_cache/
|
53
|
+
cover/
|
54
|
+
|
55
|
+
# Translations
|
56
|
+
*.mo
|
57
|
+
*.pot
|
58
|
+
|
59
|
+
# Django stuff:
|
60
|
+
*.log
|
61
|
+
local_settings.py
|
62
|
+
db.sqlite3
|
63
|
+
db.sqlite3-journal
|
64
|
+
|
65
|
+
# Flask stuff:
|
66
|
+
instance/
|
67
|
+
.webassets-cache
|
68
|
+
|
69
|
+
# Scrapy stuff:
|
70
|
+
.scrapy
|
71
|
+
|
72
|
+
# Sphinx documentation
|
73
|
+
docs/_build/
|
74
|
+
|
75
|
+
# PyBuilder
|
76
|
+
.pybuilder/
|
77
|
+
target/
|
78
|
+
|
79
|
+
# Jupyter Notebook
|
80
|
+
.ipynb_checkpoints
|
81
|
+
|
82
|
+
# IPython
|
83
|
+
profile_default/
|
84
|
+
ipython_config.py
|
85
|
+
|
86
|
+
# pyenv
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
89
|
+
#.python-version
|
90
|
+
|
91
|
+
# pipenv
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
95
|
+
# install all needed dependencies.
|
96
|
+
#Pipfile.lock
|
97
|
+
|
98
|
+
# UV
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
101
|
+
# commonly ignored for libraries.
|
102
|
+
#uv.lock
|
103
|
+
|
104
|
+
# poetry
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
107
|
+
# commonly ignored for libraries.
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
109
|
+
#poetry.lock
|
110
|
+
|
111
|
+
# pdm
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
113
|
+
#pdm.lock
|
114
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
115
|
+
# in version control.
|
116
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
117
|
+
.pdm.toml
|
118
|
+
.pdm-python
|
119
|
+
.pdm-build/
|
120
|
+
|
121
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
122
|
+
__pypackages__/
|
123
|
+
|
124
|
+
# Celery stuff
|
125
|
+
celerybeat-schedule
|
126
|
+
celerybeat.pid
|
127
|
+
|
128
|
+
# SageMath parsed files
|
129
|
+
*.sage.py
|
130
|
+
|
131
|
+
# Environments
|
132
|
+
.env
|
133
|
+
.venv
|
134
|
+
env/
|
135
|
+
venv/
|
136
|
+
ENV/
|
137
|
+
env.bak/
|
138
|
+
venv.bak/
|
139
|
+
|
140
|
+
# Spyder project settings
|
141
|
+
.spyderproject
|
142
|
+
.spyproject
|
143
|
+
|
144
|
+
# Rope project settings
|
145
|
+
.ropeproject
|
146
|
+
|
147
|
+
# mkdocs documentation
|
148
|
+
/site
|
149
|
+
|
150
|
+
# mypy
|
151
|
+
.mypy_cache/
|
152
|
+
.dmypy.json
|
153
|
+
dmypy.json
|
154
|
+
|
155
|
+
# Pyre type checker
|
156
|
+
.pyre/
|
157
|
+
|
158
|
+
# pytype static type analyzer
|
159
|
+
.pytype/
|
160
|
+
|
161
|
+
# Cython debug symbols
|
162
|
+
cython_debug/
|
163
|
+
|
164
|
+
# PyCharm
|
165
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
166
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
167
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
168
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
169
|
+
#.idea/
|
170
|
+
|
171
|
+
# PyPI configuration file
|
172
|
+
.pypirc
|
173
|
+
|
174
|
+
|
175
|
+
uv.lock
|
176
|
+
test.db
|
177
|
+
*.bak
|
178
|
+
uvx
|
179
|
+
*.log
|
180
|
+
.env.*
|
181
|
+
staticfiles/*
|
182
|
+
|
183
|
+
swarm-django.db
|
184
|
+
swarm-django.db-*
|
185
|
+
|
186
|
+
wp-sites.json
|
187
|
+
|
188
|
+
traces.*
|
189
|
+
|
190
|
+
openapi.yaml
|
191
|
+
|
192
|
+
*.db
|
193
|
+
*.db-shm
|
194
|
+
logs/*
|
195
|
+
|
196
|
+
openai-agents-python/*
|
197
|
+
docker-compose.override.yml
|
@@ -0,0 +1,286 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: open-swarm
|
3
|
+
Version: 0.1.1743364176
|
4
|
+
Summary: Open Swarm: Orchestrating AI Agent Swarms with Django
|
5
|
+
Project-URL: Homepage, https://github.com/yourusername/open-swarm
|
6
|
+
Project-URL: Documentation, https://github.com/yourusername/open-swarm/blob/main/README.md
|
7
|
+
Project-URL: Repository, https://github.com/yourusername/open-swarm.git
|
8
|
+
Project-URL: Changelog, https://github.com/yourusername/open-swarm/blob/main/CHANGELOG.md
|
9
|
+
Author-email: Matthew Hand <matthewhandau@gmail.com>
|
10
|
+
License-Expression: MIT
|
11
|
+
License-File: LICENSE
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
13
|
+
Classifier: Framework :: Django :: 4.2
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
16
|
+
Classifier: Natural Language :: English
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
23
|
+
Requires-Python: >=3.10
|
24
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
25
|
+
Requires-Dist: celery>=5.3.0
|
26
|
+
Requires-Dist: channels-redis>=4.0
|
27
|
+
Requires-Dist: channels>=4.0
|
28
|
+
Requires-Dist: django-cors-headers>=4.0.0
|
29
|
+
Requires-Dist: django-environ>=0.11.0
|
30
|
+
Requires-Dist: django-extensions>=3.2.0
|
31
|
+
Requires-Dist: django-filter>=23.0
|
32
|
+
Requires-Dist: django-model-utils>=4.3.0
|
33
|
+
Requires-Dist: django<5.0,>=4.2
|
34
|
+
Requires-Dist: djangorestframework<4.0,>=3.14
|
35
|
+
Requires-Dist: drf-spectacular>=0.28.0
|
36
|
+
Requires-Dist: drf-yasg>=1.21.0
|
37
|
+
Requires-Dist: google-api-python-client>=2.100.0
|
38
|
+
Requires-Dist: google-auth-httplib2>=0.1.0
|
39
|
+
Requires-Dist: google-auth-oauthlib>=1.2.1
|
40
|
+
Requires-Dist: gunicorn>=21.0.0
|
41
|
+
Requires-Dist: httpx<0.26.0,>=0.25.2
|
42
|
+
Requires-Dist: jinja2>=3.1.6
|
43
|
+
Requires-Dist: jmespath>=1.0.1
|
44
|
+
Requires-Dist: openai-agents>=0.0.1
|
45
|
+
Requires-Dist: openai<2.0.0,>=1.3.0
|
46
|
+
Requires-Dist: platformdirs>=4.0.0
|
47
|
+
Requires-Dist: psycopg2-binary>=2.9.0
|
48
|
+
Requires-Dist: pyinstaller>=5.13.0
|
49
|
+
Requires-Dist: python-dotenv>=1.0.0
|
50
|
+
Requires-Dist: pyyaml>=6.0
|
51
|
+
Requires-Dist: qdrant-client>=1.6.0
|
52
|
+
Requires-Dist: redis>=5.0.0
|
53
|
+
Requires-Dist: requests>=2.31.0
|
54
|
+
Requires-Dist: tiktoken>=0.5.0
|
55
|
+
Requires-Dist: typer>=0.9.0
|
56
|
+
Requires-Dist: uvicorn>=0.23.0
|
57
|
+
Provides-Extra: dev
|
58
|
+
Requires-Dist: factory-boy>=3.3.0; extra == 'dev'
|
59
|
+
Requires-Dist: ipdb; extra == 'dev'
|
60
|
+
Requires-Dist: ipython; extra == 'dev'
|
61
|
+
Requires-Dist: mypy>=1.5.0; extra == 'dev'
|
62
|
+
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
|
63
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
64
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
|
65
|
+
Requires-Dist: pytest-django>=4.7.0; extra == 'dev'
|
66
|
+
Requires-Dist: pytest-mock>=3.11.0; extra == 'dev'
|
67
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
68
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
69
|
+
Requires-Dist: uv>=0.1.11; extra == 'dev'
|
70
|
+
Provides-Extra: docs
|
71
|
+
Requires-Dist: myst-parser>=2.0.0; extra == 'docs'
|
72
|
+
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == 'docs'
|
73
|
+
Requires-Dist: sphinx>=7.0.0; extra == 'docs'
|
74
|
+
Provides-Extra: test
|
75
|
+
Requires-Dist: anyio>=4.0.0; extra == 'test'
|
76
|
+
Requires-Dist: factory-boy>=3.3.0; extra == 'test'
|
77
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
|
78
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == 'test'
|
79
|
+
Requires-Dist: pytest-django>=4.7.0; extra == 'test'
|
80
|
+
Requires-Dist: pytest-env>=1.0.0; extra == 'test'
|
81
|
+
Requires-Dist: pytest-mock>=3.11.0; extra == 'test'
|
82
|
+
Requires-Dist: pytest-xdist; extra == 'test'
|
83
|
+
Requires-Dist: pytest>=8.0.0; extra == 'test'
|
84
|
+
Requires-Dist: respx>=0.20.0; extra == 'test'
|
85
|
+
Requires-Dist: sseclient-py>=1.7.2; extra == 'test'
|
86
|
+
Description-Content-Type: text/markdown
|
87
|
+
|
88
|
+
# Open Swarm
|
89
|
+
|
90
|
+
<div align="center">
|
91
|
+
<img src="assets/images/openswarm-project-image.jpg" alt="Project Logo" width="70%"/>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
**Open Swarm** is a Python framework for creating, managing, and deploying autonomous agent swarms. It leverages the `openai-agents` library for core agent functionality and provides a structured way to build complex, multi-agent workflows using **Blueprints**.
|
95
|
+
|
96
|
+
Open Swarm can be used in two primary ways:
|
97
|
+
|
98
|
+
1. **As a CLI Utility (`swarm-cli`):** Manage, run, and install blueprints directly on your local machine. Ideal for personal use, testing, and creating standalone agent tools. (Recommended installation: PyPI)
|
99
|
+
2. **As an API Service (`swarm-api`):** Deploy a web server that exposes your blueprints via an OpenAI-compatible REST API. Ideal for integrations, web UIs, and shared access. (Recommended deployment: Docker)
|
100
|
+
|
101
|
+
---
|
102
|
+
|
103
|
+
## Core Concepts
|
104
|
+
|
105
|
+
* **Agents:** Individual AI units performing specific tasks, powered by LLMs (like GPT-4, Claude, etc.). Built using the `openai-agents` SDK.
|
106
|
+
* **Blueprints:** Python classes (`BlueprintBase` subclasses) defining a swarm's structure, agents, coordination logic, and external dependencies (like required environment variables or MCP servers). They act as reusable templates for specific tasks (e.g., code generation, research, data analysis).
|
107
|
+
* **MCP (Mission Control Platform) Servers:** Optional external processes providing specialized capabilities (tools) to agents, such as filesystem access, web browsing, database interaction, or interacting with specific APIs (Slack, Monday.com, etc.). Agents interact with MCP servers via a standardized communication protocol.
|
108
|
+
* **Configuration (`swarm_config.json`):** A central JSON file defining available LLM profiles (API keys, models) and configurations for MCP servers. Typically managed via `swarm-cli` in `~/.config/swarm/`.
|
109
|
+
* **`swarm-cli`:** A command-line tool for managing blueprints (adding, listing, running, installing) and the `swarm_config.json` file. Uses XDG directories for storing blueprints (`~/.local/share/swarm/blueprints/`) and configuration (`~/.config/swarm/`).
|
110
|
+
* **`swarm-api`:** A launcher for the Django/DRF backend that exposes installed blueprints via an OpenAI-compatible REST API (`/v1/models`, `/v1/chat/completions`).
|
111
|
+
|
112
|
+
---
|
113
|
+
|
114
|
+
## Quickstart 1: Using `swarm-cli` Locally (via PyPI)
|
115
|
+
|
116
|
+
This is the recommended way to use `swarm-cli` for managing and running blueprints on your local machine.
|
117
|
+
|
118
|
+
**Prerequisites:**
|
119
|
+
* Python 3.10+
|
120
|
+
* `pip` (Python package installer)
|
121
|
+
|
122
|
+
**Steps:**
|
123
|
+
|
124
|
+
1. **Install `open-swarm` from PyPI:**
|
125
|
+
```bash
|
126
|
+
pip install open-swarm
|
127
|
+
```
|
128
|
+
*(Using a virtual environment is recommended: `python -m venv .venv && source .venv/bin/activate`)*
|
129
|
+
|
130
|
+
2. **Initial Configuration (First Run):**
|
131
|
+
* The first time you run a `swarm-cli` command that requires configuration (like `run` or `config`), it will automatically create a default `swarm_config.json` at `~/.config/swarm/swarm_config.json` if one doesn't exist.
|
132
|
+
* You **must** set the required environment variables (like `OPENAI_API_KEY`) in your shell for the configuration to work. Create a `.env` file in your working directory or export them:
|
133
|
+
```bash
|
134
|
+
export OPENAI_API_KEY="sk-..."
|
135
|
+
# Add other keys as needed (GROQ_API_KEY, etc.)
|
136
|
+
```
|
137
|
+
* You can customize the configuration further using `swarm-cli config` commands (see `USERGUIDE.md`).
|
138
|
+
|
139
|
+
3. **Add a Blueprint:**
|
140
|
+
* Download or create a blueprint file (e.g., `my_blueprint.py`). Example blueprints are available in the [project repository](https://github.com/matthewhand/open-swarm/tree/main/src/swarm/blueprints).
|
141
|
+
* Add it using `swarm-cli`:
|
142
|
+
```bash
|
143
|
+
# Example: Adding a downloaded blueprint file
|
144
|
+
swarm-cli add ./path/to/downloaded/blueprint_echocraft.py
|
145
|
+
|
146
|
+
# Example: Adding a directory containing a blueprint
|
147
|
+
swarm-cli add ./my_custom_blueprints/agent_smith --name agent_smith
|
148
|
+
```
|
149
|
+
|
150
|
+
4. **Run the Blueprint:**
|
151
|
+
* **Single Instruction:**
|
152
|
+
```bash
|
153
|
+
swarm-cli run echocraft --instruction "Hello from CLI!"
|
154
|
+
```
|
155
|
+
* **Interactive Mode:**
|
156
|
+
```bash
|
157
|
+
swarm-cli run echocraft
|
158
|
+
# Now you can chat with the blueprint interactively
|
159
|
+
```
|
160
|
+
|
161
|
+
5. **(Optional) Install as Command:**
|
162
|
+
```bash
|
163
|
+
swarm-cli install echocraft
|
164
|
+
# Now run (ensure ~/.local/share/swarm/bin is in your PATH):
|
165
|
+
echocraft --instruction "I am a command now!"
|
166
|
+
```
|
167
|
+
|
168
|
+
---
|
169
|
+
|
170
|
+
## Quickstart 2: Deploying `swarm-api` Service (via Docker)
|
171
|
+
|
172
|
+
This section covers deploying the API service using Docker.
|
173
|
+
|
174
|
+
### Option A: Docker Compose (Recommended for Flexibility)
|
175
|
+
|
176
|
+
This method uses `docker-compose.yaml` and is best if you need to customize volumes, environment variables easily, or manage related services (like Redis).
|
177
|
+
|
178
|
+
**Prerequisites:**
|
179
|
+
* Docker ([Install Docker](https://docs.docker.com/engine/install/))
|
180
|
+
* Docker Compose ([Install Docker Compose](https://docs.docker.com/compose/install/))
|
181
|
+
* Git
|
182
|
+
|
183
|
+
**Steps:**
|
184
|
+
|
185
|
+
1. **Clone the Repository:** (Needed for `docker-compose.yaml` and config files)
|
186
|
+
```bash
|
187
|
+
git clone https://github.com/matthewhand/open-swarm.git
|
188
|
+
cd open-swarm
|
189
|
+
```
|
190
|
+
|
191
|
+
2. **Configure Environment:**
|
192
|
+
* Copy `cp .env.example .env` and edit `.env` with your API keys (e.g., `OPENAI_API_KEY`, `SWARM_API_KEY`).
|
193
|
+
|
194
|
+
3. **Prepare Blueprints & Config:**
|
195
|
+
* Place blueprints in `./blueprints`.
|
196
|
+
* Ensure `./swarm_config.json` exists and is configured.
|
197
|
+
|
198
|
+
4. **Configure Overrides (Optional):**
|
199
|
+
* Copy `cp docker-compose.override.yaml.example docker-compose.override.yaml`.
|
200
|
+
* Edit the override file to mount additional volumes, change ports, etc.
|
201
|
+
|
202
|
+
5. **Start the Service:**
|
203
|
+
```bash
|
204
|
+
docker compose up -d
|
205
|
+
```
|
206
|
+
|
207
|
+
6. **Verify API:** (Default port 8000)
|
208
|
+
* Models: `curl http://localhost:8000/v1/models`
|
209
|
+
* Chat: `curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "echocraft", ...}'` (Add `-H "Authorization: Bearer <key>"` if needed).
|
210
|
+
|
211
|
+
### Option B: Direct `docker run` (Simpler for Single Container)
|
212
|
+
|
213
|
+
This method runs the pre-built image directly from Docker Hub. Good for quick tests or simple deployments without cloning the repo. Customization requires careful use of `-v` (volume) and `-e` (environment) flags.
|
214
|
+
|
215
|
+
**Prerequisites:**
|
216
|
+
* Docker ([Install Docker](https://docs.docker.com/engine/install/))
|
217
|
+
|
218
|
+
**Steps:**
|
219
|
+
|
220
|
+
1. **Prepare Local Files (If Customizing):**
|
221
|
+
* Create a directory for your blueprints (e.g., `~/my_swarm_blueprints`).
|
222
|
+
* Create your `swarm_config.json` file locally (e.g., `~/my_swarm_config.json`).
|
223
|
+
* Create a `.env` file locally (e.g., `~/swarm.env`) with your API keys (`OPENAI_API_KEY`, `SWARM_API_KEY`, etc.).
|
224
|
+
|
225
|
+
2. **Run the Container:**
|
226
|
+
```bash
|
227
|
+
docker run -d \
|
228
|
+
--name open-swarm-api \
|
229
|
+
-p 8000:8000 \
|
230
|
+
--env-file ~/swarm.env \
|
231
|
+
-v ~/my_swarm_blueprints:/app/blueprints:ro \
|
232
|
+
-v ~/my_swarm_config.json:/app/swarm_config.json:ro \
|
233
|
+
-v open_swarm_db:/app/db.sqlite3 \
|
234
|
+
--restart unless-stopped \
|
235
|
+
mhand79/open-swarm:latest
|
236
|
+
```
|
237
|
+
* `-d`: Run detached (in background).
|
238
|
+
* `--name`: Assign a name to the container.
|
239
|
+
* `-p 8000:8000`: Map host port 8000 to container port 8000 (adjust if needed).
|
240
|
+
* `--env-file`: Load environment variables from your local file.
|
241
|
+
* `-v ...:/app/blueprints:ro`: Mount your local blueprints directory (read-only). **Required** if you want to use custom blueprints.
|
242
|
+
* `-v ...:/app/swarm_config.json:ro`: Mount your local config file (read-only). **Required** for custom LLM/MCP settings.
|
243
|
+
* `-v open_swarm_db:/app/db.sqlite3`: Use a named Docker volume for the database to persist data.
|
244
|
+
* `--restart unless-stopped`: Automatically restart the container unless manually stopped.
|
245
|
+
* `mhand79/open-swarm:latest`: The image name on Docker Hub.
|
246
|
+
|
247
|
+
3. **Verify API:** (Same as Docker Compose)
|
248
|
+
* Models: `curl http://localhost:8000/v1/models`
|
249
|
+
* Chat: `curl http://localhost:8000/v1/chat/completions ...` (Add `-H "Authorization: Bearer <key>"` if needed).
|
250
|
+
|
251
|
+
---
|
252
|
+
|
253
|
+
## Usage Modes Summary
|
254
|
+
|
255
|
+
* **`swarm-api` (via Docker or `manage.py runserver`):** Exposes blueprints as an OpenAI-compatible REST API. Ideal for integrations. Requires `SWARM_API_KEY` for security in non-local deployments.
|
256
|
+
* **`swarm-cli run` (via PyPI install):** Executes managed blueprints locally, either with a single instruction or in interactive chat mode. Good for testing and local tasks.
|
257
|
+
* **`swarm-cli install` (via PyPI install):** Creates standalone command-line executables from managed blueprints.
|
258
|
+
* **Direct Python Execution (via Git clone):** Running `uv run python <blueprint_file.py>` is mainly for development and testing individual files.
|
259
|
+
|
260
|
+
---
|
261
|
+
|
262
|
+
## Further Documentation
|
263
|
+
|
264
|
+
This README provides a high-level overview and quickstart guides. For more detailed information, please refer to:
|
265
|
+
|
266
|
+
* **User Guide (`USERGUIDE.md`):** Detailed instructions on using `swarm-cli` commands for managing blueprints and configuration locally.
|
267
|
+
* **Development Guide (`DEVELOPMENT.md`):** Information for contributors and developers, including architecture details, testing strategies, project layout, API details, and advanced topics.
|
268
|
+
* **Example Blueprints (`src/swarm/blueprints/README.md`):** A list and description of the example blueprints included with the framework, showcasing various features and integration patterns.
|
269
|
+
|
270
|
+
---
|
271
|
+
|
272
|
+
## Contributing
|
273
|
+
|
274
|
+
Contributions are welcome! Please refer to the `CONTRIBUTING.md` file (if available) or open an issue/pull request on the repository.
|
275
|
+
|
276
|
+
---
|
277
|
+
|
278
|
+
## License
|
279
|
+
|
280
|
+
Open Swarm is provided under the MIT License. Refer to the [LICENSE](LICENSE) file for full details.
|
281
|
+
|
282
|
+
---
|
283
|
+
|
284
|
+
## Acknowledgements
|
285
|
+
|
286
|
+
This project builds upon concepts and code from the `openai-agents` library and potentially other open-source projects. Specific acknowledgements can be found in `DEVELOPMENT.md` or individual source files.
|
@@ -0,0 +1,199 @@
|
|
1
|
+
# Open Swarm
|
2
|
+
|
3
|
+
<div align="center">
|
4
|
+
<img src="assets/images/openswarm-project-image.jpg" alt="Project Logo" width="70%"/>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
**Open Swarm** is a Python framework for creating, managing, and deploying autonomous agent swarms. It leverages the `openai-agents` library for core agent functionality and provides a structured way to build complex, multi-agent workflows using **Blueprints**.
|
8
|
+
|
9
|
+
Open Swarm can be used in two primary ways:
|
10
|
+
|
11
|
+
1. **As a CLI Utility (`swarm-cli`):** Manage, run, and install blueprints directly on your local machine. Ideal for personal use, testing, and creating standalone agent tools. (Recommended installation: PyPI)
|
12
|
+
2. **As an API Service (`swarm-api`):** Deploy a web server that exposes your blueprints via an OpenAI-compatible REST API. Ideal for integrations, web UIs, and shared access. (Recommended deployment: Docker)
|
13
|
+
|
14
|
+
---
|
15
|
+
|
16
|
+
## Core Concepts
|
17
|
+
|
18
|
+
* **Agents:** Individual AI units performing specific tasks, powered by LLMs (like GPT-4, Claude, etc.). Built using the `openai-agents` SDK.
|
19
|
+
* **Blueprints:** Python classes (`BlueprintBase` subclasses) defining a swarm's structure, agents, coordination logic, and external dependencies (like required environment variables or MCP servers). They act as reusable templates for specific tasks (e.g., code generation, research, data analysis).
|
20
|
+
* **MCP (Mission Control Platform) Servers:** Optional external processes providing specialized capabilities (tools) to agents, such as filesystem access, web browsing, database interaction, or interacting with specific APIs (Slack, Monday.com, etc.). Agents interact with MCP servers via a standardized communication protocol.
|
21
|
+
* **Configuration (`swarm_config.json`):** A central JSON file defining available LLM profiles (API keys, models) and configurations for MCP servers. Typically managed via `swarm-cli` in `~/.config/swarm/`.
|
22
|
+
* **`swarm-cli`:** A command-line tool for managing blueprints (adding, listing, running, installing) and the `swarm_config.json` file. Uses XDG directories for storing blueprints (`~/.local/share/swarm/blueprints/`) and configuration (`~/.config/swarm/`).
|
23
|
+
* **`swarm-api`:** A launcher for the Django/DRF backend that exposes installed blueprints via an OpenAI-compatible REST API (`/v1/models`, `/v1/chat/completions`).
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
## Quickstart 1: Using `swarm-cli` Locally (via PyPI)
|
28
|
+
|
29
|
+
This is the recommended way to use `swarm-cli` for managing and running blueprints on your local machine.
|
30
|
+
|
31
|
+
**Prerequisites:**
|
32
|
+
* Python 3.10+
|
33
|
+
* `pip` (Python package installer)
|
34
|
+
|
35
|
+
**Steps:**
|
36
|
+
|
37
|
+
1. **Install `open-swarm` from PyPI:**
|
38
|
+
```bash
|
39
|
+
pip install open-swarm
|
40
|
+
```
|
41
|
+
*(Using a virtual environment is recommended: `python -m venv .venv && source .venv/bin/activate`)*
|
42
|
+
|
43
|
+
2. **Initial Configuration (First Run):**
|
44
|
+
* The first time you run a `swarm-cli` command that requires configuration (like `run` or `config`), it will automatically create a default `swarm_config.json` at `~/.config/swarm/swarm_config.json` if one doesn't exist.
|
45
|
+
* You **must** set the required environment variables (like `OPENAI_API_KEY`) in your shell for the configuration to work. Create a `.env` file in your working directory or export them:
|
46
|
+
```bash
|
47
|
+
export OPENAI_API_KEY="sk-..."
|
48
|
+
# Add other keys as needed (GROQ_API_KEY, etc.)
|
49
|
+
```
|
50
|
+
* You can customize the configuration further using `swarm-cli config` commands (see `USERGUIDE.md`).
|
51
|
+
|
52
|
+
3. **Add a Blueprint:**
|
53
|
+
* Download or create a blueprint file (e.g., `my_blueprint.py`). Example blueprints are available in the [project repository](https://github.com/matthewhand/open-swarm/tree/main/src/swarm/blueprints).
|
54
|
+
* Add it using `swarm-cli`:
|
55
|
+
```bash
|
56
|
+
# Example: Adding a downloaded blueprint file
|
57
|
+
swarm-cli add ./path/to/downloaded/blueprint_echocraft.py
|
58
|
+
|
59
|
+
# Example: Adding a directory containing a blueprint
|
60
|
+
swarm-cli add ./my_custom_blueprints/agent_smith --name agent_smith
|
61
|
+
```
|
62
|
+
|
63
|
+
4. **Run the Blueprint:**
|
64
|
+
* **Single Instruction:**
|
65
|
+
```bash
|
66
|
+
swarm-cli run echocraft --instruction "Hello from CLI!"
|
67
|
+
```
|
68
|
+
* **Interactive Mode:**
|
69
|
+
```bash
|
70
|
+
swarm-cli run echocraft
|
71
|
+
# Now you can chat with the blueprint interactively
|
72
|
+
```
|
73
|
+
|
74
|
+
5. **(Optional) Install as Command:**
|
75
|
+
```bash
|
76
|
+
swarm-cli install echocraft
|
77
|
+
# Now run (ensure ~/.local/share/swarm/bin is in your PATH):
|
78
|
+
echocraft --instruction "I am a command now!"
|
79
|
+
```
|
80
|
+
|
81
|
+
---
|
82
|
+
|
83
|
+
## Quickstart 2: Deploying `swarm-api` Service (via Docker)
|
84
|
+
|
85
|
+
This section covers deploying the API service using Docker.
|
86
|
+
|
87
|
+
### Option A: Docker Compose (Recommended for Flexibility)
|
88
|
+
|
89
|
+
This method uses `docker-compose.yaml` and is best if you need to customize volumes, environment variables easily, or manage related services (like Redis).
|
90
|
+
|
91
|
+
**Prerequisites:**
|
92
|
+
* Docker ([Install Docker](https://docs.docker.com/engine/install/))
|
93
|
+
* Docker Compose ([Install Docker Compose](https://docs.docker.com/compose/install/))
|
94
|
+
* Git
|
95
|
+
|
96
|
+
**Steps:**
|
97
|
+
|
98
|
+
1. **Clone the Repository:** (Needed for `docker-compose.yaml` and config files)
|
99
|
+
```bash
|
100
|
+
git clone https://github.com/matthewhand/open-swarm.git
|
101
|
+
cd open-swarm
|
102
|
+
```
|
103
|
+
|
104
|
+
2. **Configure Environment:**
|
105
|
+
* Copy `cp .env.example .env` and edit `.env` with your API keys (e.g., `OPENAI_API_KEY`, `SWARM_API_KEY`).
|
106
|
+
|
107
|
+
3. **Prepare Blueprints & Config:**
|
108
|
+
* Place blueprints in `./blueprints`.
|
109
|
+
* Ensure `./swarm_config.json` exists and is configured.
|
110
|
+
|
111
|
+
4. **Configure Overrides (Optional):**
|
112
|
+
* Copy `cp docker-compose.override.yaml.example docker-compose.override.yaml`.
|
113
|
+
* Edit the override file to mount additional volumes, change ports, etc.
|
114
|
+
|
115
|
+
5. **Start the Service:**
|
116
|
+
```bash
|
117
|
+
docker compose up -d
|
118
|
+
```
|
119
|
+
|
120
|
+
6. **Verify API:** (Default port 8000)
|
121
|
+
* Models: `curl http://localhost:8000/v1/models`
|
122
|
+
* Chat: `curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "echocraft", ...}'` (Add `-H "Authorization: Bearer <key>"` if needed).
|
123
|
+
|
124
|
+
### Option B: Direct `docker run` (Simpler for Single Container)
|
125
|
+
|
126
|
+
This method runs the pre-built image directly from Docker Hub. Good for quick tests or simple deployments without cloning the repo. Customization requires careful use of `-v` (volume) and `-e` (environment) flags.
|
127
|
+
|
128
|
+
**Prerequisites:**
|
129
|
+
* Docker ([Install Docker](https://docs.docker.com/engine/install/))
|
130
|
+
|
131
|
+
**Steps:**
|
132
|
+
|
133
|
+
1. **Prepare Local Files (If Customizing):**
|
134
|
+
* Create a directory for your blueprints (e.g., `~/my_swarm_blueprints`).
|
135
|
+
* Create your `swarm_config.json` file locally (e.g., `~/my_swarm_config.json`).
|
136
|
+
* Create a `.env` file locally (e.g., `~/swarm.env`) with your API keys (`OPENAI_API_KEY`, `SWARM_API_KEY`, etc.).
|
137
|
+
|
138
|
+
2. **Run the Container:**
|
139
|
+
```bash
|
140
|
+
docker run -d \
|
141
|
+
--name open-swarm-api \
|
142
|
+
-p 8000:8000 \
|
143
|
+
--env-file ~/swarm.env \
|
144
|
+
-v ~/my_swarm_blueprints:/app/blueprints:ro \
|
145
|
+
-v ~/my_swarm_config.json:/app/swarm_config.json:ro \
|
146
|
+
-v open_swarm_db:/app/db.sqlite3 \
|
147
|
+
--restart unless-stopped \
|
148
|
+
mhand79/open-swarm:latest
|
149
|
+
```
|
150
|
+
* `-d`: Run detached (in background).
|
151
|
+
* `--name`: Assign a name to the container.
|
152
|
+
* `-p 8000:8000`: Map host port 8000 to container port 8000 (adjust if needed).
|
153
|
+
* `--env-file`: Load environment variables from your local file.
|
154
|
+
* `-v ...:/app/blueprints:ro`: Mount your local blueprints directory (read-only). **Required** if you want to use custom blueprints.
|
155
|
+
* `-v ...:/app/swarm_config.json:ro`: Mount your local config file (read-only). **Required** for custom LLM/MCP settings.
|
156
|
+
* `-v open_swarm_db:/app/db.sqlite3`: Use a named Docker volume for the database to persist data.
|
157
|
+
* `--restart unless-stopped`: Automatically restart the container unless manually stopped.
|
158
|
+
* `mhand79/open-swarm:latest`: The image name on Docker Hub.
|
159
|
+
|
160
|
+
3. **Verify API:** (Same as Docker Compose)
|
161
|
+
* Models: `curl http://localhost:8000/v1/models`
|
162
|
+
* Chat: `curl http://localhost:8000/v1/chat/completions ...` (Add `-H "Authorization: Bearer <key>"` if needed).
|
163
|
+
|
164
|
+
---
|
165
|
+
|
166
|
+
## Usage Modes Summary
|
167
|
+
|
168
|
+
* **`swarm-api` (via Docker or `manage.py runserver`):** Exposes blueprints as an OpenAI-compatible REST API. Ideal for integrations. Requires `SWARM_API_KEY` for security in non-local deployments.
|
169
|
+
* **`swarm-cli run` (via PyPI install):** Executes managed blueprints locally, either with a single instruction or in interactive chat mode. Good for testing and local tasks.
|
170
|
+
* **`swarm-cli install` (via PyPI install):** Creates standalone command-line executables from managed blueprints.
|
171
|
+
* **Direct Python Execution (via Git clone):** Running `uv run python <blueprint_file.py>` is mainly for development and testing individual files.
|
172
|
+
|
173
|
+
---
|
174
|
+
|
175
|
+
## Further Documentation
|
176
|
+
|
177
|
+
This README provides a high-level overview and quickstart guides. For more detailed information, please refer to:
|
178
|
+
|
179
|
+
* **User Guide (`USERGUIDE.md`):** Detailed instructions on using `swarm-cli` commands for managing blueprints and configuration locally.
|
180
|
+
* **Development Guide (`DEVELOPMENT.md`):** Information for contributors and developers, including architecture details, testing strategies, project layout, API details, and advanced topics.
|
181
|
+
* **Example Blueprints (`src/swarm/blueprints/README.md`):** A list and description of the example blueprints included with the framework, showcasing various features and integration patterns.
|
182
|
+
|
183
|
+
---
|
184
|
+
|
185
|
+
## Contributing
|
186
|
+
|
187
|
+
Contributions are welcome! Please refer to the `CONTRIBUTING.md` file (if available) or open an issue/pull request on the repository.
|
188
|
+
|
189
|
+
---
|
190
|
+
|
191
|
+
## License
|
192
|
+
|
193
|
+
Open Swarm is provided under the MIT License. Refer to the [LICENSE](LICENSE) file for full details.
|
194
|
+
|
195
|
+
---
|
196
|
+
|
197
|
+
## Acknowledgements
|
198
|
+
|
199
|
+
This project builds upon concepts and code from the `openai-agents` library and potentially other open-source projects. Specific acknowledgements can be found in `DEVELOPMENT.md` or individual source files.
|