CINXE.COM

GitHub - kyegomez/swarms: The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai

<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system" data-a11y-link-underlines="true" > <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com"> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-74231a1f3bbb.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-8a995f0bacd4.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-f37fb7684b1f.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-9ac301c3ebe5.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-cd826e8636dc.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-f91b0f603451.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-83beb16e0ecf.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-6e122dab64fc.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-18119e682df0.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-225433424a87.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-aaa714e5674d.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0a3c53b9d1c2.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-ea73c9cb5377.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-4fce88777fa8.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-0210be90f4d3.css" /> <script type="application/json" id="client-env">{"locale":"en","featureFlags":["copilot_immersive_issue_preview","copilot_new_references_ui","copilot_chat_repo_custom_instructions_preview","copilot_no_floating_button","copilot_topics_as_references","copilot_read_shared_conversation","copilot_duplicate_thread","copilot_buffered_streaming","dotcom_chat_client_side_skills","experimentation_azure_variant_endpoint","failbot_handle_non_errors","geojson_azure_maps","ghost_pilot_confidence_truncation_25","ghost_pilot_confidence_truncation_40","github_models_gateway_parse_params","github_models_o3_mini_streaming","insert_before_patch","issues_react_remove_placeholders","issues_react_blur_item_picker_on_close","issues_advanced_search_nested_ownership_filters","issues_dashboard_no_redirects","marketing_pages_search_explore_provider","primer_react_css_modules_ga","react_data_router_pull_requests","react_override_default_key","remove_child_patch","report_hydro_web_vitals","sample_network_conn_type","swp_enterprise_contact_form","site_proxima_australia_update","viewscreen_sandbox","issues_react_create_milestone","issues_react_cache_fix_workaround","lifecycle_label_name_updates","copilot_task_oriented_assistive_prompts","issue_types_prevent_private_type_creation","refresh_image_video_src","react_router_dispose_on_disconnect","codespaces_prebuild_region_target_update","turbo_app_id_restore","copilot_code_review_sign_up_closed"]}</script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-12b60d76a0e1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover_js-9da652f58479.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_arianotify-polyfill_ariaNotify-polyfill_js-node_modules_github_mi-3abb8f-46b9f4874d95.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_failbot_failbot_ts-952d624642a1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-f04cb2a9fc8c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_index_mjs-0dbb79f97f8f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-f690fd9ae3d5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-62d275b7ddd9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_text-expander-element_dist_index_js-78748950cb0c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-8e9f78-a90ac05d2469.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-b5f1d7-a1760ffda83d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_markdown-toolbar-element_dist_index_js-ceef33f593fa.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_primer_view-co-c44a69-efa32db3a345.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-394f8eb34f19.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-0fd720babc23.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-2906d7-2a07a295af40.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-be8cb88f481b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-7c534c-a4a1922eb55f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_turbo_dist_turbo_es2017-esm_js-a03ee12d659a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-893f9f-b6294cf703b7.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-e3180fe3bcb3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_quote-selection_dist_index_js-node_modules_github_session-resume_-947061-e7a6c4a19f98.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_updatable-content_updatable-content_ts-62f3e9c52ece.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_task-list_ts-app_assets_modules_github_sso_ts-ui_packages-900dde-768abe60b1f8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-3e000c5d31a9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_ajax-error_ts-app_assets_modules_github_behaviors_include-87a4ae-2ad30b0b8114.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-e429cff6ceb1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-c92ce7c6a557.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-f6223d90c7ba.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-01e85cd1be94.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_template-parts_lib_index_js-94dc7a2157c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-4b93df70b903.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-52913063a0b9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-b419a25ee02f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-3eebbd-0763620ad7bf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_delegated-events_di-e161aa-9d41fb1b6c9e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_remote--3c9c82-b71ef90fbdc7.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-10217e4e5a53.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_catalyst_lib_inde-dbbea9-26cce2010167.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-d6d3c94ee97e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-602097a4b0db.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-56004cde4e29.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-f1bca44e0926.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-cf2f2ab8dab4.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-2df2f32ec596.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-9a233856b02c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-55fea94174bf.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-57956eade845.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.d6748be77dac223f42c9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.d6748be77dac223f42c9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <title>GitHub - kyegomez/swarms: The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai</title> <meta name="route-pattern" content="/:user_id/:repository" data-turbo-transient> <meta name="route-controller" content="files" data-turbo-transient> <meta name="route-action" content="disambiguate" data-turbo-transient> <meta name="current-catalog-service-hash" content="f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb"> <meta name="request-id" content="B364:319ABA:13B430:16AEFF:67EC4C23" data-pjax-transient="true"/><meta name="html-safe-nonce" content="d24571a60c48abeb913d9c1fcb6f769d1df1169154d2bbbe54f1bd234562d391" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzY0OjMxOUFCQToxM0I0MzA6MTZBRUZGOjY3RUM0QzIzIiwidmlzaXRvcl9pZCI6IjQyMDg3MTE0OTUzMDc3NzUwMTEiLCJyZWdpb25fZWRnZSI6InNvdXRoZWFzdGFzaWEiLCJyZWdpb25fcmVuZGVyIjoic291dGhlYXN0YXNpYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="cd9cccffda978ec9222f314aa36240744379d27dd912c074f12441c96998bc5e" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:639195966" data-turbo-transient> <meta name="github-keyboard-shortcuts" content="repository,copilot" data-turbo-transient="true" /> <meta name="selected-link" value="repo_source" data-turbo-transient> <link rel="assets" href="https://github.githubassets.com/"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I"> <meta name="octolytics-url" content="https://collector.github.com/github/collect" /> <meta name="analytics-location" content="/&lt;user-name&gt;/&lt;repo-name&gt;" data-turbo-transient="true" /> <meta name="user-login" content=""> <meta name="viewport" content="width=device-width"> <meta name="description" content="The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai - kyegomez/swarms"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/kyegomez/swarms" /> <meta name="twitter:image" content="https://repository-images.githubusercontent.com/639195966/bc2890e2-b8dc-4f4c-b2f2-73a7ca0367ac" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="GitHub - kyegomez/swarms: The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai" /><meta name="twitter:description" content="The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai - kyegomez/swarms" /> <meta property="og:image" content="https://repository-images.githubusercontent.com/639195966/bc2890e2-b8dc-4f4c-b2f2-73a7ca0367ac" /><meta property="og:image:alt" content="The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai - kyegomez/swarms" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="GitHub - kyegomez/swarms: The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai" /><meta property="og:url" content="https://github.com/kyegomez/swarms" /><meta property="og:description" content="The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai - kyegomez/swarms" /> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta http-equiv="x-pjax-version" content="32b9035bf0c61604b5254b040c3f53075bc8e33e032624ecbf546e2699c3268e" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="e26f9f0ba624ee85cc7ac057d8faa8618a4f25a85eab052c33d018ac0f6b1a46" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="159e03504eed5183f9787c72780a7d8c1460af30746ab09d728b048c41719efa" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="c46b46b603f1aa96be4ae86d1d3a34166e4a116b626bf4c235d130a36ec95ec4" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/kyegomez/swarms git https://github.com/kyegomez/swarms.git"> <meta name="octolytics-dimension-user_id" content="98760976" /><meta name="octolytics-dimension-user_login" content="kyegomez" /><meta name="octolytics-dimension-repository_id" content="639195966" /><meta name="octolytics-dimension-repository_nwo" content="kyegomez/swarms" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="639195966" /><meta name="octolytics-dimension-repository_network_root_nwo" content="kyegomez/swarms" /> <link rel="canonical" href="https://github.com/kyegomez/swarms" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive"> <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> <meta name="release" content="432e6af106a220f9882ed212739bfdbd4d44d6ae"> <link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon"> <meta name="theme-color" content="#1e2327"> <meta name="color-scheme" content="light dark" /> <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials"> </head> <body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div class="position-relative header-wrapper js-header-wrapper "> <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a> <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full"> <span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span> </span> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ui-commands_ui-commands_ts-e2a7ccb6ae86.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-79d6a754ebf9.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.d6748be77dac223f42c9.module.css" /> <react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script> <div data-target="react-partial.reactRoot"></div> </react-partial> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-4898d1bf4b51.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-45d6658f8b6b.js"></script> <header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark> <h2 class="sr-only">Navigation Menu</h2> <button type="button" class="HeaderMktg-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span class="d-none">Toggle navigation</span> </button> <div class="d-flex flex-column flex-lg-row flex-items-center px-3 px-md-4 px-lg-5 height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <div class="flex-1"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target js-nav-padding-recalculate js-header-menu-toggle Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span class="Button-content"> <span class="Button-label"><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span> </button> </div> <a class="mr-lg-3 color-fg-inherit flex-order-2 js-prevent-focus-on-mobile-nav" href="/" aria-label="Homepage" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Logomark;ref_loc:Header&quot;}"> <svg height="32" aria-hidden="true" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"></path> </svg> </a> <div class="flex-1 flex-order-2 text-right"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms" class="HeaderMenu-link HeaderMenu-button d-inline-flex d-lg-none flex-order-1 f5 no-underline border color-border-default rounded-2 px-2 py-1 color-fg-inherit js-prevent-focus-on-mobile-nav" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="73952369c5468778ae10369f56e320d7bbb7b9820c46c1916df92a4a4f2d39be" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to Sign in&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> </div> <div class="HeaderMenu js-header-menu height-fit position-lg-relative d-lg-flex flex-column flex-auto top-0"> <div class="HeaderMenu-wrapper d-flex flex-column flex-self-start flex-lg-row flex-auto rounded rounded-lg-0"> <nav class="HeaderMenu-nav" aria-label="Global"> <ul class="d-lg-flex list-style-none"> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_copilot&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_copilot_link_product_navbar&quot;}" href="https://github.com/features/copilot"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Write better code with AI </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_advanced_security&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_advanced_security_link_product_navbar&quot;}" href="https://github.com/security/advanced-security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Advanced Security</div> Find and fix vulnerabilities </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;actions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;actions_link_product_navbar&quot;}" href="https://github.com/features/actions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path> </svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;codespaces&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;codespaces_link_product_navbar&quot;}" href="https://github.com/features/codespaces"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;issues&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;issues_link_product_navbar&quot;}" href="https://github.com/features/issues"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path> </svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_review&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_review_link_product_navbar&quot;}" href="https://github.com/features/code-review"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Review</div> Manage code changes </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;discussions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;discussions_link_product_navbar&quot;}" href="https://github.com/features/discussions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_search&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_search_link_product_navbar&quot;}" href="https://github.com/features/code-search"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-square color-fg-subtle mr-3"> <path d="M10.3 8.24a.75.75 0 0 1-.04 1.06L7.352 12l2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M2 3.75C2 2.784 2.784 2 3.75 2h16.5c.966 0 1.75.784 1.75 1.75v16.5A1.75 1.75 0 0 1 20.25 22H3.75A1.75 1.75 0 0 1 2 20.25Zm1.75-.25a.25.25 0 0 0-.25.25v16.5c0 .138.112.25.25.25h16.5a.25.25 0 0 0 .25-.25V3.75a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Search</div> Find more, search less </div> </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="product-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="product-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;all_features&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;all_features_link_product_navbar&quot;}" href="https://github.com/features"> All features </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;documentation&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;documentation_link_product_navbar&quot;}" href="https://docs.github.com"> Documentation <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_skills&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_skills_link_product_navbar&quot;}" href="https://skills.github.com"> GitHub Skills <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;blog&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;blog_link_product_navbar&quot;}" href="https://github.blog"> Blog <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 pb-lg-3 mb-3 mb-lg-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-company-size-heading">By company size</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-company-size-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprises&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprises_link_solutions_navbar&quot;}" href="https://github.com/enterprise"> Enterprises </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;small_and_medium_teams&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;small_and_medium_teams_link_solutions_navbar&quot;}" href="https://github.com/team"> Small and medium teams </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;startups&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;startups_link_solutions_navbar&quot;}" href="https://github.com/enterprise/startups"> Startups </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;nonprofits&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;nonprofits_link_solutions_navbar&quot;}" href="/solutions/industry/nonprofits"> Nonprofits </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-use-case-heading">By use case</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-use-case-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devsecops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devsecops_link_solutions_navbar&quot;}" href="/solutions/use-case/devsecops"> DevSecOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_solutions_navbar&quot;}" href="/solutions/use-case/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ci_cd&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ci_cd_link_solutions_navbar&quot;}" href="/solutions/use-case/ci-cd"> CI/CD </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_use_cases&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_use_cases_link_solutions_navbar&quot;}" href="/solutions/use-case"> View all use cases </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-industry-heading">By industry</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-industry-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;healthcare&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;healthcare_link_solutions_navbar&quot;}" href="/solutions/industry/healthcare"> Healthcare </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;financial_services&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;financial_services_link_solutions_navbar&quot;}" href="/solutions/industry/financial-services"> Financial services </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;manufacturing&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;manufacturing_link_solutions_navbar&quot;}" href="/solutions/industry/manufacturing"> Manufacturing </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;government&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;government_link_solutions_navbar&quot;}" href="/solutions/industry/government"> Government </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_industries&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_industries_link_solutions_navbar&quot;}" href="/solutions/industry"> View all industries </a></li> </ul> </div> </div> <div class="HeaderMenu-trailing-link rounded-bottom-2 flex-shrink-0 mt-lg-4 px-lg-4 py-4 py-lg-3 f5 text-semibold"> <a href="/solutions"> View all solutions <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-right HeaderMenu-trailing-link-icon"> <path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path> </svg> </a> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Resources <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-topics-heading">Topics</span> <ul class="list-style-none f5" aria-labelledby="resources-topics-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ai&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ai_link_resources_navbar&quot;}" href="/resources/articles/ai"> AI </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_resources_navbar&quot;}" href="/resources/articles/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;security&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;security_link_resources_navbar&quot;}" href="/resources/articles/security"> Security </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;software_development&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;software_development_link_resources_navbar&quot;}" href="/resources/articles/software-development"> Software Development </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_link_resources_navbar&quot;}" href="/resources/articles"> View all </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="resources-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;learning_pathways&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;learning_pathways_link_resources_navbar&quot;}" href="https://resources.github.com/learn/pathways"> Learning Pathways <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;events_amp_webinars&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;events_amp_webinars_link_resources_navbar&quot;}" href="https://resources.github.com"> Events &amp; Webinars <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ebooks_amp_whitepapers&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ebooks_amp_whitepapers_link_resources_navbar&quot;}" href="https://github.com/resources/whitepapers"> Ebooks &amp; Whitepapers </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;customer_stories&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;customer_stories_link_resources_navbar&quot;}" href="https://github.com/customer-stories"> Customer Stories </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;partners&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;partners_link_resources_navbar&quot;}" href="https://partner.github.com"> Partners <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;executive_insights&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;executive_insights_link_resources_navbar&quot;}" href="https://github.com/solutions/executive-insights"> Executive Insights </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_sponsors&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_sponsors_link_open_source_navbar&quot;}" href="/sponsors"> <div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;the_readme_project&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;the_readme_project_link_open_source_navbar&quot;}" href="https://github.com/readme"> <div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="open-source-repositories-heading">Repositories</span> <ul class="list-style-none f5" aria-labelledby="open-source-repositories-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;topics&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;topics_link_open_source_navbar&quot;}" href="https://github.com/topics"> Topics </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;trending&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;trending_link_open_source_navbar&quot;}" href="https://github.com/trending"> Trending </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;collections&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;collections_link_open_source_navbar&quot;}" href="https://github.com/collections"> Collections </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Enterprise <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprise_platform&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprise_platform_link_enterprise_navbar&quot;}" href="/enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-stack color-fg-subtle mr-3"> <path d="M11.063 1.456a1.749 1.749 0 0 1 1.874 0l8.383 5.316a1.751 1.751 0 0 1 0 2.956l-8.383 5.316a1.749 1.749 0 0 1-1.874 0L2.68 9.728a1.751 1.751 0 0 1 0-2.956Zm1.071 1.267a.25.25 0 0 0-.268 0L3.483 8.039a.25.25 0 0 0 0 .422l8.383 5.316a.25.25 0 0 0 .268 0l8.383-5.316a.25.25 0 0 0 0-.422Z"></path><path d="M1.867 12.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path><path d="M1.867 16.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path> </svg> <div> <div class="color-fg-default h4">Enterprise platform</div> AI-powered developer platform </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="enterprise-available-add-ons-heading">Available add-ons</span> <ul class="list-style-none f5" aria-labelledby="enterprise-available-add-ons-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_advanced_security&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_advanced_security_link_enterprise_navbar&quot;}" href="https://github.com/security/advanced-security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Advanced Security</div> Enterprise-grade security features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;copilot_for_business&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;copilot_for_business_link_enterprise_navbar&quot;}" href="/features/copilot/copilot-business"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">Copilot for business</div> Enterprise-grade AI features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;premium_support&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;premium_support_link_enterprise_navbar&quot;}" href="/premium-support"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Premium Support</div> Enterprise-grade 24/7 support </div> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <a class="HeaderMenu-link no-underline px-0 px-lg-2 py-3 py-lg-2 d-block d-lg-inline-block" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;pricing&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;pricing_link_global_navbar&quot;}" href="https://github.com/pricing">Pricing</a> </li> </ul> </nav> <div class="d-flex flex-column flex-lg-row width-full flex-justify-end flex-lg-items-center text-center mt-3 mt-lg-0 text-lg-left ml-lg-3"> <qbsearch-input class="search-input" data-scope="repo:kyegomez/swarms" data-custom-scopes-path="/search/custom_scopes" data-delete-custom-scopes-csrf="MnrMN6DF8RfjqHABMs06XiPn_aSQcGXd8OTRd7NG7w3Okb7y9hcKEkI-EAQ99BC-I_7DhnvuysqjxzLktZdrWw" data-max-custom-scopes="10" data-header-redesign-enabled="false" data-initial-value="" data-blackbird-suggestions-path="/search/suggestions" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" data-current-repository="kyegomez/swarms" data-current-org="" data-current-owner="kyegomez" data-logged-in="false" data-copilot-chat-enabled="false" data-nl-search-enabled="false" data-retain-scroll-position="true"> <div class="search-input-container search-with-dialog position-relative d-flex flex-row flex-items-center mr-4 rounded" data-action="click:qbsearch-input#searchInputContainerClicked" > <button type="button" class="header-search-button placeholder input-button form-control d-flex flex-1 flex-self-stretch flex-items-center no-wrap width-full py-0 pl-2 pr-0 text-left border-0 box-shadow-none" data-target="qbsearch-input.inputButton" aria-label="Search or jump to…" aria-haspopup="dialog" placeholder="Search or jump to..." data-hotkey=s,/ autocapitalize="off" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;searchbar&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;input&quot;,&quot;label&quot;:&quot;searchbar_input_global_navbar&quot;}" data-action="click:qbsearch-input#handleExpand" > <div class="mr-2 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </div> <span class="flex-1" data-target="qbsearch-input.inputButtonText">Search or jump to...</span> <div class="d-flex" data-target="qbsearch-input.hotkeyIndicator"> <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg> </div> </button> <input type="hidden" name="type" class="js-site-search-type-field"> <div class="Overlay--hidden " data-modal-dialog-overlay> <modal-dialog data-action="close:qbsearch-input#handleClose cancel:qbsearch-input#handleClose" data-target="qbsearch-input.searchSuggestionsDialog" role="dialog" id="search-suggestions-dialog" aria-modal="true" aria-labelledby="search-suggestions-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto"> <h1 id="search-suggestions-dialog-header" class="sr-only">Search code, repositories, users, issues, pull requests...</h1> <div class="Overlay-body Overlay-body--paddingNone"> <div data-view-component="true"> <div class="search-suggestions position-fixed width-full color-shadow-large border color-fg-default color-bg-default overflow-hidden d-flex flex-column query-builder-container" style="border-radius: 12px;" data-target="qbsearch-input.queryBuilderContainer" hidden > <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="query-builder-test-form" action="" accept-charset="UTF-8" method="get"> <query-builder data-target="qbsearch-input.queryBuilder" id="query-builder-query-builder-test" data-filter-key=":" data-view-component="true" class="QueryBuilder search-query-builder"> <div class="FormControl FormControl--fullWidth"> <label id="query-builder-test-label" for="query-builder-test" class="FormControl-label sr-only"> Search </label> <div class="QueryBuilder-StyledInput width-fit " data-target="query-builder.styledInput" > <span id="query-builder-test-leadingvisual-wrap" class="FormControl-input-leadingVisualWrap QueryBuilder-leadingVisualWrap"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search FormControl-input-leadingVisual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </span> <div data-target="query-builder.styledInputContainer" class="QueryBuilder-StyledInputContainer"> <div aria-hidden="true" class="QueryBuilder-StyledInputContent" data-target="query-builder.styledInputContent" ></div> <div class="QueryBuilder-InputWrapper"> <div aria-hidden="true" class="QueryBuilder-Sizer" data-target="query-builder.sizer"></div> <input id="query-builder-test" name="query-builder-test" value="" autocomplete="off" type="text" role="combobox" spellcheck="false" aria-expanded="false" aria-describedby="validation-4ef26115-59c9-4d32-88b5-a671767d98b7" data-target="query-builder.input" data-action=" input:query-builder#inputChange blur:query-builder#inputBlur keydown:query-builder#inputKeydown focus:query-builder#inputFocus " data-view-component="true" class="FormControl-input QueryBuilder-Input FormControl-medium" /> </div> </div> <span class="sr-only" id="query-builder-test-clear">Clear</span> <button role="button" id="query-builder-test-clear-button" aria-labelledby="query-builder-test-clear query-builder-test-label" data-target="query-builder.clearButton" data-action=" click:query-builder#clear focus:query-builder#clearButtonFocus blur:query-builder#clearButtonBlur " variant="small" hidden="hidden" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium mr-1 px-2 py-0 d-flex flex-items-center rounded-1 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x-circle-fill Button-visual"> <path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path> </svg> </button> </div> <template id="search-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </template> <template id="code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="file-code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code"> <path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path> </svg> </template> <template id="history-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path> </svg> </template> <template id="repo-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> </template> <template id="bookmark-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark"> <path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="plus-circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-plus-circle"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7.25-3.25v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> </template> <template id="trash-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-trash"> <path d="M11 1.75V3h2.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75ZM4.496 6.675l.66 6.6a.25.25 0 0 0 .249.225h5.19a.25.25 0 0 0 .249-.225l.66-6.6a.75.75 0 0 1 1.492.149l-.66 6.6A1.748 1.748 0 0 1 10.595 15h-5.19a1.75 1.75 0 0 1-1.741-1.575l-.66-6.6a.75.75 0 1 1 1.492-.15ZM6.5 1.75V3h3V1.75a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25Z"></path> </svg> </template> <template id="team-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people"> <path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path> </svg> </template> <template id="project-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path> </svg> </template> <template id="pencil-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pencil"> <path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path> </svg> </template> <template id="copilot-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot"> <path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="copilot-error-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot-error"> <path d="M16 11.24c0 .112-.072.274-.21.467L13 9.688V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-.198 0-.388-.009-.571-.029L6.833 5.226a4.01 4.01 0 0 0 .17-.782c.117-.935-.037-1.395-.241-1.614-.193-.206-.637-.413-1.682-.297-.683.076-1.115.231-1.395.415l-1.257-.91c.579-.564 1.413-.877 2.485-.996 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095Zm-5.083-8.707c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Zm2.511 11.074c-1.393.776-3.272 1.428-5.43 1.428-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.18-.455-.241-.963-.252-1.475L.31 4.107A.747.747 0 0 1 0 3.509V3.49a.748.748 0 0 1 .625-.73c.156-.026.306.047.435.139l14.667 10.578a.592.592 0 0 1 .227.264.752.752 0 0 1 .046.249v.022a.75.75 0 0 1-1.19.596Zm-1.367-.991L5.635 7.964a5.128 5.128 0 0 1-.889.073c-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433 1.539 0 3.089-.505 4.063-.934Z"></path> </svg> </template> <template id="workflow-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-workflow"> <path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="book-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </template> <template id="code-review-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-review"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25v-8.5C0 1.784.784 1 1.75 1ZM1.5 2.75v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm5.28 1.72a.75.75 0 0 1 0 1.06L5.31 7l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.75.75 0 0 1 1.06 0Zm2.44 0a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L10.69 7 9.22 5.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="codespaces-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-codespaces"> <path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> </template> <template id="comment-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment"> <path d="M1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 13.25 12H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 13.543V12H2.75A1.75 1.75 0 0 1 1 10.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="comment-discussion-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </template> <template id="organization-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-organization"> <path d="M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="rocket-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-rocket"> <path d="M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </template> <template id="shield-check-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield-check"> <path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="heart-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heart"> <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> </svg> </template> <template id="server-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-server"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v4c0 .372-.116.717-.314 1 .198.283.314.628.314 1v4a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 12.75v-4c0-.358.109-.707.314-1a1.739 1.739 0 0 1-.314-1v-4C0 1.784.784 1 1.75 1ZM1.5 2.75v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm.25 5.75a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25ZM7 4.75A.75.75 0 0 1 7.75 4h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 7 4.75ZM7.75 10h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM3 4.75A.75.75 0 0 1 3.75 4h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 4.75ZM3.75 10h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="globe-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-globe"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z"></path> </svg> </template> <template id="issue-opened-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </template> <template id="device-mobile-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-mobile"> <path d="M3.75 0h8.5C13.216 0 14 .784 14 1.75v12.5A1.75 1.75 0 0 1 12.25 16h-8.5A1.75 1.75 0 0 1 2 14.25V1.75C2 .784 2.784 0 3.75 0ZM3.5 1.75v12.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </template> <template id="package-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-package"> <path d="m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"></path> </svg> </template> <template id="credit-card-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-credit-card"> <path d="M10.75 9a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5h-1.5Z"></path><path d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25ZM14.5 6.5h-13v5.75c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25Zm0-2.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25V5h13Z"></path> </svg> </template> <template id="play-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </template> <template id="gift-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-gift"> <path d="M2 2.75A2.75 2.75 0 0 1 4.75 0c.983 0 1.873.42 2.57 1.232.268.318.497.668.68 1.042.183-.375.411-.725.68-1.044C9.376.42 10.266 0 11.25 0a2.75 2.75 0 0 1 2.45 4h.55c.966 0 1.75.784 1.75 1.75v2c0 .698-.409 1.301-1 1.582v4.918A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25V9.332C.409 9.05 0 8.448 0 7.75v-2C0 4.784.784 4 1.75 4h.55c-.192-.375-.3-.8-.3-1.25ZM7.25 9.5H2.5v4.75c0 .138.112.25.25.25h4.5Zm1.5 0v5h4.5a.25.25 0 0 0 .25-.25V9.5Zm0-4V8h5.5a.25.25 0 0 0 .25-.25v-2a.25.25 0 0 0-.25-.25Zm-7 0a.25.25 0 0 0-.25.25v2c0 .138.112.25.25.25h5.5V5.5h-5.5Zm3-4a1.25 1.25 0 0 0 0 2.5h2.309c-.233-.818-.542-1.401-.878-1.793-.43-.502-.915-.707-1.431-.707ZM8.941 4h2.309a1.25 1.25 0 0 0 0-2.5c-.516 0-1 .205-1.43.707-.337.392-.646.975-.879 1.793Z"></path> </svg> </template> <template id="code-square-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-square"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="device-desktop-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-desktop"> <path d="M14.25 1c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 14.25 12h-3.727c.099 1.041.52 1.872 1.292 2.757A.752.752 0 0 1 11.25 16h-6.5a.75.75 0 0 1-.565-1.243c.772-.885 1.192-1.716 1.292-2.757H1.75A1.75 1.75 0 0 1 0 10.25v-7.5C0 1.784.784 1 1.75 1ZM1.75 2.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25ZM9.018 12H6.982a5.72 5.72 0 0 1-.765 2.5h3.566a5.72 5.72 0 0 1-.765-2.5Z"></path> </svg> </template> <div class="position-relative"> <ul role="listbox" class="ActionListWrap QueryBuilder-ListWrap" aria-label="Suggestions" data-action=" combobox-commit:query-builder#comboboxCommit mousedown:query-builder#resultsMousedown " data-target="query-builder.resultsList" data-persist-list=false id="query-builder-test-results" ></ul> </div> <div class="FormControl-inlineValidation" id="validation-4ef26115-59c9-4d32-88b5-a671767d98b7" hidden="hidden"> <span class="FormControl-inlineValidation--visual"> <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg> </span> <span></span> </div> </div> <div data-target="query-builder.screenReaderFeedback" aria-live="polite" aria-atomic="true" class="sr-only"></div> </query-builder></form> <div class="d-flex flex-row color-fg-muted px-3 text-small color-bg-default search-feedback-prompt"> <a target="_blank" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax" data-view-component="true" class="Link color-fg-accent text-normal ml-2">Search syntax tips</a> <div class="d-flex flex-1"></div> </div> </div> </div> </div> </modal-dialog></div> </div> <div data-action="click:qbsearch-input#retract" class="dark-backdrop position-fixed" hidden data-target="qbsearch-input.darkBackdrop"></div> <div class="color-fg-default"> <dialog-helper> <dialog data-target="qbsearch-input.feedbackDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="feedback-dialog" aria-modal="true" aria-labelledby="feedback-dialog-title" aria-describedby="feedback-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="feedback-dialog-title"> Provide feedback </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="feedback-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="feedback-dialog-title"> <div data-view-component="true" class="Overlay-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="code-search-feedback-form" data-turbo="false" action="/search/feedback" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="mM8DW57amefnPBBWSLzYFhDPFoeNg/mjv2XWv0qKBoHK7lWbnLulsHWdmBsB5xyIeHnydhie2IWH6JFdCa/zdQ==" /> <p>We read every piece of feedback, and take your input very seriously.</p> <textarea name="feedback" class="form-control width-full mb-2" style="height: 120px" id="feedback"></textarea> <input name="include_email" id="include_email" aria-label="Include my email address so I can be contacted" class="form-control mr-2" type="checkbox"> <label for="include_email" style="font-weight: normal">Include my email address so I can be contacted</label> </form></div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="feedback-dialog" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="code-search-feedback-form" data-action="click:qbsearch-input#submitFeedback" type="submit" data-view-component="true" class="btn-primary btn"> Submit feedback </button> </div> </dialog></dialog-helper> <custom-scopes data-target="qbsearch-input.customScopesManager"> <dialog-helper> <dialog data-target="custom-scopes.customScopesModalDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="custom-scopes-dialog" aria-modal="true" aria-labelledby="custom-scopes-dialog-title" aria-describedby="custom-scopes-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="custom-scopes-dialog-title"> Saved searches </h1> <h2 id="custom-scopes-dialog-description" class="Overlay-description">Use saved searches to filter your results more quickly</h2> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="custom-scopes-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="custom-scopes-dialog-title"> <div data-view-component="true" class="Overlay-body"> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <div hidden class="create-custom-scope-form" data-target="custom-scopes.createCustomScopeForm"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="custom-scopes-dialog-form" data-turbo="false" action="/search/custom_scopes" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="2iaKhorHFbueoWjcclMgSwlaZyv62RCsSrNWjdLz4M7baCGrIqzh5SuWAk+w+9+SCxZ/MH8Sc2SnyykxEq703w==" /> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <input type="hidden" id="custom_scope_id" name="custom_scope_id" data-target="custom-scopes.customScopesIdField"> <div class="form-group"> <label for="custom_scope_name">Name</label> <auto-check src="/search/custom_scopes/check_name" required only-validate-on-blur="false"> <input type="text" name="custom_scope_name" id="custom_scope_name" data-target="custom-scopes.customScopesNameField" class="form-control" autocomplete="off" placeholder="github-ruby" required maxlength="50"> <input type="hidden" data-csrf="true" value="r2LjRh7BkfLSF1W9Vp0aCxUdQ6ZelTza2c7KZ59aQc57yk86e8/aYaXGgQst3Qn90JidQKjqqKR1/cN7Ssk65Q==" /> </auto-check> </div> <div class="form-group"> <label for="custom_scope_query">Query</label> <input type="text" name="custom_scope_query" id="custom_scope_query" data-target="custom-scopes.customScopesQueryField" class="form-control" autocomplete="off" placeholder="(repo:mona/a OR repo:mona/b) AND lang:python" required maxlength="500"> </div> <p class="text-small color-fg-muted"> To see all available qualifiers, see our <a class="Link--inTextBlock" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax">documentation</a>. </p> </form> </div> <div data-target="custom-scopes.manageCustomScopesForm"> <div data-target="custom-scopes.list"></div> </div> </div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd Overlay-footer--divided"> <button data-action="click:custom-scopes#customScopesCancel" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="custom-scopes-dialog-form" data-action="click:custom-scopes#customScopesSubmit" data-target="custom-scopes.customScopesSubmitButton" type="submit" data-view-component="true" class="btn-primary btn"> Create saved search </button> </div> </dialog></dialog-helper> </custom-scopes> </div> </qbsearch-input> <div class="position-relative HeaderMenu-link-wrap d-lg-inline-block"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms" class="HeaderMenu-link HeaderMenu-link--sign-in HeaderMenu-button flex-shrink-0 no-underline d-none d-lg-inline-flex border border-lg-0 rounded rounded-lg-0 px-2 py-1" style="margin-left: 12px;" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="73952369c5468778ae10369f56e320d7bbb7b9820c46c1916df92a4a4f2d39be" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> <a href="/signup?ref_cta=Sign+up&amp;ref_loc=header+logged+out&amp;ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&amp;source=header-repo&amp;source_repo=kyegomez%2Fswarms" class="HeaderMenu-link HeaderMenu-link--sign-up HeaderMenu-button flex-shrink-0 d-flex d-lg-inline-flex no-underline border color-border-default rounded px-2 py-1" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="73952369c5468778ae10369f56e320d7bbb7b9820c46c1916df92a4a4f2d39be" data-analytics-event="{&quot;category&quot;:&quot;Sign up&quot;,&quot;action&quot;:&quot;click to sign up for account&quot;,&quot;label&quot;:&quot;ref_page:/&lt;user-name&gt;/&lt;repo-name&gt;;ref_cta:Sign up;ref_loc:header logged out&quot;}" > Sign up </a> <button type="button" class="sr-only js-header-menu-focus-trap d-block d-lg-none">Reseting focus</button> </div> </div> </div> </div> </header> <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <button id="icon-button-d9fea558-ebf5-4be9-826a-c62cf3316556" aria-labelledby="tooltip-cbc65c31-0714-4d35-982e-06be987c8567" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button><tool-tip id="tooltip-cbc65c31-0714-4d35-982e-06be987c8567" for="icon-button-d9fea558-ebf5-4be9-826a-c62cf3316556" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip> </div> </div> <div id="start-of-content" class="show-on-focus"></div> <div id="js-flash-container" class="flash-container" data-turbo-replace> <template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div> </div> </div> </div> </template> </div> <div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled data-project-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" > <div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--page-header-bgColor, var(--color-page-header-bg));" data-turbo-replace> <div class="d-flex flex-nowrap flex-justify-end mb-3 px-3 px-lg-5" style="gap: 1rem;"> <div class="flex-auto min-width-0 width-fit"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> <span class="author flex-self-stretch" itemprop="author"> <a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/kyegomez/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/kyegomez"> kyegomez </a> </span> <span class="mx-1 flex-self-stretch color-fg-muted">/</span> <strong itemprop="name" class="mr-2 flex-self-stretch"> <a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/kyegomez/swarms">swarms</a> </strong> <span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span> </div> </div> <div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;"> <ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;"> <li> <include-fragment src="/kyegomez/swarms/sponsor_button"></include-fragment> </li> <li> <a href="/login?return_to=%2Fkyegomez%2Fswarms" rel="nofollow" id="repository-details-watch-button" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;notification subscription menu watch&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="311165c5789e4ba230a6f25f56140c042994bccae816f4386c4d1edaf1c0269c" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-ac22727f-a6d0-4112-a9ee-95eee1a38361" for="repository-details-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </li> <li> <a icon="repo-forked" id="fork-button" href="/login?return_to=%2Fkyegomez%2Fswarms" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;repo details fork button&quot;,&quot;repository_id&quot;:639195966,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9fc73b0078a40459cf505e68a7669a291bb780b06224f20df648b52226974e79" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg>Fork <span id="repo-network-counter" data-pjax-replace="true" data-turbo-replace="true" title="541" data-view-component="true" class="Counter">541</span> </a> </li> <li> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2Fkyegomez%2Fswarms" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;star button&quot;,&quot;repository_id&quot;:639195966,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b0fb59525773b4c9c500590bce6c620c80c348e73d9c87f71073b0ecd0d1782f" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> <span id="repo-stars-counter-star" aria-label="4767 users starred this repository" data-singular-suffix="user starred this repository" data-plural-suffix="users starred this repository" data-turbo-replace="true" title="4,767" data-view-component="true" class="Counter js-social-count">4.8k</span> </a></div> </li> </ul> </div> </div> <div id="responsive-meta-container" data-turbo-replace> <div class="d-block d-md-none mb-2 px-3 px-md-4 px-lg-5"> <p class="f4 mb-3 "> The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: <a href="https://swarms.ai" class="Link--inTextBlock" rel="nofollow">https://swarms.ai</a> </p> <div class="mb-2 d-flex flex-items-center Link--secondary"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link flex-shrink-0 mr-2"> <path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path> </svg> <span class="flex-auto min-width-0 css-truncate css-truncate-target width-fit"> <a title="https://docs.swarms.world" role="link" target="_blank" class="text-bold" rel="noopener noreferrer" href="https://docs.swarms.world">docs.swarms.world</a> </span> </div> <h3 class="sr-only">License</h3> <div class="mb-2"> <a href="/kyegomez/swarms/blob/master/LICENSE" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:license&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> Apache-2.0 license </a> </div> <div class="mb-3"> <a class="Link--secondary no-underline mr-3" href="/kyegomez/swarms/stargazers"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-1"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <span class="text-bold">4.8k</span> stars </a> <a class="Link--secondary no-underline mr-3" href="/kyegomez/swarms/forks"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-1"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <span class="text-bold">541</span> forks </a> <a class="Link--secondary no-underline mr-3 d-inline-block" href="/kyegomez/swarms/branches"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch mr-1"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path> </svg> <span>Branches</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/kyegomez/swarms/tags"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tag mr-1"> <path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path> </svg> <span>Tags</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/kyegomez/swarms/activity"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-1"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span>Activity</span> </a> </div> <div class="d-flex flex-wrap gap-2"> <div class="flex-1"> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2Fkyegomez%2Fswarms" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;star button&quot;,&quot;repository_id&quot;:639195966,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b0fb59525773b4c9c500590bce6c620c80c348e73d9c87f71073b0ecd0d1782f" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> </a></div> </div> <div class="flex-1"> <a href="/login?return_to=%2Fkyegomez%2Fswarms" rel="nofollow" id="files-overview-watch-button" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;notification subscription menu watch&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/kyegomez/swarms&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="311165c5789e4ba230a6f25f56140c042994bccae816f4386c4d1edaf1c0269c" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-cb6e3703-1259-454d-96ca-ab69b9bf8a97" for="files-overview-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </div> <span> </span> </div> </div> </div> <nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5"> <ul data-view-component="true" class="UnderlineNav-body list-style-none"> <li data-view-component="true" class="d-inline-flex"> <a id="code-tab" href="/kyegomez/swarms" data-tab-item="i0code-tab" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments repo_attestations /kyegomez/swarms" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g c" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Code&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" aria-current="page" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item selected"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> <span data-content="Code">Code</span> <span id="code-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="issues-tab" href="/kyegomez/swarms/issues" data-tab-item="i1issues-tab" data-selected-links="repo_issues repo_labels repo_milestones /kyegomez/swarms/issues" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g i" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Issues&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> <span data-content="Issues">Issues</span> <span id="issues-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="12" data-view-component="true" class="Counter">12</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="pull-requests-tab" href="/kyegomez/swarms/pulls" data-tab-item="i2pull-requests-tab" data-selected-links="repo_pulls checks /kyegomez/swarms/pulls" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g p" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Pull requests&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> <span data-content="Pull requests">Pull requests</span> <span id="pull-requests-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="18" data-view-component="true" class="Counter">18</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="discussions-tab" href="/kyegomez/swarms/discussions" data-tab-item="i3discussions-tab" data-selected-links="repo_discussions /kyegomez/swarms/discussions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g g" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Discussions&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> <span data-content="Discussions">Discussions</span> <span id="discussions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="actions-tab" href="/kyegomez/swarms/actions" data-tab-item="i4actions-tab" data-selected-links="repo_actions /kyegomez/swarms/actions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g a" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Actions&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> <span data-content="Actions">Actions</span> <span id="actions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="projects-tab" href="/kyegomez/swarms/projects" data-tab-item="i5projects-tab" data-selected-links="repo_projects new_repo_project repo_project /kyegomez/swarms/projects" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g b" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Projects&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> <span data-content="Projects">Projects</span> <span id="projects-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="1" data-view-component="true" class="Counter">1</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="security-tab" href="/kyegomez/swarms/security" data-tab-item="i6security-tab" data-selected-links="security overview alerts policy token_scanning code_scanning /kyegomez/swarms/security" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g s" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Security&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span data-content="Security">Security</span> <include-fragment src="/kyegomez/swarms/security/overall-count" accept="text/fragment+html"></include-fragment> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="insights-tab" href="/kyegomez/swarms/pulse" data-tab-item="i7insights-tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people community /kyegomez/swarms/pulse" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Insights&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> <span data-content="Insights">Insights</span> <span id="insights-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> </ul> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button id="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-button" popovertarget="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-overlay" aria-controls="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-list" aria-haspopup="true" aria-labelledby="tooltip-7f79bbb4-9f73-4df6-96ce-e23f84e16773" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium UnderlineNav-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7f79bbb4-9f73-4df6-96ce-e23f84e16773" for="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Additional navigation options</tool-tip> <anchored-position data-target="action-menu.overlay" id="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-overlay" anchor="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true"> <div data-view-component="true" class="Overlay Overlay--size-auto"> <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list> <div data-view-component="true"> <ul aria-labelledby="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-button" id="action-menu-653ef66b-89d1-49db-8a64-d4c23a98a3d7-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li hidden="hidden" data-menu-item="i0code-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-b2063969-dd95-442e-99fa-cb2ad88be6bd" href="/kyegomez/swarms" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Code </span> </a> </li> <li hidden="hidden" data-menu-item="i1issues-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-a5a57adc-5767-4a49-a1ae-60adee7eb484" href="/kyegomez/swarms/issues" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Issues </span> </a> </li> <li hidden="hidden" data-menu-item="i2pull-requests-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-99f5756e-b89e-47ca-81ad-049678705bdb" href="/kyegomez/swarms/pulls" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Pull requests </span> </a> </li> <li hidden="hidden" data-menu-item="i3discussions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-cbcbf60f-697b-4c0f-ab06-e036cd7e54f7" href="/kyegomez/swarms/discussions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Discussions </span> </a> </li> <li hidden="hidden" data-menu-item="i4actions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-153fd202-e6c2-4312-a80b-1e3d987ce953" href="/kyegomez/swarms/actions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Actions </span> </a> </li> <li hidden="hidden" data-menu-item="i5projects-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-13f6fd05-3f31-4f92-8eaf-ad6c747b6731" href="/kyegomez/swarms/projects" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Projects </span> </a> </li> <li hidden="hidden" data-menu-item="i6security-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-d7b7627c-7e5a-4de5-bf12-bbd976ca562d" href="/kyegomez/swarms/security" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Security </span> </a> </li> <li hidden="hidden" data-menu-item="i7insights-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-d9b0df00-8d84-4b02-ab86-f5c0bbb11327" href="/kyegomez/swarms/pulse" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Insights </span> </a> </li> </ul> </div></action-list> </div> </div></anchored-position> </focus-group> </action-menu></div> </nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <h1 class='sr-only'>kyegomez/swarms</h1> <div class="clearfix container-xl px-md-4 px-lg-5 px-3"> <div> <div style="max-width: 100%" data-view-component="true" class="Layout Layout--flowRow-until-md react-repos-overview-margin Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end"> <div data-view-component="true" class="Layout-main"> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_dompurify_dist_purify_es_mjs-dd1d3ea6a436.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_tanstack_query-core_build_modern_queryObserver_js-node_modules_tanstack_-defd52-843b41414e0e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_aria-live_aria-live_ts-ui_packages_history_history_ts-ui_packages_promise-with-re-01dc80-b13b6c1d97b0.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_paths_index_ts-3adbcf6faa83.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ref-selector_RefSelector_tsx-7496afc3784d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_commit-attribution_index_ts-ui_packages_commit-checks-status_index_ts-ui_packages-762eaa-4cd444e23e10.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_code-view-shared_hooks_use-canonical-object_ts-ui_packages_code-view-shared_hooks-c2dbff-e7edabd0b260.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repos-overview-387f52b9d38d.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.d6748be77dac223f42c9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repos-overview.0ee7cac3ab511a65d9f9.module.css" /> <react-partial partial-name="repos-overview" data-ssr="true" data-attempted-ssr="true" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":639195966,"defaultBranch":"master","name":"swarms","ownerLogin":"kyegomez","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-05-11T01:09:00.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/98760976?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1743417762.0","canEdit":false,"refType":"branch","currentOid":"09159905b067cf1257411e3144d248e941087282"},"tree":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"images","path":"images","contentType":"directory"},{"name":"swarms","path":"swarms","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".dockerignore","path":".dockerignore","contentType":"file"},{"name":".env.example","path":".env.example","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Dockerfile","path":"Dockerfile","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"agent_tools_dict_example.py","path":"agent_tools_dict_example.py","contentType":"file"},{"name":"deep_research_swarm_example.py","path":"deep_research_swarm_example.py","contentType":"file"},{"name":"example.py","path":"example.py","contentType":"file"},{"name":"groupchat_example.py","path":"groupchat_example.py","contentType":"file"},{"name":"hybrid_hiearchical_swarm.py","path":"hybrid_hiearchical_swarm.py","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"sequential_swarm_example.py","path":"sequential_swarm_example.py","contentType":"file"},{"name":"swarms_logo_new.png","path":"swarms_logo_new.png","contentType":"file"},{"name":"swarms_logo_svg.svg","path":"swarms_logo_svg.svg","contentType":"file"},{"name":"swarms_of_browser_agents.py","path":"swarms_of_browser_agents.py","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":26,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/kyegomez/swarms/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/kyegomez/swarms.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone kyegomez/swarms","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms","zipballUrl":"/kyegomez/swarms/archive/refs/heads/master.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=639195966"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"3,552","overviewFiles":[{"displayName":"README.md","repoName":"swarms","refName":"master","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv align=\"center\" dir=\"auto\"\u003e\n \u003ca href=\"https://swarms.world\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://github.com/kyegomez/swarms/raw/master/images/swarmslogobanner.png\" width=\"50%\" alt=\"Logo\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/div\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \u003cem\u003eThe Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework \u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \u003ca href=\"https://pypi.org/project/swarms/\" rel=\"nofollow\"\u003e\n \u003cimg alt=\"Python\" src=\"https://camo.githubusercontent.com/0d0779a129f1dcf6c31613b701fe0646fd4e4d2ed2a7cbd61b27fd5514baa938/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d3336373041303f7374796c653d666f722d7468652d6261646765266c6f676f3d707974686f6e266c6f676f436f6c6f723d666664643534\" data-canonical-src=\"https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026amp;logo=python\u0026amp;logoColor=ffdd54\" style=\"max-width: 100%;\"\u003e\n \u003cimg alt=\"Version\" src=\"https://camo.githubusercontent.com/fd776c0e79f672bd54e0ab7a8db04006d534eb1ffdee0e3bb4b5ceee2d246174/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f737761726d733f7374796c653d666f722d7468652d626164676526636f6c6f723d333637304130\" data-canonical-src=\"https://img.shields.io/pypi/v/swarms?style=for-the-badge\u0026amp;color=3670A0\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \u003ca href=\"https://twitter.com/swarms_corp/\" rel=\"nofollow\"\u003e🐦 Twitter\u003c/a\u003e\n \u003cspan\u003e  •  \u003c/span\u003e\n \u003ca href=\"https://discord.gg/jM3Z6M9uMq\" rel=\"nofollow\"\u003e📢 Discord\u003c/a\u003e\n \u003cspan\u003e  •  \u003c/span\u003e\n \u003ca href=\"https://swarms.world\" rel=\"nofollow\"\u003eSwarms Platform\u003c/a\u003e\n \u003cspan\u003e  •  \u003c/span\u003e\n \u003ca href=\"https://docs.swarms.world\" rel=\"nofollow\"\u003e📙 Documentation\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \n \u003ca href=\"https://discord.gg/jHnrkH5y\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/ec5d39ab0ea8e734562352ef135e2937a2526002b90e9a432d0cb29c695b5c1d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d4a6f696e2532306f75722532307365727665722d3538363546323f7374796c653d666f722d7468652d6261646765266c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465\" alt=\"Discord\" data-canonical-src=\"https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge\u0026amp;logo=discord\u0026amp;logoColor=white\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://www.youtube.com/@kyegomez3242\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/aafea284ffcbb063291ec2cc2803493982e65fa18967a211c5b5c689170c217b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d796f7574756265266c6f676f436f6c6f723d7768697465\" alt=\"YouTube\" data-canonical-src=\"https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge\u0026amp;logo=youtube\u0026amp;logoColor=white\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://www.linkedin.com/in/kye-g-38759a207/\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/e0b5da352ded24c34c027e1826bc2c4d780976b2bdabca57eff4ca185ff7ba56/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e6b6564496e2d436f6e6e6563742d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465\" alt=\"LinkedIn\" data-canonical-src=\"https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge\u0026amp;logo=linkedin\u0026amp;logoColor=white\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://x.com/kyegomezb\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/527cd512620074e605797b2bb8d9cc4cf6077dcfdfcc8593ea8ac2cadc5fcb19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582e636f6d2d466f6c6c6f772d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d78266c6f676f436f6c6f723d7768697465\" alt=\"X.com\" data-canonical-src=\"https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge\u0026amp;logo=x\u0026amp;logoColor=white\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \n \u003ca href=\"https://github.com/kyegomez/swarms/issues\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/00bec3acef6f98e656861315bc4c91fe84916d8bc62c137ed41f8b2ddaf7e914/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b7965676f6d657a2f737761726d73\" alt=\"GitHub issues\" data-canonical-src=\"https://img.shields.io/github/issues/kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://github.com/kyegomez/swarms/network\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/8eaa30347f43ad4ce51f02d9cbb0eed8b23c8c13a7afd659354722b59219a456/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b7965676f6d657a2f737761726d73\" alt=\"GitHub forks\" data-canonical-src=\"https://img.shields.io/github/forks/kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://github.com/kyegomez/swarms/stargazers\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/391c60b0f711c97f9d65c1c28695e6e8a63e4c4d4559e5c7da8a533504423783/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b7965676f6d657a2f737761726d73\" alt=\"GitHub stars\" data-canonical-src=\"https://img.shields.io/github/stars/kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://github.com/kyegomez/swarms/blob/main/LICENSE\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/f8b90c5c7a49e648b5b00b145088fbed23120b42bdc3d2f1ec2c6cea848fa749/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b7965676f6d657a2f737761726d73\" alt=\"GitHub license\" data-canonical-src=\"https://img.shields.io/github/license/kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://star-history.com/#kyegomez/swarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/b26b12a70c0dc1f7bbe557ce950e9274aa0828e42bd6f3cd56c8a4c2400299d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b7965676f6d657a2f737761726d733f7374796c653d736f6369616c\" alt=\"GitHub star chart\" data-canonical-src=\"https://img.shields.io/github/stars/kyegomez/swarms?style=social\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://libraries.io/github/kyegomez/swarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/9f70f43fae383a9247fae655732db89d029cb97158e46be2fa337e89292aed96/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f6769746875622f6b7965676f6d657a2f737761726d73\" alt=\"Dependency Status\" data-canonical-src=\"https://img.shields.io/librariesio/github/kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://pepy.tech/project/swarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/5ea1d0aa70949d7694eb10af0d5a1496be40e1f8d29c305ddc55b53c0f6e4c2e/68747470733a2f2f7374617469632e706570792e746563682f62616467652f737761726d732f6d6f6e7468\" alt=\"Downloads\" data-canonical-src=\"https://static.pepy.tech/badge/swarms/month\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \n \u003ca href=\"https://twitter.com/intent/tweet?text=Check%20out%20this%20amazing%20AI%20project:%20\u0026amp;url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/8248229d11b8940b0da7bf960e9513f0b0b992b1983d99b33294100b6fb7b084/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f747769747465722e636f6d2f636c6f7564706f7373652e7376673f7374796c653d736f6369616c266c6162656c3d53686172652532302534306b7965676f6d657a2f737761726d73\" alt=\"Share on Twitter\" data-canonical-src=\"https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social\u0026amp;label=Share%20%40kyegomez/swarms\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/6c248e1fd1637ea7b2079e2bd96a52f93b571a51634c945a3e66fce90c122d09/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53686172652d25323066616365626f6f6b2d626c7565\" alt=\"Share on Facebook\" data-canonical-src=\"https://img.shields.io/badge/Share-%20facebook-blue\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://www.linkedin.com/shareArticle?mini=true\u0026amp;url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\u0026amp;title=\u0026amp;summary=\u0026amp;source=\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/87f9e6aa813f4063b8ec782608f80fbccaa8c1db2e38ae8c08a2048cdedc578b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53686172652d2532306c696e6b6564696e2d626c7565\" alt=\"Share on LinkedIn\" data-canonical-src=\"https://img.shields.io/badge/Share-%20linkedin-blue\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \n \u003ca href=\"https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\u0026amp;title=Swarms%20-%20the%20future%20of%20AI\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/527db5a7e12a8f17a3ac8250354e7fe5e4634299df15db613b3f9568cddef5de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e2532305265646469742d6f72616e6765\" alt=\"Share on Reddit\" data-canonical-src=\"https://img.shields.io/badge/-Share%20on%20Reddit-orange\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\u0026amp;t=Swarms%20-%20the%20future%20of%20AI\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/be9df7ef81bcb6fd2ad7a264d4a5b590566edb15fb0c62ffb5b54a0eca953ead/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e2532304861636b65722532304e6577732d6f72616e6765\" alt=\"Share on Hacker News\" data-canonical-src=\"https://img.shields.io/badge/-Share%20on%20Hacker%20News-orange\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\u0026amp;media=https%3A%2F%2Fexample.com%2Fimage.jpg\u0026amp;description=Swarms%20-%20the%20future%20of%20AI\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/4b6034195204e3f8790ae64038d7c4a7882b0fc559454f81701b237f167ac412/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e25323050696e7465726573742d726564\" alt=\"Share on Pinterest\" data-canonical-src=\"https://img.shields.io/badge/-Share%20on%20Pinterest-red\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://api.whatsapp.com/send?text=Check%20out%20Swarms%20-%20the%20future%20of%20AI%20%23swarms%20%23AI%0A%0Ahttps%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms\" rel=\"nofollow\"\u003e\n \u003cimg src=\"https://camo.githubusercontent.com/fa6d5b13ef58aee29b4bf3a50e832a854c2da4c28b6a4c48644c0820b4186662/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e25323057686174734170702d677265656e\" alt=\"Share on WhatsApp\" data-canonical-src=\"https://img.shields.io/badge/-Share%20on%20WhatsApp-green\" style=\"max-width: 100%;\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e✨ Features\u003c/h2\u003e\u003ca id=\"user-content--features\" class=\"anchor\" aria-label=\"Permalink: ✨ Features\" href=\"#-features\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eCategory\u003c/th\u003e\n\u003cth\u003eFeatures\u003c/th\u003e\n\u003cth\u003eBenefits\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e🏢 Enterprise Architecture\u003c/td\u003e\n\u003ctd\u003e• Production-Ready Infrastructure\u003cbr\u003e• High Reliability Systems\u003cbr\u003e• Modular Design\u003cbr\u003e• Comprehensive Logging\u003c/td\u003e\n\u003ctd\u003e• Reduced downtime\u003cbr\u003e• Easier maintenance\u003cbr\u003e• Better debugging\u003cbr\u003e• Enhanced monitoring\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🤖 Agent Orchestration\u003c/td\u003e\n\u003ctd\u003e• Hierarchical Swarms\u003cbr\u003e• Parallel Processing\u003cbr\u003e• Sequential Workflows\u003cbr\u003e• Graph-based Workflows\u003cbr\u003e• Dynamic Agent Rearrangement\u003c/td\u003e\n\u003ctd\u003e• Complex task handling\u003cbr\u003e• Improved performance\u003cbr\u003e• Flexible workflows\u003cbr\u003e• Optimized execution\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🔄 Integration Capabilities\u003c/td\u003e\n\u003ctd\u003e• Multi-Model Support\u003cbr\u003e• Custom Agent Creation\u003cbr\u003e• Extensive Tool Library\u003cbr\u003e• Multiple Memory Systems\u003c/td\u003e\n\u003ctd\u003e• Provider flexibility\u003cbr\u003e• Custom solutions\u003cbr\u003e• Extended functionality\u003cbr\u003e• Enhanced memory management\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e📈 Scalability\u003c/td\u003e\n\u003ctd\u003e• Concurrent Processing\u003cbr\u003e• Resource Management\u003cbr\u003e• Load Balancing\u003cbr\u003e• Horizontal Scaling\u003c/td\u003e\n\u003ctd\u003e• Higher throughput\u003cbr\u003e• Efficient resource use\u003cbr\u003e• Better performance\u003cbr\u003e• Easy scaling\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🛠️ Developer Tools\u003c/td\u003e\n\u003ctd\u003e• Simple API\u003cbr\u003e• Extensive Documentation\u003cbr\u003e• Active Community\u003cbr\u003e• CLI Tools\u003c/td\u003e\n\u003ctd\u003e• Faster development\u003cbr\u003e• Easy learning curve\u003cbr\u003e• Community support\u003cbr\u003e• Quick deployment\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🔐 Security Features\u003c/td\u003e\n\u003ctd\u003e• Error Handling\u003cbr\u003e• Rate Limiting\u003cbr\u003e• Monitoring Integration\u003cbr\u003e• Audit Logging\u003c/td\u003e\n\u003ctd\u003e• Improved reliability\u003cbr\u003e• API protection\u003cbr\u003e• Better monitoring\u003cbr\u003e• Enhanced tracking\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e📊 Advanced Features\u003c/td\u003e\n\u003ctd\u003e• SpreadsheetSwarm\u003cbr\u003e• Group Chat\u003cbr\u003e• Agent Registry\u003cbr\u003e• Mixture of Agents\u003c/td\u003e\n\u003ctd\u003e• Mass agent management\u003cbr\u003e• Collaborative AI\u003cbr\u003e• Centralized control\u003cbr\u003e• Complex solutions\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🔌 Provider Support\u003c/td\u003e\n\u003ctd\u003e• OpenAI\u003cbr\u003e• Anthropic\u003cbr\u003e• ChromaDB\u003cbr\u003e• Custom Providers\u003c/td\u003e\n\u003ctd\u003e• Provider flexibility\u003cbr\u003e• Storage options\u003cbr\u003e• Custom integration\u003cbr\u003e• Vendor independence\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e💪 Production Features\u003c/td\u003e\n\u003ctd\u003e• Automatic Retries\u003cbr\u003e• Async Support\u003cbr\u003e• Environment Management\u003cbr\u003e• Type Safety\u003c/td\u003e\n\u003ctd\u003e• Better reliability\u003cbr\u003e• Improved performance\u003cbr\u003e• Easy configuration\u003cbr\u003e• Safer code\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🎯 Use Case Support\u003c/td\u003e\n\u003ctd\u003e• Task-Specific Agents\u003cbr\u003e• Custom Workflows\u003cbr\u003e• Industry Solutions\u003cbr\u003e• Extensible Framework\u003c/td\u003e\n\u003ctd\u003e• Quick deployment\u003cbr\u003e• Flexible solutions\u003cbr\u003e• Industry readiness\u003cbr\u003e• Easy customization\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRequirements\u003c/h2\u003e\u003ca id=\"user-content-requirements\" class=\"anchor\" aria-label=\"Permalink: Requirements\" href=\"#requirements\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003epython3.10\u003c/code\u003e or above!\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e$ pip install -U swarms\u003c/code\u003e And, don't forget to install swarms!\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.env\u003c/code\u003e file with API keys from your providers like \u003ccode\u003eOPENAI_API_KEY\u003c/code\u003e, \u003ccode\u003eANTHROPIC_API_KEY\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eSet an \u003ccode\u003e.env\u003c/code\u003e Variable with your desired workspace dir: \u003ccode\u003eWORKSPACE_DIR=\"agent_workspace\"\u003c/code\u003e or do it in your terminal with \u003ccode\u003eexport WORKSPACE_DIR=\"agent_workspace\"\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eFinally, \u003ccode\u003eswarms onboarding\u003c/code\u003e to get you started.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGuides and Walkthroughs\u003c/h2\u003e\u003ca id=\"user-content-guides-and-walkthroughs\" class=\"anchor\" aria-label=\"Permalink: Guides and Walkthroughs\" href=\"#guides-and-walkthroughs\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eRefer to our documentation for production grade implementation details.\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSection\u003c/th\u003e\n\u003cth\u003eLinks\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eInstallation\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/install/install/\" rel=\"nofollow\"\u003eInstallation\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQuickstart\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/install/quickstart/\" rel=\"nofollow\"\u003eGet Started\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAgent Internal Mechanisms\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/framework/agents_explained/\" rel=\"nofollow\"\u003eAgent Architecture\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAgent API\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/agent/\" rel=\"nofollow\"\u003eAgent API\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eIntegrating External Agents Griptape, Autogen, etc\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/agents/external_party_agents/\" rel=\"nofollow\"\u003eIntegrating External APIs\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCreating Agents from YAML\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/agents/create_agents_yaml/\" rel=\"nofollow\"\u003eCreating Agents from YAML\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eWhy You Need Swarms\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/why/\" rel=\"nofollow\"\u003eWhy MultiAgent Collaboration is Necessary\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSwarm Architectures Analysis\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/\" rel=\"nofollow\"\u003eSwarm Architectures\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eChoosing the Right Swarm for Your Business Problem¶\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/\" rel=\"nofollow\"\u003eCLICK HERE\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAgentRearrange Docs\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/\" rel=\"nofollow\"\u003eCLICK HERE\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstall 💻\u003c/h2\u003e\u003ca id=\"user-content-install-\" class=\"anchor\" aria-label=\"Permalink: Install 💻\" href=\"#install-\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eInstall the following packages with copy and paste\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ pip3 install -U swarms swarms-memory\"\u003e\u003cpre\u003e$ pip3 install -U swarms swarms-memory\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e[Optional] Onboarding\u003c/h2\u003e\u003ca id=\"user-content-optional-onboarding\" class=\"anchor\" aria-label=\"Permalink: [Optional] Onboarding\" href=\"#optional-onboarding\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eNow that you have downloaded swarms with \u003ccode\u003epip3 install -U swarms\u003c/code\u003e, we get access to the \u003ccode\u003eCLI\u003c/code\u003e. Get Onboarded with CLI Now with:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"swarms onboarding\"\u003e\u003cpre\u003eswarms onboarding\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can also run this command for help:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"swarms help\"\u003e\u003cpre\u003eswarms \u003cspan class=\"pl-c1\"\u003ehelp\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor more documentation on the CLI \u003ca href=\"https://docs.swarms.world/en/latest/swarms/cli/main/\" rel=\"nofollow\"\u003eCLICK HERE\u003c/a\u003e\u003c/p\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUsage Examples 🤖\u003c/h1\u003e\u003ca id=\"user-content-usage-examples-\" class=\"anchor\" aria-label=\"Permalink: Usage Examples 🤖\" href=\"#usage-examples-\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eHere are some example scripts to get you started. For more comprehensive documentation, visit our \u003ca href=\"https://docs.swarms.world/en/latest/\" rel=\"nofollow\"\u003edocs\u003c/a\u003e.\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eExample Name\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eType of Examples\u003c/th\u003e\n\u003cth\u003eLink\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eSwarms Examples\u003c/td\u003e\n\u003ctd\u003eA collection of simple examples to demonstrate Swarms capabilities.\u003c/td\u003e\n\u003ctd\u003eBasic Usage\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/The-Swarm-Corporation/swarms-examples?tab=readme-ov-file\"\u003ehttps://github.com/The-Swarm-Corporation/swarms-examples?tab=readme-ov-file\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCookbook\u003c/td\u003e\n\u003ctd\u003eA comprehensive guide with recipes for various use cases and scenarios.\u003c/td\u003e\n\u003ctd\u003eAdvanced Usage\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/The-Swarm-Corporation/Cookbook\"\u003ehttps://github.com/The-Swarm-Corporation/Cookbook\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eAgent\u003c/code\u003e Class\u003c/h2\u003e\u003ca id=\"user-content-agent-class\" class=\"anchor\" aria-label=\"Permalink: Agent Class\" href=\"#agent-class\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eAgent\u003c/code\u003e class is a fundamental component of the Swarms framework, designed to execute tasks autonomously. It fuses llms, tools and long-term memory capabilities to create a full stack agent. The \u003ccode\u003eAgent\u003c/code\u003e class is highly customizable, allowing for fine-grained control over its behavior and interactions.\u003c/p\u003e\n\u003csection class=\"js-render-needs-enrichment render-needs-enrichment position-relative\" data-identity=\"a0f46d5a-7002-4128-be87-a29463a8ed6d\" data-host=\"https://viewscreen.githubusercontent.com\" data-src=\"https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com\" data-type=\"mermaid\" aria-label=\"mermaid rendered output container\"\u003e\n \u003cdiv class=\"js-render-enrichment-target\" data-json=\"{\u0026quot;data\u0026quot;:\u0026quot;graph TD\\n A[Agent] --\u0026amp;gt; B[Initialize]\\n B --\u0026amp;gt; C[Process Task]\\n C --\u0026amp;gt; D[Execute Tools]\\n D --\u0026amp;gt; E[Generate Response]\\n E --\u0026amp;gt; F[Return Output]\\n C --\u0026amp;gt; G[Long-term Memory]\\n G --\u0026amp;gt; C\\n\u0026quot;}\" data-plain=\"graph TD\n A[Agent] --\u0026gt; B[Initialize]\n B --\u0026gt; C[Process Task]\n C --\u0026gt; D[Execute Tools]\n D --\u0026gt; E[Generate Response]\n E --\u0026gt; F[Return Output]\n C --\u0026gt; G[Long-term Memory]\n G --\u0026gt; C\n\" dir=\"auto\"\u003e\n \u003cdiv class=\"render-plaintext-hidden\" dir=\"auto\"\u003e\n \u003cpre lang=\"mermaid\" aria-label=\"Raw mermaid code\"\u003egraph TD\n A[Agent] --\u0026gt; B[Initialize]\n B --\u0026gt; C[Process Task]\n C --\u0026gt; D[Execute Tools]\n D --\u0026gt; E[Generate Response]\n E --\u0026gt; F[Return Output]\n C --\u0026gt; G[Long-term Memory]\n G --\u0026gt; C\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cspan class=\"js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full\" style=\"min-height:100px\" role=\"presentation\"\u003e\n \u003cspan data-view-component=\"true\"\u003e\n \u003csvg style=\"box-sizing: content-box; color: var(--color-icon-primary);\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" data-view-component=\"true\" class=\"octospinner mx-auto anim-rotate\"\u003e\n \u003ccircle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-opacity=\"0.25\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" fill=\"none\"\u003e\u003c/circle\u003e\n \u003cpath d=\"M15 8a7.002 7.002 0 00-7-7\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" vector-effect=\"non-scaling-stroke\"\u003e\u003c/path\u003e\n\u003c/svg\u003e \u003cspan class=\"sr-only\"\u003eLoading\u003c/span\u003e\n\u003c/span\u003e\n \u003c/span\u003e\n\u003c/section\u003e\n\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003erun\u003c/code\u003e Method\u003c/h3\u003e\u003ca id=\"user-content-run-method\" class=\"anchor\" aria-label=\"Permalink: run Method\" href=\"#run-method\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method is the primary entry point for executing tasks with an \u003ccode\u003eAgent\u003c/code\u003e instance. It accepts a task string as the main input task and processes it according to the agent's configuration. And, it can also accept an \u003ccode\u003eimg\u003c/code\u003e parameter such as \u003ccode\u003eimg=\"image_filepath.png\u003c/code\u003e to process images if you have a VLM attached such as \u003ccode\u003eGPT4VisionAPI\u003c/code\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSimple Example\u003c/h2\u003e\u003ca id=\"user-content-simple-example\" class=\"anchor\" aria-label=\"Permalink: Simple Example\" href=\"#simple-example\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from swarms import Agent\n\nagent = Agent(\n agent_name=\u0026quot;Stock-Analysis-Agent\u0026quot;,\n model_name=\u0026quot;gpt-4o-mini\u0026quot;,\n max_loops=\u0026quot;auto\u0026quot;,\n interactive=True,\n streaming_on=True,\n)\n\nagent.run(\u0026quot;What is the current market trend for tech stocks?\u0026quot;)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Stock-Analysis-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o-mini\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"auto\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003einteractive\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"What is the current market trend for tech stocks?\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSettings and Customization\u003c/h3\u003e\u003ca id=\"user-content-settings-and-customization\" class=\"anchor\" aria-label=\"Permalink: Settings and Customization\" href=\"#settings-and-customization\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eAgent\u003c/code\u003e class offers a range of settings to tailor its behavior to specific needs. Some key settings include:\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eSetting\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eDefault Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eagent_name\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe name of the agent.\u003c/td\u003e\n\u003ctd\u003e\"DefaultAgent\"\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esystem_prompt\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe system prompt to use for the agent.\u003c/td\u003e\n\u003ctd\u003e\"Default system prompt.\"\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ellm\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe language model to use for processing tasks.\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eOpenAIChat\u003c/code\u003e instance\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emax_loops\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe maximum number of loops to execute for a task.\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eautosave\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEnables or disables autosaving of the agent's state.\u003c/td\u003e\n\u003ctd\u003eFalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edashboard\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEnables or disables the dashboard for the agent.\u003c/td\u003e\n\u003ctd\u003eFalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003everbose\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eControls the verbosity of the agent's output.\u003c/td\u003e\n\u003ctd\u003eFalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edynamic_temperature_enabled\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eEnables or disables dynamic temperature adjustment for the language model.\u003c/td\u003e\n\u003ctd\u003eFalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esaved_state_path\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe path to save the agent's state.\u003c/td\u003e\n\u003ctd\u003e\"agent_state.json\"\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003euser_name\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe username associated with the agent.\u003c/td\u003e\n\u003ctd\u003e\"default_user\"\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eretry_attempts\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe number of retry attempts for failed tasks.\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003econtext_length\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe maximum length of the context to consider for tasks.\u003c/td\u003e\n\u003ctd\u003e200000\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ereturn_step_meta\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eControls whether to return step metadata in the output.\u003c/td\u003e\n\u003ctd\u003eFalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput_type\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eThe type of output to return (e.g., \"json\", \"string\").\u003c/td\u003e\n\u003ctd\u003e\"string\"\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\nfrom swarms import Agent\n\nfrom swarms.prompts.finance_agent_sys_prompt import (\n FINANCIAL_AGENT_SYS_PROMPT,\n)\n# Initialize the agent\nagent = Agent(\n agent_name=\u0026quot;Financial-Analysis-Agent\u0026quot;,\n system_prompt=FINANCIAL_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o-mini\u0026quot;,\n max_loops=1,\n autosave=True,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;finance_agent.json\u0026quot;,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n return_step_meta=False,\n output_type=\u0026quot;string\u0026quot;,\n streaming_on=False,\n)\n\n\nagent.run(\n \u0026quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria\u0026quot;\n)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eprompts\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003efinance_agent_sys_prompt\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e (\n \u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n)\n\u003cspan class=\"pl-c\"\u003e# Initialize the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial-Analysis-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o-mini\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"finance_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n)\n\n\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria\"\u003c/span\u003e\n)\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIntegrating RAG with Swarms for Enhanced Long-Term Memory\u003c/h3\u003e\u003ca id=\"user-content-integrating-rag-with-swarms-for-enhanced-long-term-memory\" class=\"anchor\" aria-label=\"Permalink: Integrating RAG with Swarms for Enhanced Long-Term Memory\" href=\"#integrating-rag-with-swarms-for-enhanced-long-term-memory\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode\u003eAgent\u003c/code\u003e equipped with quasi-infinite long term memory using RAG (Relational Agent Graph) for advanced document understanding, analysis, and retrieval capabilities.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eMermaid Diagram for RAG Integration\u003c/strong\u003e\u003c/p\u003e\n\u003csection class=\"js-render-needs-enrichment render-needs-enrichment position-relative\" data-identity=\"5a582f07-1b4b-4f00-90c4-e4857a725218\" data-host=\"https://viewscreen.githubusercontent.com\" data-src=\"https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com\" data-type=\"mermaid\" aria-label=\"mermaid rendered output container\"\u003e\n \u003cdiv class=\"js-render-enrichment-target\" data-json=\"{\u0026quot;data\u0026quot;:\u0026quot;graph TD\\n A[Initialize Agent with RAG] --\u0026amp;gt; B[Receive Task]\\n B --\u0026amp;gt; C[Query Long-Term Memory]\\n C --\u0026amp;gt; D[Process Task with Context]\\n D --\u0026amp;gt; E[Generate Response]\\n E --\u0026amp;gt; F[Update Long-Term Memory]\\n F --\u0026amp;gt; G[Return Output]\\n\u0026quot;}\" data-plain=\"graph TD\n A[Initialize Agent with RAG] --\u0026gt; B[Receive Task]\n B --\u0026gt; C[Query Long-Term Memory]\n C --\u0026gt; D[Process Task with Context]\n D --\u0026gt; E[Generate Response]\n E --\u0026gt; F[Update Long-Term Memory]\n F --\u0026gt; G[Return Output]\n\" dir=\"auto\"\u003e\n \u003cdiv class=\"render-plaintext-hidden\" dir=\"auto\"\u003e\n \u003cpre lang=\"mermaid\" aria-label=\"Raw mermaid code\"\u003egraph TD\n A[Initialize Agent with RAG] --\u0026gt; B[Receive Task]\n B --\u0026gt; C[Query Long-Term Memory]\n C --\u0026gt; D[Process Task with Context]\n D --\u0026gt; E[Generate Response]\n E --\u0026gt; F[Update Long-Term Memory]\n F --\u0026gt; G[Return Output]\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cspan class=\"js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full\" style=\"min-height:100px\" role=\"presentation\"\u003e\n \u003cspan data-view-component=\"true\"\u003e\n \u003csvg style=\"box-sizing: content-box; color: var(--color-icon-primary);\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" data-view-component=\"true\" class=\"octospinner mx-auto anim-rotate\"\u003e\n \u003ccircle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-opacity=\"0.25\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" fill=\"none\"\u003e\u003c/circle\u003e\n \u003cpath d=\"M15 8a7.002 7.002 0 00-7-7\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" vector-effect=\"non-scaling-stroke\"\u003e\u003c/path\u003e\n\u003c/svg\u003e \u003cspan class=\"sr-only\"\u003eLoading\u003c/span\u003e\n\u003c/span\u003e\n \u003c/span\u003e\n\u003c/section\u003e\n\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from swarms import Agent\nfrom swarms.prompts.finance_agent_sys_prompt import (\n FINANCIAL_AGENT_SYS_PROMPT,\n)\nimport os\n\nfrom swarms_memory import ChromaDB\n\n# Initialize the ChromaDB client for long-term memory management\nchromadb = ChromaDB(\n metric=\u0026quot;cosine\u0026quot;, # Metric for similarity measurement\n output_dir=\u0026quot;finance_agent_rag\u0026quot;, # Directory for storing RAG data\n # docs_folder=\u0026quot;artifacts\u0026quot;, # Uncomment and specify the folder containing your documents\n)\n\n# Initialize the agent with RAG capabilities\nagent = Agent(\n agent_name=\u0026quot;Financial-Analysis-Agent\u0026quot;,\n system_prompt=FINANCIAL_AGENT_SYS_PROMPT,\n agent_description=\u0026quot;Agent creates a comprehensive financial analysis\u0026quot;,\n model_name=\u0026quot;gpt-4o-mini\u0026quot;,\n max_loops=\u0026quot;auto\u0026quot;, # Auto-adjusts loops based on task complexity\n autosave=True, # Automatically saves agent state\n dashboard=False, # Disables dashboard for this example\n verbose=True, # Enables verbose mode for detailed output\n streaming_on=True, # Enables streaming for real-time processing\n dynamic_temperature_enabled=True, # Dynamically adjusts temperature for optimal performance\n saved_state_path=\u0026quot;finance_agent.json\u0026quot;, # Path to save agent state\n user_name=\u0026quot;swarms_corp\u0026quot;, # User name for the agent\n retry_attempts=3, # Number of retry attempts for failed tasks\n context_length=200000, # Maximum length of the context to consider\n long_term_memory=chromadb, # Integrates ChromaDB for long-term memory management\n return_step_meta=False,\n output_type=\u0026quot;string\u0026quot;,\n)\n\n# Run the agent with a sample task\nagent.run(\n \u0026quot;What are the components of a startup's stock incentive equity plan\u0026quot;\n)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eprompts\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003efinance_agent_sys_prompt\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e (\n \u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n)\n\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms_memory\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eChromaDB\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the ChromaDB client for long-term memory management\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003echromadb\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eChromaDB\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003emetric\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"cosine\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Metric for similarity measurement\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eoutput_dir\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"finance_agent_rag\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Directory for storing RAG data\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e# docs_folder=\"artifacts\", # Uncomment and specify the folder containing your documents\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the agent with RAG capabilities\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial-Analysis-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_description\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Agent creates a comprehensive financial analysis\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o-mini\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"auto\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Auto-adjusts loops based on task complexity\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Automatically saves agent state\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Disables dashboard for this example\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Enables verbose mode for detailed output\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Enables streaming for real-time processing\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Dynamically adjusts temperature for optimal performance\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"finance_agent.json\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Path to save agent state\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# User name for the agent\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Number of retry attempts for failed tasks\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Maximum length of the context to consider\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003elong_term_memory\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003echromadb\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Integrates ChromaDB for long-term memory management\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the agent with a sample task\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"What are the components of a startup's stock incentive equity plan\"\u003c/span\u003e\n)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eStructured Outputs\u003c/h2\u003e\u003ca id=\"user-content-structured-outputs\" class=\"anchor\" aria-label=\"Permalink: Structured Outputs\" href=\"#structured-outputs\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eCreate a tool schema\u003c/li\u003e\n\u003cli\u003eCreate a function schema\u003c/li\u003e\n\u003cli\u003eCreate a tool list dictionary\u003c/li\u003e\n\u003cli\u003eInitialize the agent\u003c/li\u003e\n\u003cli\u003eRun the agent\u003c/li\u003e\n\u003cli\u003ePrint the output\u003c/li\u003e\n\u003cli\u003eConvert the output to a dictionary\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\nfrom dotenv import load_dotenv\n\nfrom swarms import Agent\nfrom swarms.prompts.finance_agent_sys_prompt import (\n FINANCIAL_AGENT_SYS_PROMPT,\n)\nfrom swarms.utils.str_to_dict import str_to_dict\n\nload_dotenv()\n\ntools = [\n {\n \u0026quot;type\u0026quot;: \u0026quot;function\u0026quot;,\n \u0026quot;function\u0026quot;: {\n \u0026quot;name\u0026quot;: \u0026quot;get_stock_price\u0026quot;,\n \u0026quot;description\u0026quot;: \u0026quot;Retrieve the current stock price and related information for a specified company.\u0026quot;,\n \u0026quot;parameters\u0026quot;: {\n \u0026quot;type\u0026quot;: \u0026quot;object\u0026quot;,\n \u0026quot;properties\u0026quot;: {\n \u0026quot;ticker\u0026quot;: {\n \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot;,\n \u0026quot;description\u0026quot;: \u0026quot;The stock ticker symbol of the company, e.g. AAPL for Apple Inc.\u0026quot;,\n },\n \u0026quot;include_history\u0026quot;: {\n \u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;,\n \u0026quot;description\u0026quot;: \u0026quot;Indicates whether to include historical price data along with the current price.\u0026quot;,\n },\n \u0026quot;time\u0026quot;: {\n \u0026quot;type\u0026quot;: \u0026quot;string\u0026quot;,\n \u0026quot;format\u0026quot;: \u0026quot;date-time\u0026quot;,\n \u0026quot;description\u0026quot;: \u0026quot;Optional parameter to specify the time for which the stock data is requested, in ISO 8601 format.\u0026quot;,\n },\n },\n \u0026quot;required\u0026quot;: [\n \u0026quot;ticker\u0026quot;,\n \u0026quot;include_history\u0026quot;,\n \u0026quot;time\u0026quot;,\n ],\n },\n },\n }\n]\n\n\n# Initialize the agent\nagent = Agent(\n agent_name=\u0026quot;Financial-Analysis-Agent\u0026quot;,\n agent_description=\u0026quot;Personal finance advisor agent\u0026quot;,\n system_prompt=FINANCIAL_AGENT_SYS_PROMPT,\n max_loops=1,\n tools_list_dictionary=tools,\n)\n\nout = agent.run(\n \u0026quot;What is the current stock price for Apple Inc. (AAPL)? Include historical price data.\u0026quot;,\n)\n\nprint(out)\n\nprint(type(out))\n\nprint(str_to_dict(out))\n\nprint(type(str_to_dict(out)))\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edotenv\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eload_dotenv\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eprompts\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003efinance_agent_sys_prompt\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e (\n \u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n)\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eutils\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003estr_to_dict\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003estr_to_dict\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003eload_dotenv\u003c/span\u003e()\n\n\u003cspan class=\"pl-s1\"\u003etools\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n {\n \u003cspan class=\"pl-s\"\u003e\"type\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"function\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"function\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"name\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"get_stock_price\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"description\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"Retrieve the current stock price and related information for a specified company.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"parameters\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"type\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"object\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"properties\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"ticker\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"type\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"description\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"The stock ticker symbol of the company, e.g. AAPL for Apple Inc.\"\u003c/span\u003e,\n },\n \u003cspan class=\"pl-s\"\u003e\"include_history\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"type\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"boolean\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"description\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"Indicates whether to include historical price data along with the current price.\"\u003c/span\u003e,\n },\n \u003cspan class=\"pl-s\"\u003e\"time\"\u003c/span\u003e: {\n \u003cspan class=\"pl-s\"\u003e\"type\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"format\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"date-time\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"description\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\"Optional parameter to specify the time for which the stock data is requested, in ISO 8601 format.\"\u003c/span\u003e,\n },\n },\n \u003cspan class=\"pl-s\"\u003e\"required\"\u003c/span\u003e: [\n \u003cspan class=\"pl-s\"\u003e\"ticker\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"include_history\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"time\"\u003c/span\u003e,\n ],\n },\n },\n }\n]\n\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial-Analysis-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_description\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Personal finance advisor agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFINANCIAL_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etools_list_dictionary\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etools\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"What is the current stock price for Apple Inc. (AAPL)? Include historical price data.\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e)\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003etype\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e))\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003estr_to_dict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e))\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003etype\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003estr_to_dict\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e)))\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMisc Agent Settings\u003c/h3\u003e\u003ca id=\"user-content-misc-agent-settings\" class=\"anchor\" aria-label=\"Permalink: Misc Agent Settings\" href=\"#misc-agent-settings\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWe provide vast array of features to save agent states using json, yaml, toml, upload pdfs, batched jobs, and much more!\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eMethod Table\u003c/strong\u003e\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eto_dict()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eConverts the agent object to a dictionary.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eto_toml()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eConverts the agent object to a TOML string.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emodel_dump_json()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDumps the model to a JSON file.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emodel_dump_yaml()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eDumps the model to a YAML file.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eingest_docs()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eIngests documents into the agent's knowledge base.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ereceive_message()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReceives a message from a user and processes it.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esend_agent_message()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSends a message from the agent to a user.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003efiltered_run()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRuns the agent with a filtered system prompt.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ebulk_run()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eRuns the agent with multiple system prompts.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eadd_memory()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAdds a memory to the agent.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003echeck_available_tokens()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eChecks the number of available tokens for the agent.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003etokens_checks()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ePerforms token checks for the agent.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eprint_dashboard()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ePrints the dashboard of the agent.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eget_docs_from_doc_folders()\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFetches all the documents from the doc folders.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# # Convert the agent object to a dictionary\nprint(agent.to_dict())\nprint(agent.to_toml())\nprint(agent.model_dump_json())\nprint(agent.model_dump_yaml())\n\n# Ingest documents into the agent's knowledge base\n(\u0026quot;your_pdf_path.pdf\u0026quot;)\n\n# Receive a message from a user and process it\nagent.receive_message(name=\u0026quot;agent_name\u0026quot;, message=\u0026quot;message\u0026quot;)\n\n# Send a message from the agent to a user\nagent.send_agent_message(agent_name=\u0026quot;agent_name\u0026quot;, message=\u0026quot;message\u0026quot;)\n\n# Ingest multiple documents into the agent's knowledge base\nagent.ingest_docs(\u0026quot;your_pdf_path.pdf\u0026quot;, \u0026quot;your_csv_path.csv\u0026quot;)\n\n# Run the agent with a filtered system prompt\nagent.filtered_run(\n \u0026quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?\u0026quot;\n)\n\n# Run the agent with multiple system prompts\nagent.bulk_run(\n [\n \u0026quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?\u0026quot;,\n \u0026quot;Another system prompt\u0026quot;,\n ]\n)\n\n# Add a memory to the agent\nagent.add_memory(\u0026quot;Add a memory to the agent\u0026quot;)\n\n# Check the number of available tokens for the agent\nagent.check_available_tokens()\n\n# Perform token checks for the agent\nagent.tokens_checks()\n\n# Print the dashboard of the agent\nagent.print_dashboard()\n\n# Fetch all the documents from the doc folders\nagent.get_docs_from_doc_folders()\n\n# Activate agent ops\n\n# Dump the model to a JSON file\nagent.model_dump_json()\nprint(agent.to_toml())\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e# # Convert the agent object to a dictionary\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eto_dict\u003c/span\u003e())\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eto_toml\u003c/span\u003e())\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emodel_dump_json\u003c/span\u003e())\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emodel_dump_yaml\u003c/span\u003e())\n\n\u003cspan class=\"pl-c\"\u003e# Ingest documents into the agent's knowledge base\u003c/span\u003e\n(\u003cspan class=\"pl-s\"\u003e\"your_pdf_path.pdf\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Receive a message from a user and process it\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ereceive_message\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent_name\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"message\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Send a message from the agent to a user\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003esend_agent_message\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent_name\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"message\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Ingest multiple documents into the agent's knowledge base\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eingest_docs\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"your_pdf_path.pdf\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"your_csv_path.csv\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Run the agent with a filtered system prompt\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efiltered_run\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?\"\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the agent with multiple system prompts\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ebulk_run\u003c/span\u003e(\n [\n \u003cspan class=\"pl-s\"\u003e\"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?\"\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"Another system prompt\"\u003c/span\u003e,\n ]\n)\n\n\u003cspan class=\"pl-c\"\u003e# Add a memory to the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_memory\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"Add a memory to the agent\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Check the number of available tokens for the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003echeck_available_tokens\u003c/span\u003e()\n\n\u003cspan class=\"pl-c\"\u003e# Perform token checks for the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003etokens_checks\u003c/span\u003e()\n\n\u003cspan class=\"pl-c\"\u003e# Print the dashboard of the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eprint_dashboard\u003c/span\u003e()\n\n\u003cspan class=\"pl-c\"\u003e# Fetch all the documents from the doc folders\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eget_docs_from_doc_folders\u003c/span\u003e()\n\n\u003cspan class=\"pl-c\"\u003e# Activate agent ops\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Dump the model to a JSON file\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emodel_dump_json\u003c/span\u003e()\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eto_toml\u003c/span\u003e())\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eAgent\u003c/code\u003ewith Pydantic BaseModel as Output Type\u003c/h3\u003e\u003ca id=\"user-content-agentwith-pydantic-basemodel-as-output-type\" class=\"anchor\" aria-label=\"Permalink: Agentwith Pydantic BaseModel as Output Type\" href=\"#agentwith-pydantic-basemodel-as-output-type\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe following is an example of an agent that intakes a pydantic basemodel and outputs it at the same time:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from pydantic import BaseModel, Field\nfrom swarms import Agent\n\n\n# Initialize the schema for the person's information\nclass Schema(BaseModel):\n name: str = Field(..., title=\u0026quot;Name of the person\u0026quot;)\n agent: int = Field(..., title=\u0026quot;Age of the person\u0026quot;)\n is_student: bool = Field(..., title=\u0026quot;Whether the person is a student\u0026quot;)\n courses: list[str] = Field(\n ..., title=\u0026quot;List of courses the person is taking\u0026quot;\n )\n\n\n# Convert the schema to a JSON string\ntool_schema = Schema(\n name=\u0026quot;Tool Name\u0026quot;,\n agent=1,\n is_student=True,\n courses=[\u0026quot;Course1\u0026quot;, \u0026quot;Course2\u0026quot;],\n)\n\n# Define the task to generate a person's information\ntask = \u0026quot;Generate a person's information based on the following schema:\u0026quot;\n\n# Initialize the agent\nagent = Agent(\n agent_name=\u0026quot;Person Information Generator\u0026quot;,\n system_prompt=(\n \u0026quot;Generate a person's information based on the following schema:\u0026quot;\n ),\n # Set the tool schema to the JSON string -- this is the key difference\n tool_schema=tool_schema,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=3,\n autosave=True,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n interactive=True,\n # Set the output type to the tool schema which is a BaseModel\n output_type=tool_schema, # or dict, or str\n metadata_output_type=\u0026quot;json\u0026quot;,\n # List of schemas that the agent can handle\n list_base_models=[tool_schema],\n function_calling_format_type=\u0026quot;OpenAI\u0026quot;,\n function_calling_type=\u0026quot;json\u0026quot;, # or soon yaml\n)\n\n# Run the agent to generate the person's information\ngenerated_data = agent.run(task)\n\n# Print the generated data\nprint(f\u0026quot;Generated data: {generated_data}\u0026quot;)\n\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003epydantic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBaseModel\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eField\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the schema for the person's information\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSchema\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eBaseModel\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Name of the person\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Age of the person\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003eis_student\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Whether the person is a student\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003ecourses\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003elist\u003c/span\u003e[\u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e] \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(\n ..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"List of courses the person is taking\"\u003c/span\u003e\n )\n\n\n\u003cspan class=\"pl-c\"\u003e# Convert the schema to a JSON string\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSchema\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Tool Name\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eis_student\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ecourses\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s\"\u003e\"Course1\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"Course2\"\u003c/span\u003e],\n)\n\n\u003cspan class=\"pl-c\"\u003e# Define the task to generate a person's information\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Generate a person's information based on the following schema:\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Person Information Generator\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"Generate a person's information based on the following schema:\"\u003c/span\u003e\n ),\n \u003cspan class=\"pl-c\"\u003e# Set the tool schema to the JSON string -- this is the key difference\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003einteractive\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-c\"\u003e# Set the output type to the tool schema which is a BaseModel\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# or dict, or str\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003emetadata_output_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-c\"\u003e# List of schemas that the agent can handle\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003elist_base_models\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e],\n \u003cspan class=\"pl-s1\"\u003efunction_calling_format_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"OpenAI\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efunction_calling_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# or soon yaml\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the agent to generate the person's information\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003egenerated_data\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Print the generated data\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003ef\"Generated data: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003egenerated_data\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e)\n\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMulti Modal Autonomous Agent\u003c/h3\u003e\u003ca id=\"user-content-multi-modal-autonomous-agent\" class=\"anchor\" aria-label=\"Permalink: Multi Modal Autonomous Agent\" href=\"#multi-modal-autonomous-agent\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eRun the agent with multiple modalities useful for various real-world tasks in manufacturing, logistics, and health.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\nfrom dotenv import load_dotenv\nfrom swarms import Agent\n\nfrom swarm_models import GPT4VisionAPI\n\n# Load the environment variables\nload_dotenv()\n\n\n# Initialize the language model\nllm = GPT4VisionAPI(\n openai_api_key=os.environ.get(\u0026quot;OPENAI_API_KEY\u0026quot;),\n max_tokens=500,\n)\n\n# Initialize the task\ntask = (\n \u0026quot;Analyze this image of an assembly line and identify any issues such as\u0026quot;\n \u0026quot; misaligned parts, defects, or deviations from the standard assembly\u0026quot;\n \u0026quot; process. If there is anything unsafe in the image, explain why it is\u0026quot;\n \u0026quot; unsafe and how it could be improved.\u0026quot;\n)\nimg = \u0026quot;assembly_line.jpg\u0026quot;\n\n## Initialize the workflow\nagent = Agent(\n agent_name = \u0026quot;Multi-ModalAgent\u0026quot;,\n llm=llm, \n max_loops=\u0026quot;auto\u0026quot;, \n autosave=True, \n dashboard=True, \n multi_modal=True\n)\n\n# Run the workflow on a task\nagent.run(task, img)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edotenv\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eload_dotenv\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eGPT4VisionAPI\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Load the environment variables\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eload_dotenv\u003c/span\u003e()\n\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the language model\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eGPT4VisionAPI\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eopenai_api_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eenviron\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eget\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"OPENAI_API_KEY\"\u003c/span\u003e),\n \u003cspan class=\"pl-s1\"\u003emax_tokens\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e500\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the task\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e (\n \u003cspan class=\"pl-s\"\u003e\"Analyze this image of an assembly line and identify any issues such as\"\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\" misaligned parts, defects, or deviations from the standard assembly\"\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\" process. If there is anything unsafe in the image, explain why it is\"\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\" unsafe and how it could be improved.\"\u003c/span\u003e\n)\n\u003cspan class=\"pl-s1\"\u003eimg\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"assembly_line.jpg\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e## Initialize the workflow\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Multi-ModalAgent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e, \n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"auto\"\u003c/span\u003e, \n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \n \u003cspan class=\"pl-s1\"\u003emulti_modal\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the workflow on a task\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eimg\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLocal Agent \u003ccode\u003eToolAgent\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-local-agent-toolagent\" class=\"anchor\" aria-label=\"Permalink: Local Agent ToolAgent\" href=\"#local-agent-toolagent\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eToolAgent is a fully local agent that can use tools through JSON function calling. It intakes any open source model from huggingface and is extremely modular and plug in and play. We need help adding general support to all models soon.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from pydantic import BaseModel, Field\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nfrom swarms import ToolAgent\nfrom swarms.tools.json_utils import base_model_to_json\n\n# Load the pre-trained model and tokenizer\nmodel = AutoModelForCausalLM.from_pretrained(\n \u0026quot;databricks/dolly-v2-12b\u0026quot;,\n load_in_4bit=True,\n device_map=\u0026quot;auto\u0026quot;,\n)\ntokenizer = AutoTokenizer.from_pretrained(\u0026quot;databricks/dolly-v2-12b\u0026quot;)\n\n\n# Initialize the schema for the person's information\nclass Schema(BaseModel):\n name: str = Field(..., title=\u0026quot;Name of the person\u0026quot;)\n agent: int = Field(..., title=\u0026quot;Age of the person\u0026quot;)\n is_student: bool = Field(\n ..., title=\u0026quot;Whether the person is a student\u0026quot;\n )\n courses: list[str] = Field(\n ..., title=\u0026quot;List of courses the person is taking\u0026quot;\n )\n\n\n# Convert the schema to a JSON string\ntool_schema = base_model_to_json(Schema)\n\n# Define the task to generate a person's information\ntask = (\n \u0026quot;Generate a person's information based on the following schema:\u0026quot;\n)\n\n# Create an instance of the ToolAgent class\nagent = ToolAgent(\n name=\u0026quot;dolly-function-agent\u0026quot;,\n description=\u0026quot;An agent to create a child's data\u0026quot;,\n model=model,\n tokenizer=tokenizer,\n json_schema=tool_schema,\n)\n\n# Run the agent to generate the person's information\ngenerated_data = agent.run(task)\n\n# Print the generated data\nprint(f\u0026quot;Generated data: {generated_data}\u0026quot;)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003epydantic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBaseModel\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eField\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003etransformers\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAutoModelForCausalLM\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eAutoTokenizer\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eToolAgent\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003etools\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003ejson_utils\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ebase_model_to_json\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Load the pre-trained model and tokenizer\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAutoModelForCausalLM\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efrom_pretrained\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"databricks/dolly-v2-12b\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eload_in_4bit\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edevice_map\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"auto\"\u003c/span\u003e,\n)\n\u003cspan class=\"pl-s1\"\u003etokenizer\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAutoTokenizer\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efrom_pretrained\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"databricks/dolly-v2-12b\"\u003c/span\u003e)\n\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the schema for the person's information\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSchema\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eBaseModel\u003c/span\u003e):\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Name of the person\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Age of the person\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003eis_student\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(\n ..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Whether the person is a student\"\u003c/span\u003e\n )\n \u003cspan class=\"pl-s1\"\u003ecourses\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003elist\u003c/span\u003e[\u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e] \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eField\u003c/span\u003e(\n ..., \u003cspan class=\"pl-s1\"\u003etitle\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"List of courses the person is taking\"\u003c/span\u003e\n )\n\n\n\u003cspan class=\"pl-c\"\u003e# Convert the schema to a JSON string\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ebase_model_to_json\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eSchema\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Define the task to generate a person's information\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e (\n \u003cspan class=\"pl-s\"\u003e\"Generate a person's information based on the following schema:\"\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Create an instance of the ToolAgent class\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eToolAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"dolly-function-agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"An agent to create a child's data\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etokenizer\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etokenizer\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ejson_schema\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003etool_schema\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the agent to generate the person's information\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003egenerated_data\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Print the generated data\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003ef\"Generated data: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003egenerated_data\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUnderstanding Swarms\u003c/h2\u003e\u003ca id=\"user-content-understanding-swarms\" class=\"anchor\" aria-label=\"Permalink: Understanding Swarms\" href=\"#understanding-swarms\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA swarm refers to a group of more than two agents working collaboratively to achieve a common goal. These agents can be software entities, such as llms that interact with each other to perform complex tasks. The concept of a swarm is inspired by natural systems like ant colonies or bird flocks, where simple individual behaviors lead to complex group dynamics and problem-solving capabilities.\u003c/p\u003e\n\u003csection class=\"js-render-needs-enrichment render-needs-enrichment position-relative\" data-identity=\"a6dd182b-581e-43f6-b654-45590e737310\" data-host=\"https://viewscreen.githubusercontent.com\" data-src=\"https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com\" data-type=\"mermaid\" aria-label=\"mermaid rendered output container\"\u003e\n \u003cdiv class=\"js-render-enrichment-target\" data-json=\"{\u0026quot;data\u0026quot;:\u0026quot;graph TD\\n A[Swarm] --\u0026amp;gt; B[Agent 1]\\n A --\u0026amp;gt; C[Agent 2]\\n A --\u0026amp;gt; D[Agent N]\\n B --\u0026amp;gt; E[Task Processing]\\n C --\u0026amp;gt; E\\n D --\u0026amp;gt; E\\n E --\u0026amp;gt; F[Result Aggregation]\\n F --\u0026amp;gt; G[Final Output]\\n\u0026quot;}\" data-plain=\"graph TD\n A[Swarm] --\u0026gt; B[Agent 1]\n A --\u0026gt; C[Agent 2]\n A --\u0026gt; D[Agent N]\n B --\u0026gt; E[Task Processing]\n C --\u0026gt; E\n D --\u0026gt; E\n E --\u0026gt; F[Result Aggregation]\n F --\u0026gt; G[Final Output]\n\" dir=\"auto\"\u003e\n \u003cdiv class=\"render-plaintext-hidden\" dir=\"auto\"\u003e\n \u003cpre lang=\"mermaid\" aria-label=\"Raw mermaid code\"\u003egraph TD\n A[Swarm] --\u0026gt; B[Agent 1]\n A --\u0026gt; C[Agent 2]\n A --\u0026gt; D[Agent N]\n B --\u0026gt; E[Task Processing]\n C --\u0026gt; E\n D --\u0026gt; E\n E --\u0026gt; F[Result Aggregation]\n F --\u0026gt; G[Final Output]\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cspan class=\"js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full\" style=\"min-height:100px\" role=\"presentation\"\u003e\n \u003cspan data-view-component=\"true\"\u003e\n \u003csvg style=\"box-sizing: content-box; color: var(--color-icon-primary);\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" data-view-component=\"true\" class=\"octospinner mx-auto anim-rotate\"\u003e\n \u003ccircle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-opacity=\"0.25\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" fill=\"none\"\u003e\u003c/circle\u003e\n \u003cpath d=\"M15 8a7.002 7.002 0 00-7-7\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" vector-effect=\"non-scaling-stroke\"\u003e\u003c/path\u003e\n\u003c/svg\u003e \u003cspan class=\"sr-only\"\u003eLoading\u003c/span\u003e\n\u003c/span\u003e\n \u003c/span\u003e\n\u003c/section\u003e\n\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHow Swarm Architectures Facilitate Communication\u003c/h3\u003e\u003ca id=\"user-content-how-swarm-architectures-facilitate-communication\" class=\"anchor\" aria-label=\"Permalink: How Swarm Architectures Facilitate Communication\" href=\"#how-swarm-architectures-facilitate-communication\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSwarm architectures are designed to establish and manage communication between agents within a swarm. These architectures define how agents interact, share information, and coordinate their actions to achieve the desired outcomes. Here are some key aspects of swarm architectures:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eHierarchical Communication\u003c/strong\u003e: In hierarchical swarms, communication flows from higher-level agents to lower-level agents. Higher-level agents act as coordinators, distributing tasks and aggregating results. This structure is efficient for tasks that require top-down control and decision-making.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eParallel Communication\u003c/strong\u003e: In parallel swarms, agents operate independently and communicate with each other as needed. This architecture is suitable for tasks that can be processed concurrently without dependencies, allowing for faster execution and scalability.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eSequential Communication\u003c/strong\u003e: Sequential swarms process tasks in a linear order, where each agent's output becomes the input for the next agent. This ensures that tasks with dependencies are handled in the correct sequence, maintaining the integrity of the workflow.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003csection class=\"js-render-needs-enrichment render-needs-enrichment position-relative\" data-identity=\"c1183d7f-224b-43d5-bde4-4af11a6fb2be\" data-host=\"https://viewscreen.githubusercontent.com\" data-src=\"https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com\" data-type=\"mermaid\" aria-label=\"mermaid rendered output container\"\u003e\n \u003cdiv class=\"js-render-enrichment-target\" data-json=\"{\u0026quot;data\u0026quot;:\u0026quot;graph LR\\n A[Hierarchical] --\u0026amp;gt; D[Task Distribution]\\n B[Parallel] --\u0026amp;gt; E[Concurrent Processing]\\n C[Sequential] --\u0026amp;gt; F[Linear Processing]\\n D --\u0026amp;gt; G[Results]\\n E --\u0026amp;gt; G\\n F --\u0026amp;gt; G\\n\u0026quot;}\" data-plain=\"graph LR\n A[Hierarchical] --\u0026gt; D[Task Distribution]\n B[Parallel] --\u0026gt; E[Concurrent Processing]\n C[Sequential] --\u0026gt; F[Linear Processing]\n D --\u0026gt; G[Results]\n E --\u0026gt; G\n F --\u0026gt; G\n\" dir=\"auto\"\u003e\n \u003cdiv class=\"render-plaintext-hidden\" dir=\"auto\"\u003e\n \u003cpre lang=\"mermaid\" aria-label=\"Raw mermaid code\"\u003egraph LR\n A[Hierarchical] --\u0026gt; D[Task Distribution]\n B[Parallel] --\u0026gt; E[Concurrent Processing]\n C[Sequential] --\u0026gt; F[Linear Processing]\n D --\u0026gt; G[Results]\n E --\u0026gt; G\n F --\u0026gt; G\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cspan class=\"js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full\" style=\"min-height:100px\" role=\"presentation\"\u003e\n \u003cspan data-view-component=\"true\"\u003e\n \u003csvg style=\"box-sizing: content-box; color: var(--color-icon-primary);\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" data-view-component=\"true\" class=\"octospinner mx-auto anim-rotate\"\u003e\n \u003ccircle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-opacity=\"0.25\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" fill=\"none\"\u003e\u003c/circle\u003e\n \u003cpath d=\"M15 8a7.002 7.002 0 00-7-7\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" vector-effect=\"non-scaling-stroke\"\u003e\u003c/path\u003e\n\u003c/svg\u003e \u003cspan class=\"sr-only\"\u003eLoading\u003c/span\u003e\n\u003c/span\u003e\n \u003c/span\u003e\n\u003c/section\u003e\n\n\u003cp dir=\"auto\"\u003eSwarm architectures leverage these communication patterns to ensure that agents work together efficiently, adapting to the specific requirements of the task at hand. By defining clear communication protocols and interaction models, swarm architectures enable the seamless orchestration of multiple agents, leading to enhanced performance and problem-solving capabilities.\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003cstrong\u003eName\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003eDescription\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003eCode Link\u003c/strong\u003e\u003c/th\u003e\n\u003cth\u003e\u003cstrong\u003eUse Cases\u003c/strong\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eHierarchical Swarms\u003c/td\u003e\n\u003ctd\u003eA system where agents are organized in a hierarchy, with higher-level agents coordinating lower-level agents to achieve complex tasks.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#hierarchical-swarm\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eManufacturing process optimization, multi-level sales management, healthcare resource coordination\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAgent Rearrange\u003c/td\u003e\n\u003ctd\u003eA setup where agents rearrange themselves dynamically based on the task requirements and environmental conditions.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eAdaptive manufacturing lines, dynamic sales territory realignment, flexible healthcare staffing\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eConcurrent Workflows\u003c/td\u003e\n\u003ctd\u003eAgents perform different tasks simultaneously, coordinating to complete a larger goal.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#concurrent-workflows\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eConcurrent production lines, parallel sales operations, simultaneous patient care processes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSequential Coordination\u003c/td\u003e\n\u003ctd\u003eAgents perform tasks in a specific sequence, where the completion of one task triggers the start of the next.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/sequential_workflow/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eStep-by-step assembly lines, sequential sales processes, stepwise patient treatment workflows\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eParallel Processing\u003c/td\u003e\n\u003ctd\u003eAgents work on different parts of a task simultaneously to speed up the overall process.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#parallel-processing\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eParallel data processing in manufacturing, simultaneous sales analytics, concurrent medical tests\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMixture of Agents\u003c/td\u003e\n\u003ctd\u003eA heterogeneous swarm where agents with different capabilities are combined to solve complex problems.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/moa/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eFinancial forecasting, complex problem-solving requiring diverse skills\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGraph Workflow\u003c/td\u003e\n\u003ctd\u003eAgents collaborate in a directed acyclic graph (DAG) format to manage dependencies and parallel tasks.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/graph_workflow/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eAI-driven software development pipelines, complex project management\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGroup Chat\u003c/td\u003e\n\u003ctd\u003eAgents engage in a chat-like interaction to reach decisions collaboratively.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/group_chat/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eReal-time collaborative decision-making, contract negotiations\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAgent Registry\u003c/td\u003e\n\u003ctd\u003eA centralized registry where agents are stored, retrieved, and invoked dynamically.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/agent_registry/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eDynamic agent management, evolving recommendation engines\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSpreadsheet Swarm\u003c/td\u003e\n\u003ctd\u003eManages tasks at scale, tracking agent outputs in a structured format like CSV files.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/spreadsheet_swarm/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eLarge-scale marketing analytics, financial audits\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eForest Swarm\u003c/td\u003e\n\u003ctd\u003eA swarm structure that organizes agents in a tree-like hierarchy for complex decision-making processes.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/forest_swarm/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eMulti-stage workflows, hierarchical reinforcement learning\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSwarm Router\u003c/td\u003e\n\u003ctd\u003eRoutes and chooses the swarm architecture based on the task requirements and available agents.\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/swarm_router/\" rel=\"nofollow\"\u003eCode Link\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003eDynamic task routing, adaptive swarm architecture selection, optimized agent allocation\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSwarms API\u003c/h2\u003e\u003ca id=\"user-content-swarms-api\" class=\"anchor\" aria-label=\"Permalink: Swarms API\" href=\"#swarms-api\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWe recently launched our enterprise-grade Swarms API. This API allows you to create, manage, and execute swarms from your own application.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSteps:\u003c/h4\u003e\u003ca id=\"user-content-steps\" class=\"anchor\" aria-label=\"Permalink: Steps:\" href=\"#steps\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eCreate a Swarms API key \u003ca href=\"https://swarms.world\" rel=\"nofollow\"\u003eHERE\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eUpload your key to the \u003ccode\u003e.env\u003c/code\u003e file like so: \u003ccode\u003eSWARMS_API_KEY=\u0026lt;your-api-key\u0026gt;\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eUse the following code to create and execute a swarm:\u003c/li\u003e\n\u003cli\u003eRead our docs for more information for deeper customization \u003ca href=\"https://docs.swarms.world/en/latest/swarms_cloud/swarms_api/\" rel=\"nofollow\"\u003eHERE\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import json\nfrom swarms.structs.swarms_api import (\n SwarmsAPIClient,\n SwarmRequest,\n AgentInput,\n)\nimport os\n\nagents = [\n AgentInput(\n agent_name=\u0026quot;Medical Researcher\u0026quot;,\n description=\u0026quot;Conducts medical research and analysis\u0026quot;,\n system_prompt=\u0026quot;You are a medical researcher specializing in clinical studies.\u0026quot;,\n max_loops=1,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n role=\u0026quot;worker\u0026quot;,\n ),\n AgentInput(\n agent_name=\u0026quot;Medical Diagnostician\u0026quot;,\n description=\u0026quot;Provides medical diagnoses based on symptoms and test results\u0026quot;,\n system_prompt=\u0026quot;You are a medical diagnostician with expertise in identifying diseases.\u0026quot;,\n max_loops=1,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n role=\u0026quot;worker\u0026quot;,\n ),\n AgentInput(\n agent_name=\u0026quot;Pharmaceutical Expert\u0026quot;,\n description=\u0026quot;Advises on pharmaceutical treatments and drug interactions\u0026quot;,\n system_prompt=\u0026quot;You are a pharmaceutical expert knowledgeable about medications and their effects.\u0026quot;,\n max_loops=1,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n role=\u0026quot;worker\u0026quot;,\n ),\n]\n\nswarm_request = SwarmRequest(\n name=\u0026quot;Medical Swarm\u0026quot;,\n description=\u0026quot;A swarm for medical research and diagnostics\u0026quot;,\n agents=agents,\n max_loops=1,\n swarm_type=\u0026quot;ConcurrentWorkflow\u0026quot;,\n output_type=\u0026quot;str\u0026quot;,\n return_history=True,\n task=\u0026quot;What is the cause of the common cold?\u0026quot;,\n)\n\nclient = SwarmsAPIClient(\n api_key=os.getenv(\u0026quot;SWARMS_API_KEY\u0026quot;), format_type=\u0026quot;json\u0026quot;\n)\n\nresponse = client.run(swarm_request)\n\nprint(json.dumps(response, indent=4))\n\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ejson\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003estructs\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eswarms_api\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e (\n \u003cspan class=\"pl-v\"\u003eSwarmsAPIClient\u003c/span\u003e,\n \u003cspan class=\"pl-v\"\u003eSwarmRequest\u003c/span\u003e,\n \u003cspan class=\"pl-v\"\u003eAgentInput\u003c/span\u003e,\n)\n\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-en\"\u003eAgentInput\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Medical Researcher\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Conducts medical research and analysis\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a medical researcher specializing in clinical studies.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"worker\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgentInput\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Medical Diagnostician\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Provides medical diagnoses based on symptoms and test results\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a medical diagnostician with expertise in identifying diseases.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"worker\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgentInput\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Pharmaceutical Expert\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Advises on pharmaceutical treatments and drug interactions\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a pharmaceutical expert knowledgeable about medications and their effects.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003erole\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"worker\"\u003c/span\u003e,\n ),\n]\n\n\u003cspan class=\"pl-s1\"\u003eswarm_request\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRequest\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Medical Swarm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"A swarm for medical research and diagnostics\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ConcurrentWorkflow\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"str\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_history\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"What is the cause of the common cold?\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003eclient\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmsAPIClient\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egetenv\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"SWARMS_API_KEY\"\u003c/span\u003e), \u003cspan class=\"pl-s1\"\u003eformat_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-s1\"\u003eresponse\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eclient\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eswarm_request\u003c/span\u003e)\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ejson\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003edumps\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eresponse\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eindent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e4\u003c/span\u003e))\n\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eSequentialWorkflow\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-sequentialworkflow\" class=\"anchor\" aria-label=\"Permalink: SequentialWorkflow\" href=\"#sequentialworkflow\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSequential Workflow enables you to sequentially execute tasks with \u003ccode\u003eAgent\u003c/code\u003e and then pass the output into the next agent and onwards until you have specified your max loops.\u003c/p\u003e\n\u003csection class=\"js-render-needs-enrichment render-needs-enrichment position-relative\" data-identity=\"b2ae9bc2-43dd-4062-9188-0936d9bf09b4\" data-host=\"https://viewscreen.githubusercontent.com\" data-src=\"https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com\" data-type=\"mermaid\" aria-label=\"mermaid rendered output container\"\u003e\n \u003cdiv class=\"js-render-enrichment-target\" data-json=\"{\u0026quot;data\u0026quot;:\u0026quot;graph LR\\n A[Agent 1] --\u0026amp;gt; B[Agent 2]\\n B --\u0026amp;gt; C[Agent 3]\\n C --\u0026amp;gt; D[Agent 4]\\n D --\u0026amp;gt; E[Max Loops]\\n E --\u0026amp;gt; F[End]\\n\u0026quot;}\" data-plain=\"graph LR\n A[Agent 1] --\u0026gt; B[Agent 2]\n B --\u0026gt; C[Agent 3]\n C --\u0026gt; D[Agent 4]\n D --\u0026gt; E[Max Loops]\n E --\u0026gt; F[End]\n\" dir=\"auto\"\u003e\n \u003cdiv class=\"render-plaintext-hidden\" dir=\"auto\"\u003e\n \u003cpre lang=\"mermaid\" aria-label=\"Raw mermaid code\"\u003egraph LR\n A[Agent 1] --\u0026gt; B[Agent 2]\n B --\u0026gt; C[Agent 3]\n C --\u0026gt; D[Agent 4]\n D --\u0026gt; E[Max Loops]\n E --\u0026gt; F[End]\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cspan class=\"js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full\" style=\"min-height:100px\" role=\"presentation\"\u003e\n \u003cspan data-view-component=\"true\"\u003e\n \u003csvg style=\"box-sizing: content-box; color: var(--color-icon-primary);\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" data-view-component=\"true\" class=\"octospinner mx-auto anim-rotate\"\u003e\n \u003ccircle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-opacity=\"0.25\" stroke-width=\"2\" vector-effect=\"non-scaling-stroke\" fill=\"none\"\u003e\u003c/circle\u003e\n \u003cpath d=\"M15 8a7.002 7.002 0 00-7-7\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" vector-effect=\"non-scaling-stroke\"\u003e\u003c/path\u003e\n\u003c/svg\u003e \u003cspan class=\"sr-only\"\u003eLoading\u003c/span\u003e\n\u003c/span\u003e\n \u003c/span\u003e\n\u003c/section\u003e\n\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e__init__\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInitialize the SequentialWorkflow\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e: List of Agent objects\u003cbr\u003e\u003ccode\u003emax_loops\u003c/code\u003e: Maximum number of iterations\u003cbr\u003e\u003ccode\u003everbose\u003c/code\u003e: Boolean for verbose output\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the workflow\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003einput_data\u003c/code\u003e: Initial input for the first agent\u003c/td\u003e\n\u003ctd\u003eFinal output after all agents have processed\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[Agent]\u003c/td\u003e\n\u003ctd\u003eList of Agent objects to be executed sequentially\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emax_loops\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eint\u003c/td\u003e\n\u003ctd\u003eMaximum number of times the entire sequence will be repeated\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003everbose\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebool\u003c/td\u003e\n\u003ctd\u003eIf True, print detailed information during execution\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns the final output after all agents have processed the input sequentially.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIn this example, each \u003ccode\u003eAgent\u003c/code\u003e represents a task that is executed sequentially. The output of each agent is passed to the next agent in the sequence until the maximum number of loops is reached. This workflow is particularly useful for tasks that require a series of steps to be executed in a specific order, such as data processing pipelines or complex calculations that rely on the output of previous steps.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\nfrom swarms import Agent, SequentialWorkflow\nfrom swarm_models import OpenAIChat\n\n# model = Anthropic(anthropic_api_key=os.getenv(\u0026quot;ANTHROPIC_API_KEY\u0026quot;))\ncompany = \u0026quot;Nvidia\u0026quot;\n# Get the OpenAI API key from the environment variable\napi_key = os.getenv(\u0026quot;GROQ_API_KEY\u0026quot;)\n\n# Model\nmodel = OpenAIChat(\n openai_api_base=\u0026quot;https://api.groq.com/openai/v1\u0026quot;,\n openai_api_key=api_key,\n model_name=\u0026quot;llama-3.1-70b-versatile\u0026quot;,\n temperature=0.1,\n)\n\n\n# Initialize the Managing Director agent\nmanaging_director = Agent(\n agent_name=\u0026quot;Managing-Director\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Managing Director at Blackstone, your role is to oversee the entire investment analysis process for potential acquisitions. \n Your responsibilities include:\n 1. Setting the overall strategy and direction for the analysis\n 2. Coordinating the efforts of the various team members and ensuring a comprehensive evaluation\n 3. Reviewing the findings and recommendations from each team member\n 4. Making the final decision on whether to proceed with the acquisition\n \n For the current potential acquisition of {company}, direct the tasks for the team to thoroughly analyze all aspects of the company, including its financials, industry position, technology, market potential, and regulatory compliance. Provide guidance and feedback as needed to ensure a rigorous and unbiased assessment.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;managing-director.json\u0026quot;,\n)\n\n# Initialize the Vice President of Finance\nvp_finance = Agent(\n agent_name=\u0026quot;VP-Finance\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Vice President of Finance at Blackstone, your role is to lead the financial analysis of potential acquisitions. \n For the current potential acquisition of {company}, your tasks include:\n 1. Conducting a thorough review of {company}' financial statements, including income statements, balance sheets, and cash flow statements\n 2. Analyzing key financial metrics such as revenue growth, profitability margins, liquidity ratios, and debt levels\n 3. Assessing the company's historical financial performance and projecting future performance based on assumptions and market conditions\n 4. Identifying any financial risks or red flags that could impact the acquisition decision\n 5. Providing a detailed report on your findings and recommendations to the Managing Director\n\n Be sure to consider factors such as the sustainability of {company}' business model, the strength of its customer base, and its ability to generate consistent cash flows. Your analysis should be data-driven, objective, and aligned with Blackstone's investment criteria.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;vp-finance.json\u0026quot;,\n)\n\n# Initialize the Industry Analyst\nindustry_analyst = Agent(\n agent_name=\u0026quot;Industry-Analyst\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Industry Analyst at Blackstone, your role is to provide in-depth research and analysis on the industries and markets relevant to potential acquisitions.\n For the current potential acquisition of {company}, your tasks include:\n 1. Conducting a comprehensive analysis of the industrial robotics and automation solutions industry, including market size, growth rates, key trends, and future prospects\n 2. Identifying the major players in the industry and assessing their market share, competitive strengths and weaknesses, and strategic positioning \n 3. Evaluating {company}' competitive position within the industry, including its market share, differentiation, and competitive advantages\n 4. Analyzing the key drivers and restraints for the industry, such as technological advancements, labor costs, regulatory changes, and economic conditions\n 5. Identifying potential risks and opportunities for {company} based on the industry analysis, such as disruptive technologies, emerging markets, or shifts in customer preferences \n \n Your analysis should provide a clear and objective assessment of the attractiveness and future potential of the industrial robotics industry, as well as {company}' positioning within it. Consider both short-term and long-term factors, and provide evidence-based insights to inform the investment decision.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;industry-analyst.json\u0026quot;,\n)\n\n# Initialize the Technology Expert\ntech_expert = Agent(\n agent_name=\u0026quot;Tech-Expert\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Technology Expert at Blackstone, your role is to assess the technological capabilities, competitive advantages, and potential risks of companies being considered for acquisition.\n For the current potential acquisition of {company}, your tasks include:\n 1. Conducting a deep dive into {company}' proprietary technologies, including its robotics platforms, automation software, and AI capabilities \n 2. Assessing the uniqueness, scalability, and defensibility of {company}' technology stack and intellectual property\n 3. Comparing {company}' technologies to those of its competitors and identifying any key differentiators or technology gaps\n 4. Evaluating {company}' research and development capabilities, including its innovation pipeline, engineering talent, and R\u0026amp;D investments\n 5. Identifying any potential technology risks or disruptive threats that could impact {company}' long-term competitiveness, such as emerging technologies or expiring patents\n \n Your analysis should provide a comprehensive assessment of {company}' technological strengths and weaknesses, as well as the sustainability of its competitive advantages. Consider both the current state of its technology and its future potential in light of industry trends and advancements.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;tech-expert.json\u0026quot;,\n)\n\n# Initialize the Market Researcher\nmarket_researcher = Agent(\n agent_name=\u0026quot;Market-Researcher\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Market Researcher at Blackstone, your role is to analyze the target company's customer base, market share, and growth potential to assess the commercial viability and attractiveness of the potential acquisition.\n For the current potential acquisition of {company}, your tasks include:\n 1. Analyzing {company}' current customer base, including customer segmentation, concentration risk, and retention rates\n 2. Assessing {company}' market share within its target markets and identifying key factors driving its market position\n 3. Conducting a detailed market sizing and segmentation analysis for the industrial robotics and automation markets, including identifying high-growth segments and emerging opportunities\n 4. Evaluating the demand drivers and sales cycles for {company}' products and services, and identifying any potential risks or limitations to adoption\n 5. Developing financial projections and estimates for {company}' revenue growth potential based on the market analysis and assumptions around market share and penetration\n \n Your analysis should provide a data-driven assessment of the market opportunity for {company} and the feasibility of achieving our investment return targets. Consider both bottom-up and top-down market perspectives, and identify any key sensitivities or assumptions in your projections.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;market-researcher.json\u0026quot;,\n)\n\n# Initialize the Regulatory Specialist\nregulatory_specialist = Agent(\n agent_name=\u0026quot;Regulatory-Specialist\u0026quot;,\n system_prompt=f\u0026quot;\u0026quot;\u0026quot;\n As the Regulatory Specialist at Blackstone, your role is to identify and assess any regulatory risks, compliance requirements, and potential legal liabilities associated with potential acquisitions.\n For the current potential acquisition of {company}, your tasks include: \n 1. Identifying all relevant regulatory bodies and laws that govern the operations of {company}, including industry-specific regulations, labor laws, and environmental regulations\n 2. Reviewing {company}' current compliance policies, procedures, and track record to identify any potential gaps or areas of non-compliance\n 3. Assessing the potential impact of any pending or proposed changes to relevant regulations that could affect {company}' business or create additional compliance burdens\n 4. Evaluating the potential legal liabilities and risks associated with {company}' products, services, and operations, including product liability, intellectual property, and customer contracts\n 5. Providing recommendations on any regulatory or legal due diligence steps that should be taken as part of the acquisition process, as well as any post-acquisition integration considerations\n \n Your analysis should provide a comprehensive assessment of the regulatory and legal landscape surrounding {company}, and identify any material risks or potential deal-breakers. Consider both the current state and future outlook, and provide practical recommendations to mitigate identified risks.\n \u0026quot;\u0026quot;\u0026quot;,\n llm=model,\n max_loops=1,\n dashboard=False,\n streaming_on=True,\n verbose=True,\n stopping_token=\u0026quot;\u0026lt;DONE\u0026gt;\u0026quot;,\n state_save_file_type=\u0026quot;json\u0026quot;,\n saved_state_path=\u0026quot;regulatory-specialist.json\u0026quot;,\n)\n\n# Create a list of agents\nagents = [\n managing_director,\n vp_finance,\n industry_analyst,\n tech_expert,\n market_researcher,\n regulatory_specialist,\n]\n\n\nswarm = SequentialWorkflow(\n name=\u0026quot;blackstone-private-equity-advisors\u0026quot;,\n agents=agents,\n)\n\nprint(\n swarm.run(\n \u0026quot;Analyze nvidia if it's a good deal to invest in now 10B\u0026quot;\n )\n)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eSequentialWorkflow\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eOpenAIChat\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# model = Anthropic(anthropic_api_key=os.getenv(\"ANTHROPIC_API_KEY\"))\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Nvidia\"\u003c/span\u003e\n\u003cspan class=\"pl-c\"\u003e# Get the OpenAI API key from the environment variable\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egetenv\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"GROQ_API_KEY\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Model\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eOpenAIChat\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eopenai_api_base\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"https://api.groq.com/openai/v1\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eopenai_api_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"llama-3.1-70b-versatile\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etemperature\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e,\n)\n\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Managing Director agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emanaging_director\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Managing-Director\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Managing Director at Blackstone, your role is to oversee the entire investment analysis process for potential acquisitions. \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your responsibilities include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Setting the overall strategy and direction for the analysis\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Coordinating the efforts of the various team members and ensuring a comprehensive evaluation\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Reviewing the findings and recommendations from each team member\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Making the final decision on whether to proceed with the acquisition\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, direct the tasks for the team to thoroughly analyze all aspects of the company, including its financials, industry position, technology, market potential, and regulatory compliance. Provide guidance and feedback as needed to ensure a rigorous and unbiased assessment.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"managing-director.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Vice President of Finance\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003evp_finance\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"VP-Finance\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Vice President of Finance at Blackstone, your role is to lead the financial analysis of potential acquisitions. \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, your tasks include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Conducting a thorough review of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' financial statements, including income statements, balance sheets, and cash flow statements\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Analyzing key financial metrics such as revenue growth, profitability margins, liquidity ratios, and debt levels\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Assessing the company's historical financial performance and projecting future performance based on assumptions and market conditions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Identifying any financial risks or red flags that could impact the acquisition decision\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Providing a detailed report on your findings and recommendations to the Managing Director\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Be sure to consider factors such as the sustainability of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' business model, the strength of its customer base, and its ability to generate consistent cash flows. Your analysis should be data-driven, objective, and aligned with Blackstone's investment criteria.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"vp-finance.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Industry Analyst\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eindustry_analyst\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Industry-Analyst\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Industry Analyst at Blackstone, your role is to provide in-depth research and analysis on the industries and markets relevant to potential acquisitions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, your tasks include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Conducting a comprehensive analysis of the industrial robotics and automation solutions industry, including market size, growth rates, key trends, and future prospects\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Identifying the major players in the industry and assessing their market share, competitive strengths and weaknesses, and strategic positioning \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Evaluating \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' competitive position within the industry, including its market share, differentiation, and competitive advantages\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Analyzing the key drivers and restraints for the industry, such as technological advancements, labor costs, regulatory changes, and economic conditions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Identifying potential risks and opportunities for \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e based on the industry analysis, such as disruptive technologies, emerging markets, or shifts in customer preferences \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your analysis should provide a clear and objective assessment of the attractiveness and future potential of the industrial robotics industry, as well as \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' positioning within it. Consider both short-term and long-term factors, and provide evidence-based insights to inform the investment decision.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"industry-analyst.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Technology Expert\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etech_expert\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Tech-Expert\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Technology Expert at Blackstone, your role is to assess the technological capabilities, competitive advantages, and potential risks of companies being considered for acquisition.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, your tasks include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Conducting a deep dive into \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' proprietary technologies, including its robotics platforms, automation software, and AI capabilities \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Assessing the uniqueness, scalability, and defensibility of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' technology stack and intellectual property\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Comparing \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' technologies to those of its competitors and identifying any key differentiators or technology gaps\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Evaluating \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' research and development capabilities, including its innovation pipeline, engineering talent, and R\u0026amp;D investments\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Identifying any potential technology risks or disruptive threats that could impact \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' long-term competitiveness, such as emerging technologies or expiring patents\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your analysis should provide a comprehensive assessment of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' technological strengths and weaknesses, as well as the sustainability of its competitive advantages. Consider both the current state of its technology and its future potential in light of industry trends and advancements.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"tech-expert.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Market Researcher\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emarket_researcher\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Market-Researcher\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Market Researcher at Blackstone, your role is to analyze the target company's customer base, market share, and growth potential to assess the commercial viability and attractiveness of the potential acquisition.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, your tasks include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Analyzing \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' current customer base, including customer segmentation, concentration risk, and retention rates\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Assessing \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' market share within its target markets and identifying key factors driving its market position\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Conducting a detailed market sizing and segmentation analysis for the industrial robotics and automation markets, including identifying high-growth segments and emerging opportunities\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Evaluating the demand drivers and sales cycles for \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' products and services, and identifying any potential risks or limitations to adoption\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Developing financial projections and estimates for \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' revenue growth potential based on the market analysis and assumptions around market share and penetration\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your analysis should provide a data-driven assessment of the market opportunity for \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e and the feasibility of achieving our investment return targets. Consider both bottom-up and top-down market perspectives, and identify any key sensitivities or assumptions in your projections.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"market-researcher.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the Regulatory Specialist\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eregulatory_specialist\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Regulatory-Specialist\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e As the Regulatory Specialist at Blackstone, your role is to identify and assess any regulatory risks, compliance requirements, and potential legal liabilities associated with potential acquisitions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For the current potential acquisition of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, your tasks include: \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Identifying all relevant regulatory bodies and laws that govern the operations of \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, including industry-specific regulations, labor laws, and environmental regulations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Reviewing \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' current compliance policies, procedures, and track record to identify any potential gaps or areas of non-compliance\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Assessing the potential impact of any pending or proposed changes to relevant regulations that could affect \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' business or create additional compliance burdens\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Evaluating the potential legal liabilities and risks associated with \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e' products, services, and operations, including product liability, intellectual property, and customer contracts\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Providing recommendations on any regulatory or legal due diligence steps that should be taken as part of the acquisition process, as well as any post-acquisition integration considerations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your analysis should provide a comprehensive assessment of the regulatory and legal landscape surrounding \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e, and identify any material risks or potential deal-breakers. Consider both the current state and future outlook, and provide practical recommendations to mitigate identified risks.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estopping_token\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\u0026lt;DONE\u0026gt;\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estate_save_file_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"regulatory-specialist.json\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Create a list of agents\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-s1\"\u003emanaging_director\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003evp_finance\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eindustry_analyst\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etech_expert\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_researcher\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eregulatory_specialist\u003c/span\u003e,\n]\n\n\n\u003cspan class=\"pl-s1\"\u003eswarm\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSequentialWorkflow\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"blackstone-private-equity-advisors\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eswarm\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"Analyze nvidia if it's a good deal to invest in now 10B\"\u003c/span\u003e\n )\n)\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eAgentRearrange\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-agentrearrange\" class=\"anchor\" aria-label=\"Permalink: AgentRearrange\" href=\"#agentrearrange\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eAgentRearrange\u003c/code\u003e orchestration technique, inspired by Einops and einsum, allows you to define and map out the relationships between various agents. It provides a powerful tool for orchestrating complex workflows, enabling you to specify linear and sequential relationships such as \u003ccode\u003ea -\u0026gt; a1 -\u0026gt; a2 -\u0026gt; a3\u003c/code\u003e, or concurrent relationships where the first agent sends a message to 3 agents simultaneously: \u003ccode\u003ea -\u0026gt; a1, a2, a3\u003c/code\u003e. This level of customization allows for the creation of highly efficient and dynamic workflows, where agents can work in parallel or in sequence as needed. The \u003ccode\u003eAgentRearrange\u003c/code\u003e technique is a valuable addition to the swarms library, providing a new level of flexibility and control over the orchestration of agents. For more detailed information and examples, please refer to the \u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/\" rel=\"nofollow\"\u003eofficial documentation\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://youtu.be/Rq8wWQ073mg\" rel=\"nofollow\"\u003eCheck out my video on agent rearrange!\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods-1\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e__init__\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInitialize the AgentRearrange\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e: List of Agent objects\u003cbr\u003e\u003ccode\u003eflow\u003c/code\u003e: String describing the agent flow\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the workflow\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003einput_data\u003c/code\u003e: Initial input for the first agent\u003c/td\u003e\n\u003ctd\u003eFinal output after all agents have processed\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs-1\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[Agent]\u003c/td\u003e\n\u003ctd\u003eList of Agent objects to be orchestrated\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eflow\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003eString describing the flow of agents (e.g., \"A -\u0026gt; B, C\")\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output-1\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns the final output after all agents have processed the input according to the specified flow.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\nfrom datetime import datetime\n\nfrom swarms import Agent, AgentRearrange, create_file_in_folder\n\nchief_medical_officer = Agent(\n agent_name=\u0026quot;Chief Medical Officer\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are the Chief Medical Officer coordinating a team of medical specialists for viral disease diagnosis.\n Your responsibilities include:\n - Gathering initial patient symptoms and medical history\n - Coordinating with specialists to form differential diagnoses\n - Synthesizing different specialist opinions into a cohesive diagnosis\n - Ensuring all relevant symptoms and test results are considered\n - Making final diagnostic recommendations\n - Suggesting treatment plans based on team input\n - Identifying when additional specialists need to be consulted\n \n Guidelines:\n 1. Always start with a comprehensive patient history\n 2. Consider both common and rare viral conditions\n 3. Factor in patient demographics and risk factors\n 4. Document your reasoning process clearly\n 5. Highlight any critical or emergency symptoms\n 6. Note any limitations or uncertainties in the diagnosis\n \n Format all responses with clear sections for:\n - Initial Assessment\n - Differential Diagnoses\n - Specialist Consultations Needed\n - Recommended Next Steps\u0026quot;\u0026quot;\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;, # Models from litellm -\u0026gt; claude-2\n max_loops=1,\n)\n\n# Viral Disease Specialist\nvirologist = Agent(\n agent_name=\u0026quot;Virologist\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a specialist in viral diseases with expertise in:\n - Respiratory viruses (Influenza, Coronavirus, RSV)\n - Systemic viral infections (EBV, CMV, HIV)\n - Childhood viral diseases (Measles, Mumps, Rubella)\n - Emerging viral threats\n \n Your role involves:\n 1. Analyzing symptoms specific to viral infections\n 2. Distinguishing between different viral pathogens\n 3. Assessing viral infection patterns and progression\n 4. Recommending specific viral tests\n 5. Evaluating epidemiological factors\n \n For each case, consider:\n - Incubation periods\n - Transmission patterns\n - Seasonal factors\n - Geographic prevalence\n - Patient immune status\n - Current viral outbreaks\n \n Provide detailed analysis of:\n - Characteristic viral symptoms\n - Disease progression timeline\n - Risk factors for severe disease\n - Potential complications\u0026quot;\u0026quot;\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n)\n\n# Internal Medicine Specialist\ninternist = Agent(\n agent_name=\u0026quot;Internist\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are an Internal Medicine specialist responsible for:\n - Comprehensive system-based evaluation\n - Integration of symptoms across organ systems\n - Identification of systemic manifestations\n - Assessment of comorbidities\n \n For each case, analyze:\n 1. Vital signs and their implications\n 2. System-by-system review (cardiovascular, respiratory, etc.)\n 3. Impact of existing medical conditions\n 4. Medication interactions and contraindications\n 5. Risk stratification\n \n Consider these aspects:\n - Age-related factors\n - Chronic disease impact\n - Medication history\n - Social and environmental factors\n \n Document:\n - Physical examination findings\n - System-specific symptoms\n - Relevant lab abnormalities\n - Risk factors for complications\u0026quot;\u0026quot;\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n)\n\n# Diagnostic Synthesizer\nsynthesizer = Agent(\n agent_name=\u0026quot;Diagnostic Synthesizer\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are responsible for synthesizing all specialist inputs to create a final diagnostic assessment:\n \n Core responsibilities:\n 1. Integrate findings from all specialists\n 2. Identify patterns and correlations\n 3. Resolve conflicting opinions\n 4. Generate probability-ranked differential diagnoses\n 5. Recommend additional testing if needed\n \n Analysis framework:\n - Weight evidence based on reliability and specificity\n - Consider epidemiological factors\n - Evaluate diagnostic certainty\n - Account for test limitations\n \n Provide structured output including:\n 1. Primary diagnosis with confidence level\n 2. Supporting evidence summary\n 3. Alternative diagnoses to consider\n 4. Recommended confirmatory tests\n 5. Red flags or warning signs\n 6. Follow-up recommendations\n \n Documentation requirements:\n - Clear reasoning chain\n - Evidence quality assessment\n - Confidence levels for each diagnosis\n - Knowledge gaps identified\n - Risk assessment\u0026quot;\u0026quot;\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n)\n\n# Create agent list\nagents = [chief_medical_officer, virologist, internist, synthesizer]\n\n# Define diagnostic flow\nflow = f\u0026quot;\u0026quot;\u0026quot;{chief_medical_officer.agent_name} -\u0026gt; {virologist.agent_name} -\u0026gt; {internist.agent_name} -\u0026gt; {synthesizer.agent_name}\u0026quot;\u0026quot;\u0026quot;\n\n# Create the swarm system\ndiagnosis_system = AgentRearrange(\n name=\u0026quot;Medical-nlp-diagnosis-swarm\u0026quot;,\n description=\u0026quot;natural language symptions to diagnosis report\u0026quot;,\n agents=agents,\n flow=flow,\n max_loops=1,\n output_type=\u0026quot;all\u0026quot;,\n)\n\n\n# Example usage\nif __name__ == \u0026quot;__main__\u0026quot;:\n # Example patient case\n patient_case = \u0026quot;\u0026quot;\u0026quot;\n Patient: 45-year-old female\n Presenting symptoms: \n - Fever (101.5°F) for 3 days\n - Dry cough\n - Fatigue\n - Mild shortness of breath\n Medical history:\n - Controlled hypertension\n - No recent travel\n - Fully vaccinated for COVID-19\n - No known sick contacts\n \u0026quot;\u0026quot;\u0026quot;\n\n # Add timestamp to the patient case\n case_info = f\u0026quot;Timestamp: {datetime.now()}\\nPatient Information: {patient_case}\u0026quot;\n\n # Run the diagnostic process\n diagnosis = diagnosis_system.run(case_info)\n\n # Create a folder and file called reports\n create_file_in_folder(\n \u0026quot;reports\u0026quot;, \u0026quot;medical_analysis_agent_rearrange.md\u0026quot;, diagnosis\n )\n\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edatetime\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edatetime\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eAgentRearrange\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecreate_file_in_folder\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003echief_medical_officer\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Chief Medical Officer\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are the Chief Medical Officer coordinating a team of medical specialists for viral disease diagnosis.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your responsibilities include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Gathering initial patient symptoms and medical history\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Coordinating with specialists to form differential diagnoses\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Synthesizing different specialist opinions into a cohesive diagnosis\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Ensuring all relevant symptoms and test results are considered\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Making final diagnostic recommendations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Suggesting treatment plans based on team input\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Identifying when additional specialists need to be consulted\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Guidelines:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Always start with a comprehensive patient history\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Consider both common and rare viral conditions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Factor in patient demographics and risk factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Document your reasoning process clearly\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Highlight any critical or emergency symptoms\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 6. Note any limitations or uncertainties in the diagnosis\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Format all responses with clear sections for:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Initial Assessment\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Differential Diagnoses\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Specialist Consultations Needed\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Recommended Next Steps\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# Models from litellm -\u0026gt; claude-2\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Viral Disease Specialist\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003evirologist\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Virologist\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a specialist in viral diseases with expertise in:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Respiratory viruses (Influenza, Coronavirus, RSV)\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Systemic viral infections (EBV, CMV, HIV)\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Childhood viral diseases (Measles, Mumps, Rubella)\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Emerging viral threats\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Your role involves:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Analyzing symptoms specific to viral infections\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Distinguishing between different viral pathogens\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Assessing viral infection patterns and progression\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Recommending specific viral tests\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Evaluating epidemiological factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For each case, consider:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Incubation periods\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Transmission patterns\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Seasonal factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Geographic prevalence\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Patient immune status\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Current viral outbreaks\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Provide detailed analysis of:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Characteristic viral symptoms\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Disease progression timeline\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Risk factors for severe disease\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Potential complications\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Internal Medicine Specialist\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003einternist\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Internist\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are an Internal Medicine specialist responsible for:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Comprehensive system-based evaluation\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Integration of symptoms across organ systems\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Identification of systemic manifestations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Assessment of comorbidities\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e For each case, analyze:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Vital signs and their implications\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. System-by-system review (cardiovascular, respiratory, etc.)\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Impact of existing medical conditions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Medication interactions and contraindications\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Risk stratification\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Consider these aspects:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Age-related factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Chronic disease impact\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Medication history\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Social and environmental factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Document:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Physical examination findings\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - System-specific symptoms\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Relevant lab abnormalities\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Risk factors for complications\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Diagnostic Synthesizer\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003esynthesizer\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Diagnostic Synthesizer\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are responsible for synthesizing all specialist inputs to create a final diagnostic assessment:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Core responsibilities:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Integrate findings from all specialists\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Identify patterns and correlations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Resolve conflicting opinions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Generate probability-ranked differential diagnoses\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Recommend additional testing if needed\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Analysis framework:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Weight evidence based on reliability and specificity\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Consider epidemiological factors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Evaluate diagnostic certainty\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Account for test limitations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Provide structured output including:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1. Primary diagnosis with confidence level\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 2. Supporting evidence summary\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 3. Alternative diagnoses to consider\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 4. Recommended confirmatory tests\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 5. Red flags or warning signs\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 6. Follow-up recommendations\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Documentation requirements:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Clear reasoning chain\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Evidence quality assessment\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Confidence levels for each diagnosis\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Knowledge gaps identified\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Risk assessment\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Create agent list\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\u003cspan class=\"pl-s1\"\u003echief_medical_officer\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003evirologist\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003einternist\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003esynthesizer\u003c/span\u003e]\n\n\u003cspan class=\"pl-c\"\u003e# Define diagnostic flow\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eflow\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003ef\"\"\"\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003echief_medical_officer\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e -\u0026gt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003evirologist\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e -\u0026gt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003einternist\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e -\u0026gt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esynthesizer\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Create the swarm system\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003ediagnosis_system\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgentRearrange\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Medical-nlp-diagnosis-swarm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"natural language symptions to diagnosis report\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eflow\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eflow\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"all\"\u003c/span\u003e,\n)\n\n\n\u003cspan class=\"pl-c\"\u003e# Example usage\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e__name__\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"__main__\"\u003c/span\u003e:\n \u003cspan class=\"pl-c\"\u003e# Example patient case\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003epatient_case\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Patient: 45-year-old female\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Presenting symptoms: \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Fever (101.5°F) for 3 days\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Dry cough\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Fatigue\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Mild shortness of breath\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Medical history:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Controlled hypertension\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - No recent travel\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - Fully vaccinated for COVID-19\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e - No known sick contacts\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# Add timestamp to the patient case\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ecase_info\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003ef\"Timestamp: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edatetime\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003enow\u003c/span\u003e()\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"pl-cce\"\u003e\\n\u003c/span\u003ePatient Information: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epatient_case\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e# Run the diagnostic process\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003ediagnosis\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ediagnosis_system\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ecase_info\u003c/span\u003e)\n\n \u003cspan class=\"pl-c\"\u003e# Create a folder and file called reports\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003ecreate_file_in_folder\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"reports\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"medical_analysis_agent_rearrange.md\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ediagnosis\u003c/span\u003e\n )\n\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eHierarhicalSwarm\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-hierarhicalswarm\" class=\"anchor\" aria-label=\"Permalink: HierarhicalSwarm\" href=\"#hierarhicalswarm\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eComing soon...\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eGraphSwarm\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-graphswarm\" class=\"anchor\" aria-label=\"Permalink: GraphSwarm\" href=\"#graphswarm\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eGraphSwarm\u003c/code\u003e is a workflow management system designed to orchestrate complex tasks by leveraging the power of graph theory. It enables the creation of a directed acyclic graph (DAG) to model dependencies between tasks and agents. This allows for efficient task assignment, execution, and monitoring.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eHere's a breakdown of how the \u003ccode\u003eGraphSwarm\u003c/code\u003e works:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eNode Creation\u003c/strong\u003e: The \u003ccode\u003eGraphSwarm\u003c/code\u003e workflow is composed of nodes, which can be either agents or tasks. Agents are responsible for executing tasks, and tasks represent specific operations that need to be performed. In the example, two agents (\u003ccode\u003eagent1\u003c/code\u003e and \u003ccode\u003eagent2\u003c/code\u003e) and one task (\u003ccode\u003etask1\u003c/code\u003e) are created.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eEdge Definition\u003c/strong\u003e: Edges are used to define the relationships between nodes. In this case, edges are created to connect \u003ccode\u003eagent1\u003c/code\u003e and \u003ccode\u003eagent2\u003c/code\u003e to \u003ccode\u003etask1\u003c/code\u003e, indicating that both agents are capable of executing \u003ccode\u003etask1\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eEntry and End Points\u003c/strong\u003e: The \u003ccode\u003eGraphSwarm\u003c/code\u003e workflow requires the definition of entry points (where the workflow starts) and end points (where the workflow concludes). In this example, \u003ccode\u003eagent1\u003c/code\u003e and \u003ccode\u003eagent2\u003c/code\u003e are set as entry points, and \u003ccode\u003etask1\u003c/code\u003e is set as the end point.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eVisualization\u003c/strong\u003e: The \u003ccode\u003eGraphSwarm\u003c/code\u003e provides a visualization feature to graphically represent the workflow. This allows for easy understanding and debugging of the workflow structure.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eExecution\u003c/strong\u003e: The \u003ccode\u003eGraphSwarm\u003c/code\u003e workflow is executed by traversing the graph from the entry points to the end points. In this case, both \u003ccode\u003eagent1\u003c/code\u003e and \u003ccode\u003eagent2\u003c/code\u003e execute \u003ccode\u003etask1\u003c/code\u003e concurrently, and the results are collected.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eResults\u003c/strong\u003e: The final results of the workflow execution are aggregated and returned. In this example, the result of executing \u003ccode\u003etask1\u003c/code\u003e is \"Task completed\".\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eGraphSwarm\u003c/code\u003e offers several benefits, including:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eConcurrency\u003c/strong\u003e: Enables the execution of tasks concurrently, improving overall workflow efficiency.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eFlexibility\u003c/strong\u003e: Allows for dynamic task assignment based on agent availability and task requirements.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eScalability\u003c/strong\u003e: Supports the addition of new agents and tasks as needed, making it suitable for large-scale workflows.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eVisualization\u003c/strong\u003e: Provides a graphical representation of the workflow, facilitating understanding and debugging.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eBy leveraging the \u003ccode\u003eGraphSwarm\u003c/code\u003e, complex workflows can be efficiently managed, and tasks can be executed in a coordinated and scalable manner.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods-2\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods-2\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eadd_node\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAdd a node to the graph\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003enode\u003c/code\u003e: Node object\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eadd_edge\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAdd an edge to the graph\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eedge\u003c/code\u003e: Edge object\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eset_entry_points\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSet the entry points of the graph\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eentry_points\u003c/code\u003e: List of node IDs\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eset_end_points\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSet the end points of the graph\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eend_points\u003c/code\u003e: List of node IDs\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003evisualize\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eGenerate a visual representation of the graph\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003ctd\u003eString representation of the graph\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the workflow\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003ctd\u003eDictionary of execution results\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs-2\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs-2\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eNode\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eObject\u003c/td\u003e\n\u003ctd\u003eRepresents a node in the graph (agent or task)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eEdge\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eObject\u003c/td\u003e\n\u003ctd\u003eRepresents an edge connecting two nodes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eentry_points\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[str]\u003c/td\u003e\n\u003ctd\u003eList of node IDs where the workflow starts\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eend_points\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[str]\u003c/td\u003e\n\u003ctd\u003eList of node IDs where the workflow ends\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output-2\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output-2\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns a dictionary containing the execution results of all nodes in the graph.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\n\nfrom dotenv import load_dotenv\n\n\nfrom swarms import Agent, Edge, GraphWorkflow, Node, NodeType\n\nfrom swarm_models import OpenAIChat\n\nload_dotenv()\n\napi_key = os.environ.get(\u0026quot;OPENAI_API_KEY\u0026quot;)\n\nllm = OpenAIChat(\n temperature=0.5, openai_api_key=api_key, max_tokens=4000\n)\nagent1 = Agent(llm=llm, max_loops=1, autosave=True, dashboard=True)\nagent2 = Agent(llm=llm, max_loops=1, autosave=True, dashboard=True)\n\ndef sample_task():\n print(\u0026quot;Running sample task\u0026quot;)\n return \u0026quot;Task completed\u0026quot;\n\nwf_graph = GraphWorkflow()\nwf_graph.add_node(Node(id=\u0026quot;agent1\u0026quot;, type=NodeType.AGENT, agent=agent1))\nwf_graph.add_node(Node(id=\u0026quot;agent2\u0026quot;, type=NodeType.AGENT, agent=agent2))\nwf_graph.add_node(\n Node(id=\u0026quot;task1\u0026quot;, type=NodeType.TASK, callable=sample_task)\n)\nwf_graph.add_edge(Edge(source=\u0026quot;agent1\u0026quot;, target=\u0026quot;task1\u0026quot;))\nwf_graph.add_edge(Edge(source=\u0026quot;agent2\u0026quot;, target=\u0026quot;task1\u0026quot;))\n\nwf_graph.set_entry_points([\u0026quot;agent1\u0026quot;, \u0026quot;agent2\u0026quot;])\nwf_graph.set_end_points([\u0026quot;task1\u0026quot;])\n\nprint(wf_graph.visualize())\n\n# Run the workflow\nresults = wf_graph.run()\nprint(\u0026quot;Execution results:\u0026quot;, results)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edotenv\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eload_dotenv\u003c/span\u003e\n\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eEdge\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eGraphWorkflow\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eNode\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eNodeType\u003c/span\u003e\n\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eOpenAIChat\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003eload_dotenv\u003c/span\u003e()\n\n\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eenviron\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eget\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"OPENAI_API_KEY\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eOpenAIChat\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003etemperature\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.5\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eopenai_api_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emax_tokens\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e4000\u003c/span\u003e\n)\n\u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e)\n\n\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-en\"\u003esample_task\u003c/span\u003e():\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"Running sample task\"\u003c/span\u003e)\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Task completed\"\u003c/span\u003e\n\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eGraphWorkflow\u003c/span\u003e()\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_node\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003eNode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eid\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent1\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etype\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eNodeType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eAGENT\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e))\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_node\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003eNode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eid\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent2\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etype\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eNodeType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eAGENT\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e))\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_node\u003c/span\u003e(\n \u003cspan class=\"pl-en\"\u003eNode\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eid\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"task1\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etype\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eNodeType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eTASK\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ecallable\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esample_task\u003c/span\u003e)\n)\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_edge\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003eEdge\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003esource\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent1\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etarget\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"task1\"\u003c/span\u003e))\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd_edge\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003eEdge\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003esource\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"agent2\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etarget\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"task1\"\u003c/span\u003e))\n\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eset_entry_points\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e\"agent1\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"agent2\"\u003c/span\u003e])\n\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eset_end_points\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e\"task1\"\u003c/span\u003e])\n\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003evisualize\u003c/span\u003e())\n\n\u003cspan class=\"pl-c\"\u003e# Run the workflow\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eresults\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ewf_graph\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e()\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"Execution results:\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eresults\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eMixtureOfAgents\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-mixtureofagents\" class=\"anchor\" aria-label=\"Permalink: MixtureOfAgents\" href=\"#mixtureofagents\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis is an implementation based on the paper: \"Mixture-of-Agents Enhances Large Language Model Capabilities\" by together.ai, available at \u003ca href=\"https://arxiv.org/abs/2406.04692\" rel=\"nofollow\"\u003ehttps://arxiv.org/abs/2406.04692\u003c/a\u003e. It achieves state-of-the-art (SOTA) results on AlpacaEval 2.0, MT-Bench, and FLASK, surpassing GPT-4 Omni. This architecture is particularly suitable for tasks that require parallelization followed by sequential processing in another loop.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods-3\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods-3\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e__init__\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInitialize the MixtureOfAgents\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e: Name of the swarm\u003cbr\u003e\u003ccode\u003eagents\u003c/code\u003e: List of Agent objects\u003cbr\u003e\u003ccode\u003elayers\u003c/code\u003e: Number of processing layers\u003cbr\u003e\u003ccode\u003efinal_agent\u003c/code\u003e: Agent for final processing\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the swarm\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etask\u003c/code\u003e: Input task for the swarm\u003c/td\u003e\n\u003ctd\u003eFinal output after all agents have processed\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs-3\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs-3\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003eName of the swarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[Agent]\u003c/td\u003e\n\u003ctd\u003eList of Agent objects to be used in the swarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003elayers\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eint\u003c/td\u003e\n\u003ctd\u003eNumber of processing layers in the swarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003efinal_agent\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAgent\u003c/td\u003e\n\u003ctd\u003eAgent responsible for final processing\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output-3\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output-3\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns the final output after all agents have processed the input according to the specified layers and final agent.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\nimport os\nfrom swarms import Agent, MixtureOfAgents\n\n# Agent 1: Financial Statement Analyzer\nagent1 = Agent(\n agent_name=\u0026quot;FinancialStatementAnalyzer\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a Financial Statement Analyzer specializing in 10-K SEC reports. Your primary focus is on analyzing the financial statements, including the balance sheet, income statement, and cash flow statement. \n\nKey responsibilities:\n1. Identify and explain significant changes in financial metrics year-over-year.\n2. Calculate and interpret key financial ratios (e.g., liquidity ratios, profitability ratios, leverage ratios).\n3. Analyze trends in revenue, expenses, and profitability.\n4. Highlight any red flags or areas of concern in the financial statements.\n5. Provide insights on the company's financial health and performance based on the data.\n\nWhen analyzing, consider industry standards and compare the company's performance to its peers when possible. Your analysis should be thorough, data-driven, and provide actionable insights for investors and stakeholders.\u0026quot;\u0026quot;\u0026quot;,\n max_loops=1,\n autosave=True,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;financial_statement_analyzer_state.json\u0026quot;,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n return_step_meta=False,\n)\n\n# Agent 2: Risk Assessment Specialist\nagent2 = Agent(\n agent_name=\u0026quot;RiskAssessmentSpecialist\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a Risk Assessment Specialist focusing on 10-K SEC reports. Your primary role is to identify, analyze, and evaluate potential risks disclosed in the report.\n\nKey responsibilities:\n1. Thoroughly review the \u0026quot;Risk Factors\u0026quot; section of the 10-K report.\n2. Identify and categorize different types of risks (e.g., operational, financial, legal, market, technological).\n3. Assess the potential impact and likelihood of each identified risk.\n4. Analyze the company's risk mitigation strategies and their effectiveness.\n5. Identify any emerging risks not explicitly mentioned but implied by the company's operations or market conditions.\n6. Compare the company's risk profile with industry peers when possible.\n\nYour analysis should provide a comprehensive overview of the company's risk landscape, helping stakeholders understand the potential challenges and uncertainties facing the business. Be sure to highlight any critical risks that could significantly impact the company's future performance or viability.\u0026quot;\u0026quot;\u0026quot;,\n max_loops=1,\n autosave=True,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;risk_assessment_specialist_state.json\u0026quot;,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n return_step_meta=False,\n)\n\n# Agent 3: Business Strategy Evaluator\nagent3 = Agent(\n agent_name=\u0026quot;BusinessStrategyEvaluator\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a Business Strategy Evaluator specializing in analyzing 10-K SEC reports. Your focus is on assessing the company's overall strategy, market position, and future outlook.\n\nKey responsibilities:\n1. Analyze the company's business description, market opportunities, and competitive landscape.\n2. Evaluate the company's products or services, including their market share and growth potential.\n3. Assess the effectiveness of the company's current business strategy and its alignment with market trends.\n4. Identify key performance indicators (KPIs) and evaluate the company's performance against these metrics.\n5. Analyze management's discussion and analysis (MD\u0026amp;A) section to understand their perspective on the business.\n6. Identify potential growth opportunities or areas for improvement in the company's strategy.\n7. Compare the company's strategic position with key competitors in the industry.\n\nYour analysis should provide insights into the company's strategic direction, its ability to create value, and its potential for future growth. Consider both short-term and long-term perspectives in your evaluation.\u0026quot;\u0026quot;\u0026quot;,\n max_loops=1,\n autosave=True,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;business_strategy_evaluator_state.json\u0026quot;,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n return_step_meta=False,\n)\n\n# Aggregator Agent\naggregator_agent = Agent(\n agent_name=\u0026quot;10KReportAggregator\u0026quot;,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are the 10-K Report Aggregator, responsible for synthesizing and summarizing the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator. Your goal is to create a comprehensive, coherent, and insightful summary of the 10-K SEC report.\n\nKey responsibilities:\n1. Integrate the financial analysis, risk assessment, and business strategy evaluation into a unified report.\n2. Identify and highlight the most critical information and insights from each specialist's analysis.\n3. Reconcile any conflicting information or interpretations among the specialists' reports.\n4. Provide a balanced view of the company's overall performance, risks, and strategic position.\n5. Summarize key findings and their potential implications for investors and stakeholders.\n6. Identify any areas where further investigation or clarification may be needed.\n\nYour final report should be well-structured, easy to understand, and provide a holistic view of the company based on the 10-K SEC report. It should offer valuable insights for decision-making while acknowledging any limitations or uncertainties in the analysis.\u0026quot;\u0026quot;\u0026quot;,\n max_loops=1,\n autosave=True,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;10k_report_aggregator_state.json\u0026quot;,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n return_step_meta=False,\n)\n\n# Create the Mixture of Agents class\nmoa = MixtureOfAgents(\n agents=[agent1, agent2, agent3],\n aggregator_agent=aggregator_agent,\n aggregator_system_prompt=\u0026quot;\u0026quot;\u0026quot;As the 10-K Report Aggregator, your task is to synthesize the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator into a comprehensive and coherent report. \n\nFollow these steps:\n1. Review and summarize the key points from each specialist's analysis.\n2. Identify common themes and insights across the analyses.\n3. Highlight any discrepancies or conflicting interpretations, if present.\n4. Provide a balanced and integrated view of the company's financial health, risks, and strategic position.\n5. Summarize the most critical findings and their potential impact on investors and stakeholders.\n6. Suggest areas for further investigation or monitoring, if applicable.\n\nYour final output should be a well-structured, insightful report that offers a holistic view of the company based on the 10-K SEC report analysis.\u0026quot;\u0026quot;\u0026quot;,\n layers=3,\n)\n\n# Example usage\ncompany_name = \u0026quot;NVIDIA\u0026quot;\nout = moa.run(\n f\u0026quot;Analyze the latest 10-K SEC report for {company_name}. Provide a comprehensive summary of the company's financial performance, risk profile, and business strategy.\u0026quot;\n)\nprint(out)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eMixtureOfAgents\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Agent 1: Financial Statement Analyzer\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"FinancialStatementAnalyzer\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a Financial Statement Analyzer specializing in 10-K SEC reports. Your primary focus is on analyzing the financial statements, including the balance sheet, income statement, and cash flow statement. \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eKey responsibilities:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Identify and explain significant changes in financial metrics year-over-year.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Calculate and interpret key financial ratios (e.g., liquidity ratios, profitability ratios, leverage ratios).\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Analyze trends in revenue, expenses, and profitability.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Highlight any red flags or areas of concern in the financial statements.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Provide insights on the company's financial health and performance based on the data.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eWhen analyzing, consider industry standards and compare the company's performance to its peers when possible. Your analysis should be thorough, data-driven, and provide actionable insights for investors and stakeholders.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"financial_statement_analyzer_state.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Agent 2: Risk Assessment Specialist\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"RiskAssessmentSpecialist\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a Risk Assessment Specialist focusing on 10-K SEC reports. Your primary role is to identify, analyze, and evaluate potential risks disclosed in the report.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eKey responsibilities:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Thoroughly review the \"Risk Factors\" section of the 10-K report.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Identify and categorize different types of risks (e.g., operational, financial, legal, market, technological).\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Assess the potential impact and likelihood of each identified risk.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Analyze the company's risk mitigation strategies and their effectiveness.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Identify any emerging risks not explicitly mentioned but implied by the company's operations or market conditions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Compare the company's risk profile with industry peers when possible.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYour analysis should provide a comprehensive overview of the company's risk landscape, helping stakeholders understand the potential challenges and uncertainties facing the business. Be sure to highlight any critical risks that could significantly impact the company's future performance or viability.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"risk_assessment_specialist_state.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Agent 3: Business Strategy Evaluator\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagent3\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"BusinessStrategyEvaluator\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a Business Strategy Evaluator specializing in analyzing 10-K SEC reports. Your focus is on assessing the company's overall strategy, market position, and future outlook.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eKey responsibilities:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Analyze the company's business description, market opportunities, and competitive landscape.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Evaluate the company's products or services, including their market share and growth potential.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Assess the effectiveness of the company's current business strategy and its alignment with market trends.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Identify key performance indicators (KPIs) and evaluate the company's performance against these metrics.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Analyze management's discussion and analysis (MD\u0026amp;A) section to understand their perspective on the business.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Identify potential growth opportunities or areas for improvement in the company's strategy.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Compare the company's strategic position with key competitors in the industry.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYour analysis should provide insights into the company's strategic direction, its ability to create value, and its potential for future growth. Consider both short-term and long-term perspectives in your evaluation.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"business_strategy_evaluator_state.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Aggregator Agent\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eaggregator_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"10KReportAggregator\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are the 10-K Report Aggregator, responsible for synthesizing and summarizing the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator. Your goal is to create a comprehensive, coherent, and insightful summary of the 10-K SEC report.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eKey responsibilities:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Integrate the financial analysis, risk assessment, and business strategy evaluation into a unified report.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Identify and highlight the most critical information and insights from each specialist's analysis.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Reconcile any conflicting information or interpretations among the specialists' reports.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide a balanced view of the company's overall performance, risks, and strategic position.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Summarize key findings and their potential implications for investors and stakeholders.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Identify any areas where further investigation or clarification may be needed.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYour final report should be well-structured, easy to understand, and provide a holistic view of the company based on the 10-K SEC report. It should offer valuable insights for decision-making while acknowledging any limitations or uncertainties in the analysis.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"10k_report_aggregator_state.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ereturn_step_meta\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Create the Mixture of Agents class\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emoa\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eMixtureOfAgents\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagent3\u003c/span\u003e],\n \u003cspan class=\"pl-s1\"\u003eaggregator_agent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eaggregator_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eaggregator_system_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"As the 10-K Report Aggregator, your task is to synthesize the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator into a comprehensive and coherent report. \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eFollow these steps:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Review and summarize the key points from each specialist's analysis.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Identify common themes and insights across the analyses.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Highlight any discrepancies or conflicting interpretations, if present.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide a balanced and integrated view of the company's financial health, risks, and strategic position.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Summarize the most critical findings and their potential impact on investors and stakeholders.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Suggest areas for further investigation or monitoring, if applicable.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYour final output should be a well-structured, insightful report that offers a holistic view of the company based on the 10-K SEC report analysis.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003elayers\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Example usage\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003ecompany_name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"NVIDIA\"\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emoa\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003ef\"Analyze the latest 10-K SEC report for \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecompany_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e. Provide a comprehensive summary of the company's financial performance, risk profile, and business strategy.\"\u003c/span\u003e\n)\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eout\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSpreadSheetSwarm\u003c/h2\u003e\u003ca id=\"user-content-spreadsheetswarm\" class=\"anchor\" aria-label=\"Permalink: SpreadSheetSwarm\" href=\"#spreadsheetswarm\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eSpreadSheetSwarm\u003c/code\u003e is designed for concurrent management and oversight of thousands of agents, facilitating a one-to-many approach for efficient task processing and output analysis.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eKey Features\u003c/h3\u003e\u003ca id=\"user-content-key-features\" class=\"anchor\" aria-label=\"Permalink: Key Features\" href=\"#key-features\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eConcurrency\u003c/strong\u003e: Enables the simultaneous execution of multiple agents, significantly reducing processing time and increasing overall system efficiency.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eOne-to-Many\u003c/strong\u003e: Allows a single task to be dynamically distributed among multiple agents, ensuring that each agent is utilized to its full potential.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eScalability\u003c/strong\u003e: Supports the integration of thousands of agents, making it an ideal solution for large-scale task processing and data analysis.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods-4\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods-4\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e__init__\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInitialize the SpreadSheetSwarm\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e: Name of the swarm\u003cbr\u003e\u003ccode\u003edescription\u003c/code\u003e: Description of the swarm\u003cbr\u003e\u003ccode\u003eagents\u003c/code\u003e: List of Agent objects\u003cbr\u003e\u003ccode\u003eautosave_on\u003c/code\u003e: Boolean to enable autosave\u003cbr\u003e\u003ccode\u003esave_file_path\u003c/code\u003e: Path to save the spreadsheet\u003cbr\u003e\u003ccode\u003erun_all_agents\u003c/code\u003e: Boolean to run all agents or not\u003cbr\u003e\u003ccode\u003emax_loops\u003c/code\u003e: Maximum number of loops\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the swarm\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etask\u003c/code\u003e: Input task for the swarm\u003c/td\u003e\n\u003ctd\u003eDictionary of agent outputs\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs-4\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs-4\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003eName of the swarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edescription\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003eDescription of the swarm's purpose\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eagents\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[Agent]\u003c/td\u003e\n\u003ctd\u003eList of Agent objects to be used in the swarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eautosave_on\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebool\u003c/td\u003e\n\u003ctd\u003eEnable autosaving of results\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esave_file_path\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003ePath to save the spreadsheet results\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun_all_agents\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebool\u003c/td\u003e\n\u003ctd\u003eWhether to run all agents or select based on relevance\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003emax_loops\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eint\u003c/td\u003e\n\u003ctd\u003eMaximum number of processing loops\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output-4\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output-4\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns a dictionary containing the outputs of each agent that processed the task.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/spreadsheet_swarm/\" rel=\"nofollow\"\u003eLearn more at the docs here:\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\nfrom swarms import Agent, SpreadSheetSwarm\nfrom swarm_models import OpenAIChat\n\n# Define custom system prompts for each social media platform\nTWITTER_AGENT_SYS_PROMPT = \u0026quot;\u0026quot;\u0026quot;\nYou are a Twitter marketing expert specializing in real estate. Your task is to create engaging, concise tweets to promote properties, analyze trends to maximize engagement, and use appropriate hashtags and timing to reach potential buyers.\n\u0026quot;\u0026quot;\u0026quot;\n\nINSTAGRAM_AGENT_SYS_PROMPT = \u0026quot;\u0026quot;\u0026quot;\nYou are an Instagram marketing expert focusing on real estate. Your task is to create visually appealing posts with engaging captions and hashtags to showcase properties, targeting specific demographics interested in real estate.\n\u0026quot;\u0026quot;\u0026quot;\n\nFACEBOOK_AGENT_SYS_PROMPT = \u0026quot;\u0026quot;\u0026quot;\nYou are a Facebook marketing expert for real estate. Your task is to craft posts optimized for engagement and reach on Facebook, including using images, links, and targeted messaging to attract potential property buyers.\n\u0026quot;\u0026quot;\u0026quot;\n\nLINKEDIN_AGENT_SYS_PROMPT = \u0026quot;\u0026quot;\u0026quot;\nYou are a LinkedIn marketing expert for the real estate industry. Your task is to create professional and informative posts, highlighting property features, market trends, and investment opportunities, tailored to professionals and investors.\n\u0026quot;\u0026quot;\u0026quot;\n\nEMAIL_AGENT_SYS_PROMPT = \u0026quot;\u0026quot;\u0026quot;\nYou are an Email marketing expert specializing in real estate. Your task is to write compelling email campaigns to promote properties, focusing on personalization, subject lines, and effective call-to-action strategies to drive conversions.\n\u0026quot;\u0026quot;\u0026quot;\n\n# Initialize your agents for different social media platforms\nagents = [\n Agent(\n agent_name=\u0026quot;Twitter-RealEstate-Agent\u0026quot;,\n system_prompt=TWITTER_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;twitter_realestate_agent.json\u0026quot;,\n user_name=\u0026quot;realestate_swarms\u0026quot;,\n retry_attempts=1,\n ),\n Agent(\n agent_name=\u0026quot;Instagram-RealEstate-Agent\u0026quot;,\n system_prompt=INSTAGRAM_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;instagram_realestate_agent.json\u0026quot;,\n user_name=\u0026quot;realestate_swarms\u0026quot;,\n retry_attempts=1,\n ),\n Agent(\n agent_name=\u0026quot;Facebook-RealEstate-Agent\u0026quot;,\n system_prompt=FACEBOOK_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;facebook_realestate_agent.json\u0026quot;,\n user_name=\u0026quot;realestate_swarms\u0026quot;,\n retry_attempts=1,\n ),\n Agent(\n agent_name=\u0026quot;LinkedIn-RealEstate-Agent\u0026quot;,\n system_prompt=LINKEDIN_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;linkedin_realestate_agent.json\u0026quot;,\n user_name=\u0026quot;realestate_swarms\u0026quot;,\n retry_attempts=1,\n ),\n Agent(\n agent_name=\u0026quot;Email-RealEstate-Agent\u0026quot;,\n system_prompt=EMAIL_AGENT_SYS_PROMPT,\n model_name=\u0026quot;gpt-4o\u0026quot;,\n max_loops=1,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;email_realestate_agent.json\u0026quot;,\n user_name=\u0026quot;realestate_swarms\u0026quot;,\n retry_attempts=1,\n ),\n]\n\n# Create a Swarm with the list of agents\nswarm = SpreadSheetSwarm(\n name=\u0026quot;Real-Estate-Marketing-Swarm\u0026quot;,\n description=\u0026quot;A swarm that processes real estate marketing tasks using multiple agents on different threads.\u0026quot;,\n agents=agents,\n autosave_on=True,\n save_file_path=\u0026quot;real_estate_marketing_spreadsheet.csv\u0026quot;,\n run_all_agents=False,\n max_loops=2,\n)\n\n# Run the swarm\nswarm.run(\n task=\u0026quot;\u0026quot;\u0026quot;\n Create posts to promote luxury properties in North Texas, highlighting their features, location, and investment potential. Include relevant hashtags, images, and engaging captions.\n\n \n Property:\n $10,399,000\n 1609 Meandering Way Dr, Roanoke, TX 76262\n Link to the property: https://www.zillow.com/homedetails/1609-Meandering-Way-Dr-Roanoke-TX-76262/308879785_zpid/\n \n What's special\n Unveiling a new custom estate in the prestigious gated Quail Hollow Estates! This impeccable residence, set on a sprawling acre surrounded by majestic trees, features a gourmet kitchen equipped with top-tier Subzero and Wolf appliances. European soft-close cabinets and drawers, paired with a double Cambria Quartzite island, perfect for family gatherings. The first-floor game room\u0026amp;media room add extra layers of entertainment. Step into the outdoor sanctuary, where a sparkling pool and spa, and sunken fire pit, beckon leisure. The lavish master suite features stunning marble accents, custom his\u0026amp;her closets, and a secure storm shelter.Throughout the home,indulge in the visual charm of designer lighting and wallpaper, elevating every space. The property is complete with a 6-car garage and a sports court, catering to the preferences of basketball or pickleball enthusiasts. This residence seamlessly combines luxury\u0026amp;recreational amenities, making it a must-see for the discerning buyer.\n \n Facts \u0026amp; features\n Interior\n Bedrooms \u0026amp; bathrooms\n Bedrooms: 6\n Bathrooms: 8\n Full bathrooms: 7\n 1/2 bathrooms: 1\n Primary bedroom\n Bedroom\n Features: Built-in Features, En Suite Bathroom, Walk-In Closet(s)\n Cooling\n Central Air, Ceiling Fan(s), Electric\n Appliances\n Included: Built-In Gas Range, Built-In Refrigerator, Double Oven, Dishwasher, Gas Cooktop, Disposal, Ice Maker, Microwave, Range, Refrigerator, Some Commercial Grade, Vented Exhaust Fan, Warming Drawer, Wine Cooler\n Features\n Wet Bar, Built-in Features, Dry Bar, Decorative/Designer Lighting Fixtures, Eat-in Kitchen, Elevator, High Speed Internet, Kitchen Island, Pantry, Smart Home, Cable TV, Walk-In Closet(s), Wired for Sound\n Flooring: Hardwood\n Has basement: No\n Number of fireplaces: 3\n Fireplace features: Living Room, Primary Bedroom\n Interior area\n Total interior livable area: 10,466 sqft\n Total spaces: 12\n Parking features: Additional Parking\n Attached garage spaces: 6\n Carport spaces: 6\n Features\n Levels: Two\n Stories: 2\n Patio \u0026amp; porch: Covered\n Exterior features: Built-in Barbecue, Barbecue, Gas Grill, Lighting, Outdoor Grill, Outdoor Living Area, Private Yard, Sport Court, Fire Pit\n Pool features: Heated, In Ground, Pool, Pool/Spa Combo\n Fencing: Wrought Iron\n Lot\n Size: 1.05 Acres\n Details\n Additional structures: Outdoor Kitchen\n Parcel number: 42232692\n Special conditions: Standard\n Construction\n Type \u0026amp; style\n Home type: SingleFamily\n Architectural style: Contemporary/Modern,Detached\n Property subtype: Single Family Residence\n \u0026quot;\u0026quot;\u0026quot;\n)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eSpreadSheetSwarm\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eOpenAIChat\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Define custom system prompts for each social media platform\u003c/span\u003e\n\u003cspan class=\"pl-c1\"\u003eTWITTER_AGENT_SYS_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYou are a Twitter marketing expert specializing in real estate. Your task is to create engaging, concise tweets to promote properties, analyze trends to maximize engagement, and use appropriate hashtags and timing to reach potential buyers.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eINSTAGRAM_AGENT_SYS_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYou are an Instagram marketing expert focusing on real estate. Your task is to create visually appealing posts with engaging captions and hashtags to showcase properties, targeting specific demographics interested in real estate.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eFACEBOOK_AGENT_SYS_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYou are a Facebook marketing expert for real estate. Your task is to craft posts optimized for engagement and reach on Facebook, including using images, links, and targeted messaging to attract potential property buyers.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eLINKEDIN_AGENT_SYS_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYou are a LinkedIn marketing expert for the real estate industry. Your task is to create professional and informative posts, highlighting property features, market trends, and investment opportunities, tailored to professionals and investors.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eEMAIL_AGENT_SYS_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eYou are an Email marketing expert specializing in real estate. Your task is to write compelling email campaigns to promote properties, focusing on personalization, subject lines, and effective call-to-action strategies to drive conversions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Initialize your agents for different social media platforms\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Twitter-RealEstate-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTWITTER_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"twitter_realestate_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"realestate_swarms\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Instagram-RealEstate-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eINSTAGRAM_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"instagram_realestate_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"realestate_swarms\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Facebook-RealEstate-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFACEBOOK_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"facebook_realestate_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"realestate_swarms\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"LinkedIn-RealEstate-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eLINKEDIN_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"linkedin_realestate_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"realestate_swarms\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Email-RealEstate-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eEMAIL_AGENT_SYS_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"email_realestate_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"realestate_swarms\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n ),\n]\n\n\u003cspan class=\"pl-c\"\u003e# Create a Swarm with the list of agents\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eswarm\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSpreadSheetSwarm\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Real-Estate-Marketing-Swarm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"A swarm that processes real estate marketing tasks using multiple agents on different threads.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esave_file_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"real_estate_marketing_spreadsheet.csv\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003erun_all_agents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Run the swarm\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eswarm\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Create posts to promote luxury properties in North Texas, highlighting their features, location, and investment potential. Include relevant hashtags, images, and engaging captions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Property:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e $10,399,000\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1609 Meandering Way Dr, Roanoke, TX 76262\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Link to the property: https://www.zillow.com/homedetails/1609-Meandering-Way-Dr-Roanoke-TX-76262/308879785_zpid/\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e What's special\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Unveiling a new custom estate in the prestigious gated Quail Hollow Estates! This impeccable residence, set on a sprawling acre surrounded by majestic trees, features a gourmet kitchen equipped with top-tier Subzero and Wolf appliances. European soft-close cabinets and drawers, paired with a double Cambria Quartzite island, perfect for family gatherings. The first-floor game room\u0026amp;media room add extra layers of entertainment. Step into the outdoor sanctuary, where a sparkling pool and spa, and sunken fire pit, beckon leisure. The lavish master suite features stunning marble accents, custom his\u0026amp;her closets, and a secure storm shelter.Throughout the home,indulge in the visual charm of designer lighting and wallpaper, elevating every space. The property is complete with a 6-car garage and a sports court, catering to the preferences of basketball or pickleball enthusiasts. This residence seamlessly combines luxury\u0026amp;recreational amenities, making it a must-see for the discerning buyer.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Facts \u0026amp; features\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Interior\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Bedrooms \u0026amp; bathrooms\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Bedrooms: 6\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Bathrooms: 8\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Full bathrooms: 7\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e 1/2 bathrooms: 1\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Primary bedroom\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Bedroom\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Features: Built-in Features, En Suite Bathroom, Walk-In Closet(s)\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Cooling\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Central Air, Ceiling Fan(s), Electric\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Appliances\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Included: Built-In Gas Range, Built-In Refrigerator, Double Oven, Dishwasher, Gas Cooktop, Disposal, Ice Maker, Microwave, Range, Refrigerator, Some Commercial Grade, Vented Exhaust Fan, Warming Drawer, Wine Cooler\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Features\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Wet Bar, Built-in Features, Dry Bar, Decorative/Designer Lighting Fixtures, Eat-in Kitchen, Elevator, High Speed Internet, Kitchen Island, Pantry, Smart Home, Cable TV, Walk-In Closet(s), Wired for Sound\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Flooring: Hardwood\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Has basement: No\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Number of fireplaces: 3\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Fireplace features: Living Room, Primary Bedroom\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Interior area\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Total interior livable area: 10,466 sqft\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Total spaces: 12\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Parking features: Additional Parking\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Attached garage spaces: 6\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Carport spaces: 6\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Features\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Levels: Two\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Stories: 2\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Patio \u0026amp; porch: Covered\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Exterior features: Built-in Barbecue, Barbecue, Gas Grill, Lighting, Outdoor Grill, Outdoor Living Area, Private Yard, Sport Court, Fire Pit\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Pool features: Heated, In Ground, Pool, Pool/Spa Combo\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Fencing: Wrought Iron\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Lot\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Size: 1.05 Acres\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Details\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Additional structures: Outdoor Kitchen\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Parcel number: 42232692\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Special conditions: Standard\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Construction\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Type \u0026amp; style\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Home type: SingleFamily\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Architectural style: Contemporary/Modern,Detached\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e Property subtype: Single Family Residence\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e \"\"\"\u003c/span\u003e\n)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eForestSwarm\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-forestswarm\" class=\"anchor\" aria-label=\"Permalink: ForestSwarm\" href=\"#forestswarm\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eForestSwarm\u003c/code\u003e architecture is designed for efficient task assignment by dynamically selecting the most suitable agent from a collection of trees. This is achieved through asynchronous task processing, where agents are chosen based on their relevance to the task at hand. The relevance is determined by calculating the similarity between the system prompts associated with each agent and the keywords present in the task itself. For a more in-depth understanding of how \u003ccode\u003eForestSwarm\u003c/code\u003e works, please refer to the \u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/forest_swarm/\" rel=\"nofollow\"\u003eofficial documentation\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h3\u003e\u003ca id=\"user-content-methods-5\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods-5\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eParameters\u003c/th\u003e\n\u003cth\u003eReturn Value\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e__init__\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInitialize the ForestSwarm\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etrees\u003c/code\u003e: List of Tree objects\u003c/td\u003e\n\u003ctd\u003eNone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003erun\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eExecute the ForestSwarm\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etask\u003c/code\u003e: Input task for the swarm\u003c/td\u003e\n\u003ctd\u003eOutput from the most relevant agent\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInputs\u003c/h3\u003e\u003ca id=\"user-content-inputs-5\" class=\"anchor\" aria-label=\"Permalink: Inputs\" href=\"#inputs-5\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eInput\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003etrees\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eList[Tree]\u003c/td\u003e\n\u003ctd\u003eList of Tree objects, each containing TreeAgent objects\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003etask\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003estr\u003c/td\u003e\n\u003ctd\u003eThe task to be processed by the ForestSwarm\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOutput\u003c/h3\u003e\u003ca id=\"user-content-output-5\" class=\"anchor\" aria-label=\"Permalink: Output\" href=\"#output-5\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003erun\u003c/code\u003e method returns the output from the most relevant agent selected based on the input task.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from swarms import TreeAgent, Tree, ForestSwarm\n\n# Create agents with varying system prompts and dynamically generated distances/keywords\nagents_tree1 = [\n TreeAgent(\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are an expert Stock Analysis Agent with deep knowledge of financial markets, technical analysis, and fundamental analysis. Your primary function is to analyze stock performance, market trends, and provide actionable insights. When analyzing stocks:\n\n1. Always start with a brief overview of the current market conditions.\n2. Use a combination of technical indicators (e.g., moving averages, RSI, MACD) and fundamental metrics (e.g., P/E ratio, EPS growth, debt-to-equity).\n3. Consider both short-term and long-term perspectives in your analysis.\n4. Provide clear buy, hold, or sell recommendations with supporting rationale.\n5. Highlight potential risks and opportunities specific to each stock or sector.\n6. Use bullet points for clarity when listing key points or metrics.\n7. If relevant, compare the stock to its peers or sector benchmarks.\n\nRemember to maintain objectivity and base your analysis on factual data. If asked about future performance, always include a disclaimer about market unpredictability. Your goal is to provide comprehensive, accurate, and actionable stock analysis to inform investment decisions.\u0026quot;\u0026quot;\u0026quot;,\n agent_name=\u0026quot;Stock Analysis Agent\u0026quot;,\n ),\n TreeAgent(\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a highly skilled Financial Planning Agent, specializing in personal and corporate financial strategies. Your role is to provide comprehensive financial advice tailored to each client's unique situation. When creating financial plans:\n\n1. Begin by asking key questions about the client's financial goals, current situation, and risk tolerance.\n2. Develop a holistic view of the client's finances, including income, expenses, assets, and liabilities.\n3. Create detailed, step-by-step action plans to achieve financial goals.\n4. Provide specific recommendations for budgeting, saving, and investing.\n5. Consider tax implications and suggest tax-efficient strategies.\n6. Incorporate risk management and insurance planning into your recommendations.\n7. Use charts or tables to illustrate financial projections and scenarios.\n8. Regularly suggest reviewing and adjusting the plan as circumstances change.\n\nAlways prioritize the client's best interests and adhere to fiduciary standards. Explain complex financial concepts in simple terms, and be prepared to justify your recommendations with data and reasoning.\u0026quot;\u0026quot;\u0026quot;,\n agent_name=\u0026quot;Financial Planning Agent\u0026quot;,\n ),\n TreeAgent(\n agent_name=\u0026quot;Retirement Strategy Agent\u0026quot;,\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a specialized Retirement Strategy Agent, focused on helping individuals and couples plan for a secure and comfortable retirement. Your expertise covers various aspects of retirement planning, including savings strategies, investment allocation, and income generation during retirement. When developing retirement strategies:\n\n1. Start by assessing the client's current age, desired retirement age, and expected lifespan.\n2. Calculate retirement savings goals based on desired lifestyle and projected expenses.\n3. Analyze current retirement accounts (e.g., 401(k), IRA) and suggest optimization strategies.\n4. Provide guidance on asset allocation and rebalancing as retirement approaches.\n5. Explain various retirement income sources (e.g., Social Security, pensions, annuities).\n6. Discuss healthcare costs and long-term care planning.\n7. Offer strategies for tax-efficient withdrawals during retirement.\n8. Consider estate planning and legacy goals in your recommendations.\n\nUse Monte Carlo simulations or other statistical tools to illustrate the probability of retirement success. Always emphasize the importance of starting early and the power of compound interest. Be prepared to adjust strategies based on changing market conditions or personal circumstances.\u0026quot;\u0026quot;\u0026quot;,\n ),\n]\n\nagents_tree2 = [\n TreeAgent(\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a knowledgeable Tax Filing Agent, specializing in personal and business tax preparation and strategy. Your role is to ensure accurate tax filings while maximizing legitimate deductions and credits. When assisting with tax matters:\n\n1. Start by gathering all necessary financial information and documents.\n2. Stay up-to-date with the latest tax laws and regulations, including state-specific rules.\n3. Identify all applicable deductions and credits based on the client's situation.\n4. Provide step-by-step guidance for completing tax forms accurately.\n5. Explain tax implications of various financial decisions.\n6. Offer strategies for tax-efficient investing and income management.\n7. Assist with estimated tax payments for self-employed individuals or businesses.\n8. Advise on record-keeping practices for tax purposes.\n\nAlways prioritize compliance with tax laws while ethically minimizing tax liability. Be prepared to explain complex tax concepts in simple terms and provide rationale for your recommendations. If a situation is beyond your expertise, advise consulting a certified tax professional or IRS resources.\u0026quot;\u0026quot;\u0026quot;,\n agent_name=\u0026quot;Tax Filing Agent\u0026quot;,\n ),\n TreeAgent(\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a sophisticated Investment Strategy Agent, adept at creating and managing investment portfolios to meet diverse financial goals. Your expertise covers various asset classes, market analysis, and risk management techniques. When developing investment strategies:\n\n1. Begin by assessing the client's investment goals, time horizon, and risk tolerance.\n2. Provide a comprehensive overview of different asset classes and their risk-return profiles.\n3. Create diversified portfolio recommendations based on modern portfolio theory.\n4. Explain the benefits and risks of various investment vehicles (e.g., stocks, bonds, ETFs, mutual funds).\n5. Incorporate both passive and active investment strategies as appropriate.\n6. Discuss the importance of regular portfolio rebalancing and provide a rebalancing strategy.\n7. Consider tax implications of investment decisions and suggest tax-efficient strategies.\n8. Provide ongoing market analysis and suggest portfolio adjustments as needed.\n\nUse historical data and forward-looking projections to illustrate potential outcomes. Always emphasize the importance of long-term investing and the risks of market timing. Be prepared to explain complex investment concepts in clear, accessible language.\u0026quot;\u0026quot;\u0026quot;,\n agent_name=\u0026quot;Investment Strategy Agent\u0026quot;,\n ),\n TreeAgent(\n system_prompt=\u0026quot;\u0026quot;\u0026quot;You are a specialized ROTH IRA Agent, focusing on the intricacies of Roth Individual Retirement Accounts. Your role is to provide expert guidance on Roth IRA rules, benefits, and strategies to maximize their value for retirement planning. When advising on Roth IRAs:\n\n1. Explain the fundamental differences between traditional and Roth IRAs.\n2. Clarify Roth IRA contribution limits and income eligibility requirements.\n3. Discuss the tax advantages of Roth IRAs, including tax-free growth and withdrawals.\n4. Provide guidance on Roth IRA conversion strategies and their tax implications.\n5. Explain the five-year rule and how it affects Roth IRA withdrawals.\n6. Offer strategies for maximizing Roth IRA contributions, such as the backdoor Roth IRA method.\n7. Discuss how Roth IRAs fit into overall retirement and estate planning strategies.\n8. Provide insights on investment choices within a Roth IRA to maximize tax-free growth.\n\nAlways stay current with IRS regulations regarding Roth IRAs. Be prepared to provide numerical examples to illustrate the long-term benefits of Roth IRAs. Emphasize the importance of considering individual financial situations when making Roth IRA decisions.\u0026quot;\u0026quot;\u0026quot;,\n agent_name=\u0026quot;ROTH IRA Agent\u0026quot;,\n ),\n]\n\n# Create trees\ntree1 = Tree(tree_name=\u0026quot;Financial Tree\u0026quot;, agents=agents_tree1)\ntree2 = Tree(tree_name=\u0026quot;Investment Tree\u0026quot;, agents=agents_tree2)\n\n# Create the ForestSwarm\nmulti_agent_structure = ForestSwarm(trees=[tree1, tree2])\n\n# Run a task\ntask = \u0026quot;What are the best platforms to do our taxes on\u0026quot;\noutput = multi_agent_structure.run(task)\nprint(output)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eTreeAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eTree\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eForestSwarm\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Create agents with varying system prompts and dynamically generated distances/keywords\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eagents_tree1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are an expert Stock Analysis Agent with deep knowledge of financial markets, technical analysis, and fundamental analysis. Your primary function is to analyze stock performance, market trends, and provide actionable insights. When analyzing stocks:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Always start with a brief overview of the current market conditions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Use a combination of technical indicators (e.g., moving averages, RSI, MACD) and fundamental metrics (e.g., P/E ratio, EPS growth, debt-to-equity).\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Consider both short-term and long-term perspectives in your analysis.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide clear buy, hold, or sell recommendations with supporting rationale.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Highlight potential risks and opportunities specific to each stock or sector.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Use bullet points for clarity when listing key points or metrics.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. If relevant, compare the stock to its peers or sector benchmarks.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eRemember to maintain objectivity and base your analysis on factual data. If asked about future performance, always include a disclaimer about market unpredictability. Your goal is to provide comprehensive, accurate, and actionable stock analysis to inform investment decisions.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Stock Analysis Agent\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a highly skilled Financial Planning Agent, specializing in personal and corporate financial strategies. Your role is to provide comprehensive financial advice tailored to each client's unique situation. When creating financial plans:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Begin by asking key questions about the client's financial goals, current situation, and risk tolerance.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Develop a holistic view of the client's finances, including income, expenses, assets, and liabilities.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Create detailed, step-by-step action plans to achieve financial goals.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide specific recommendations for budgeting, saving, and investing.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Consider tax implications and suggest tax-efficient strategies.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Incorporate risk management and insurance planning into your recommendations.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Use charts or tables to illustrate financial projections and scenarios.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e8. Regularly suggest reviewing and adjusting the plan as circumstances change.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eAlways prioritize the client's best interests and adhere to fiduciary standards. Explain complex financial concepts in simple terms, and be prepared to justify your recommendations with data and reasoning.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial Planning Agent\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Retirement Strategy Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a specialized Retirement Strategy Agent, focused on helping individuals and couples plan for a secure and comfortable retirement. Your expertise covers various aspects of retirement planning, including savings strategies, investment allocation, and income generation during retirement. When developing retirement strategies:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Start by assessing the client's current age, desired retirement age, and expected lifespan.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Calculate retirement savings goals based on desired lifestyle and projected expenses.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Analyze current retirement accounts (e.g., 401(k), IRA) and suggest optimization strategies.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide guidance on asset allocation and rebalancing as retirement approaches.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Explain various retirement income sources (e.g., Social Security, pensions, annuities).\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Discuss healthcare costs and long-term care planning.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Offer strategies for tax-efficient withdrawals during retirement.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e8. Consider estate planning and legacy goals in your recommendations.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eUse Monte Carlo simulations or other statistical tools to illustrate the probability of retirement success. Always emphasize the importance of starting early and the power of compound interest. Be prepared to adjust strategies based on changing market conditions or personal circumstances.\"\"\"\u003c/span\u003e,\n ),\n]\n\n\u003cspan class=\"pl-s1\"\u003eagents_tree2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a knowledgeable Tax Filing Agent, specializing in personal and business tax preparation and strategy. Your role is to ensure accurate tax filings while maximizing legitimate deductions and credits. When assisting with tax matters:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Start by gathering all necessary financial information and documents.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Stay up-to-date with the latest tax laws and regulations, including state-specific rules.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Identify all applicable deductions and credits based on the client's situation.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide step-by-step guidance for completing tax forms accurately.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Explain tax implications of various financial decisions.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Offer strategies for tax-efficient investing and income management.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Assist with estimated tax payments for self-employed individuals or businesses.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e8. Advise on record-keeping practices for tax purposes.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eAlways prioritize compliance with tax laws while ethically minimizing tax liability. Be prepared to explain complex tax concepts in simple terms and provide rationale for your recommendations. If a situation is beyond your expertise, advise consulting a certified tax professional or IRS resources.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Tax Filing Agent\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a sophisticated Investment Strategy Agent, adept at creating and managing investment portfolios to meet diverse financial goals. Your expertise covers various asset classes, market analysis, and risk management techniques. When developing investment strategies:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Begin by assessing the client's investment goals, time horizon, and risk tolerance.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Provide a comprehensive overview of different asset classes and their risk-return profiles.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Create diversified portfolio recommendations based on modern portfolio theory.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Explain the benefits and risks of various investment vehicles (e.g., stocks, bonds, ETFs, mutual funds).\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Incorporate both passive and active investment strategies as appropriate.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Discuss the importance of regular portfolio rebalancing and provide a rebalancing strategy.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Consider tax implications of investment decisions and suggest tax-efficient strategies.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e8. Provide ongoing market analysis and suggest portfolio adjustments as needed.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eUse historical data and forward-looking projections to illustrate potential outcomes. Always emphasize the importance of long-term investing and the risks of market timing. Be prepared to explain complex investment concepts in clear, accessible language.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Investment Strategy Agent\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eTreeAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"\"\"You are a specialized ROTH IRA Agent, focusing on the intricacies of Roth Individual Retirement Accounts. Your role is to provide expert guidance on Roth IRA rules, benefits, and strategies to maximize their value for retirement planning. When advising on Roth IRAs:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Explain the fundamental differences between traditional and Roth IRAs.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Clarify Roth IRA contribution limits and income eligibility requirements.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Discuss the tax advantages of Roth IRAs, including tax-free growth and withdrawals.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Provide guidance on Roth IRA conversion strategies and their tax implications.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Explain the five-year rule and how it affects Roth IRA withdrawals.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e6. Offer strategies for maximizing Roth IRA contributions, such as the backdoor Roth IRA method.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e7. Discuss how Roth IRAs fit into overall retirement and estate planning strategies.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e8. Provide insights on investment choices within a Roth IRA to maximize tax-free growth.\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eAlways stay current with IRS regulations regarding Roth IRAs. Be prepared to provide numerical examples to illustrate the long-term benefits of Roth IRAs. Emphasize the importance of considering individual financial situations when making Roth IRA decisions.\"\"\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ROTH IRA Agent\"\u003c/span\u003e,\n ),\n]\n\n\u003cspan class=\"pl-c\"\u003e# Create trees\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etree1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eTree\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etree_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial Tree\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents_tree1\u003c/span\u003e)\n\u003cspan class=\"pl-s1\"\u003etree2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eTree\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etree_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Investment Tree\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents_tree2\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Create the ForestSwarm\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emulti_agent_structure\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eForestSwarm\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etrees\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003etree1\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003etree2\u003c/span\u003e])\n\n\u003cspan class=\"pl-c\"\u003e# Run a task\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"What are the best platforms to do our taxes on\"\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eoutput\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emulti_agent_structure\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e)\n\u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eoutput\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eSwarmRouter\u003c/code\u003e\u003c/h2\u003e\u003ca id=\"user-content-swarmrouter\" class=\"anchor\" aria-label=\"Permalink: SwarmRouter\" href=\"#swarmrouter\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eSwarmRouter\u003c/code\u003e class is a flexible routing system designed to manage different types of swarms for task execution. It provides a unified interface to interact with various swarm types, including \u003ccode\u003eAgentRearrange\u003c/code\u003e, \u003ccode\u003eMixtureOfAgents\u003c/code\u003e, \u003ccode\u003eSpreadSheetSwarm\u003c/code\u003e, \u003ccode\u003eSequentialWorkflow\u003c/code\u003e, and \u003ccode\u003eConcurrentWorkflow\u003c/code\u003e. We will be continuously adding more and more swarm architectures here as we progress with new architectures.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAttributes:\u003c/h4\u003e\u003ca id=\"user-content-attributes\" class=\"anchor\" aria-label=\"Permalink: Attributes:\" href=\"#attributes\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003ename\u003c/code\u003e (str): Name of the SwarmRouter instance.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003edescription\u003c/code\u003e (str): Description of the SwarmRouter instance.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003emax_loops\u003c/code\u003e (int): Maximum number of loops to perform.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eagents\u003c/code\u003e (List[Agent]): List of Agent objects to be used in the swarm.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eswarm_type\u003c/code\u003e (SwarmType): Type of swarm to be used.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eswarm\u003c/code\u003e (Union[AgentRearrange, MixtureOfAgents, SpreadSheetSwarm, SequentialWorkflow, ConcurrentWorkflow]): Instantiated swarm object.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003elogs\u003c/code\u003e (List[SwarmLog]): List of log entries captured during operations.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods:\u003c/h4\u003e\u003ca id=\"user-content-methods-6\" class=\"anchor\" aria-label=\"Permalink: Methods:\" href=\"#methods-6\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e__init__(self, name: str, description: str, max_loops: int, agents: List[Agent], swarm_type: SwarmType, *args, **kwargs)\u003c/code\u003e: Initialize the SwarmRouter.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e_create_swarm(self, *args, **kwargs)\u003c/code\u003e: Create and return the specified swarm type.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e_log(self, level: str, message: str, task: str, metadata: Dict[str, Any])\u003c/code\u003e: Create a log entry and add it to the logs list.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003erun(self, task: str, *args, **kwargs)\u003c/code\u003e: Run the specified task on the selected swarm.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eget_logs(self)\u003c/code\u003e: Retrieve all logged entries.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import os\nfrom dotenv import load_dotenv\nfrom swarms import Agent\nfrom swarm_models import OpenAIChat\nfrom swarms.structs.swarm_router import SwarmRouter, SwarmType\n\nload_dotenv()\n\n# Get the OpenAI API key from the environment variable\napi_key = os.getenv(\u0026quot;GROQ_API_KEY\u0026quot;)\n\n# Model\nmodel = OpenAIChat(\n openai_api_base=\u0026quot;https://api.groq.com/openai/v1\u0026quot;,\n openai_api_key=api_key,\n model_name=\u0026quot;llama-3.1-70b-versatile\u0026quot;,\n temperature=0.1,\n)\n# Define specialized system prompts for each agent\nDATA_EXTRACTOR_PROMPT = \u0026quot;\u0026quot;\u0026quot;You are a highly specialized private equity agent focused on data extraction from various documents. Your expertise includes:\n1. Extracting key financial metrics (revenue, EBITDA, growth rates, etc.) from financial statements and reports\n2. Identifying and extracting important contract terms from legal documents\n3. Pulling out relevant market data from industry reports and analyses\n4. Extracting operational KPIs from management presentations and internal reports\n5. Identifying and extracting key personnel information from organizational charts and bios\nProvide accurate, structured data extracted from various document types to support investment analysis.\u0026quot;\u0026quot;\u0026quot;\n\nSUMMARIZER_PROMPT = \u0026quot;\u0026quot;\u0026quot;You are an expert private equity agent specializing in summarizing complex documents. Your core competencies include:\n1. Distilling lengthy financial reports into concise executive summaries\n2. Summarizing legal documents, highlighting key terms and potential risks\n3. Condensing industry reports to capture essential market trends and competitive dynamics\n4. Summarizing management presentations to highlight key strategic initiatives and projections\n5. Creating brief overviews of technical documents, emphasizing critical points for non-technical stakeholders\nDeliver clear, concise summaries that capture the essence of various documents while highlighting information crucial for investment decisions.\u0026quot;\u0026quot;\u0026quot;\n\nFINANCIAL_ANALYST_PROMPT = \u0026quot;\u0026quot;\u0026quot;You are a specialized private equity agent focused on financial analysis. Your key responsibilities include:\n1. Analyzing historical financial statements to identify trends and potential issues\n2. Evaluating the quality of earnings and potential adjustments to EBITDA\n3. Assessing working capital requirements and cash flow dynamics\n4. Analyzing capital structure and debt capacity\n5. Evaluating financial projections and underlying assumptions\nProvide thorough, insightful financial analysis to inform investment decisions and valuation.\u0026quot;\u0026quot;\u0026quot;\n\nMARKET_ANALYST_PROMPT = \u0026quot;\u0026quot;\u0026quot;You are a highly skilled private equity agent specializing in market analysis. Your expertise covers:\n1. Analyzing industry trends, growth drivers, and potential disruptors\n2. Evaluating competitive landscape and market positioning\n3. Assessing market size, segmentation, and growth potential\n4. Analyzing customer dynamics, including concentration and loyalty\n5. Identifying potential regulatory or macroeconomic impacts on the market\nDeliver comprehensive market analysis to assess the attractiveness and risks of potential investments.\u0026quot;\u0026quot;\u0026quot;\n\nOPERATIONAL_ANALYST_PROMPT = \u0026quot;\u0026quot;\u0026quot;You are an expert private equity agent focused on operational analysis. Your core competencies include:\n1. Evaluating operational efficiency and identifying improvement opportunities\n2. Analyzing supply chain and procurement processes\n3. Assessing sales and marketing effectiveness\n4. Evaluating IT systems and digital capabilities\n5. Identifying potential synergies in merger or add-on acquisition scenarios\nProvide detailed operational analysis to uncover value creation opportunities and potential risks.\u0026quot;\u0026quot;\u0026quot;\n\n# Initialize specialized agents\ndata_extractor_agent = Agent(\n agent_name=\u0026quot;Data-Extractor\u0026quot;,\n system_prompt=DATA_EXTRACTOR_PROMPT,\n llm=model,\n max_loops=1,\n autosave=True,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;data_extractor_agent.json\u0026quot;,\n user_name=\u0026quot;pe_firm\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n)\n\nsummarizer_agent = Agent(\n agent_name=\u0026quot;Document-Summarizer\u0026quot;,\n system_prompt=SUMMARIZER_PROMPT,\n llm=model,\n max_loops=1,\n autosave=True,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;summarizer_agent.json\u0026quot;,\n user_name=\u0026quot;pe_firm\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n)\n\nfinancial_analyst_agent = Agent(\n agent_name=\u0026quot;Financial-Analyst\u0026quot;,\n system_prompt=FINANCIAL_ANALYST_PROMPT,\n llm=model,\n max_loops=1,\n autosave=True,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;financial_analyst_agent.json\u0026quot;,\n user_name=\u0026quot;pe_firm\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n)\n\nmarket_analyst_agent = Agent(\n agent_name=\u0026quot;Market-Analyst\u0026quot;,\n system_prompt=MARKET_ANALYST_PROMPT,\n llm=model,\n max_loops=1,\n autosave=True,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;market_analyst_agent.json\u0026quot;,\n user_name=\u0026quot;pe_firm\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n)\n\noperational_analyst_agent = Agent(\n agent_name=\u0026quot;Operational-Analyst\u0026quot;,\n system_prompt=OPERATIONAL_ANALYST_PROMPT,\n llm=model,\n max_loops=1,\n autosave=True,\n verbose=True,\n dynamic_temperature_enabled=True,\n saved_state_path=\u0026quot;operational_analyst_agent.json\u0026quot;,\n user_name=\u0026quot;pe_firm\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n)\n\n# Initialize the SwarmRouter\nrouter = SwarmRouter(\n name=\u0026quot;pe-document-analysis-swarm\u0026quot;,\n description=\u0026quot;Analyze documents for private equity due diligence and investment decision-making\u0026quot;,\n max_loops=1,\n agents=[\n data_extractor_agent,\n summarizer_agent,\n financial_analyst_agent,\n market_analyst_agent,\n operational_analyst_agent,\n ],\n swarm_type=\u0026quot;ConcurrentWorkflow\u0026quot;, # or \u0026quot;SequentialWorkflow\u0026quot; or \u0026quot;ConcurrentWorkflow\u0026quot; or\n)\n\n# Example usage\nif __name__ == \u0026quot;__main__\u0026quot;:\n # Run a comprehensive private equity document analysis task\n result = router.run(\n \u0026quot;Where is the best place to find template term sheets for series A startups. Provide links and references\u0026quot;\n )\n print(result)\n\n # Retrieve and print logs\n for log in router.get_logs():\n print(f\u0026quot;{log.timestamp} - {log.level}: {log.message}\u0026quot;)\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edotenv\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eload_dotenv\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eOpenAIChat\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003estructs\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003eswarm_router\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSwarmRouter\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eSwarmType\u003c/span\u003e\n\n\u003cspan class=\"pl-en\"\u003eload_dotenv\u003c/span\u003e()\n\n\u003cspan class=\"pl-c\"\u003e# Get the OpenAI API key from the environment variable\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egetenv\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"GROQ_API_KEY\"\u003c/span\u003e)\n\n\u003cspan class=\"pl-c\"\u003e# Model\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eOpenAIChat\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eopenai_api_base\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"https://api.groq.com/openai/v1\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eopenai_api_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"llama-3.1-70b-versatile\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etemperature\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e,\n)\n\u003cspan class=\"pl-c\"\u003e# Define specialized system prompts for each agent\u003c/span\u003e\n\u003cspan class=\"pl-c1\"\u003eDATA_EXTRACTOR_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"You are a highly specialized private equity agent focused on data extraction from various documents. Your expertise includes:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Extracting key financial metrics (revenue, EBITDA, growth rates, etc.) from financial statements and reports\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Identifying and extracting important contract terms from legal documents\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Pulling out relevant market data from industry reports and analyses\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Extracting operational KPIs from management presentations and internal reports\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Identifying and extracting key personnel information from organizational charts and bios\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eProvide accurate, structured data extracted from various document types to support investment analysis.\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eSUMMARIZER_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"You are an expert private equity agent specializing in summarizing complex documents. Your core competencies include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Distilling lengthy financial reports into concise executive summaries\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Summarizing legal documents, highlighting key terms and potential risks\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Condensing industry reports to capture essential market trends and competitive dynamics\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Summarizing management presentations to highlight key strategic initiatives and projections\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Creating brief overviews of technical documents, emphasizing critical points for non-technical stakeholders\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eDeliver clear, concise summaries that capture the essence of various documents while highlighting information crucial for investment decisions.\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eFINANCIAL_ANALYST_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"You are a specialized private equity agent focused on financial analysis. Your key responsibilities include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Analyzing historical financial statements to identify trends and potential issues\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Evaluating the quality of earnings and potential adjustments to EBITDA\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Assessing working capital requirements and cash flow dynamics\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Analyzing capital structure and debt capacity\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Evaluating financial projections and underlying assumptions\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eProvide thorough, insightful financial analysis to inform investment decisions and valuation.\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eMARKET_ANALYST_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"You are a highly skilled private equity agent specializing in market analysis. Your expertise covers:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Analyzing industry trends, growth drivers, and potential disruptors\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Evaluating competitive landscape and market positioning\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Assessing market size, segmentation, and growth potential\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Analyzing customer dynamics, including concentration and loyalty\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Identifying potential regulatory or macroeconomic impacts on the market\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eDeliver comprehensive market analysis to assess the attractiveness and risks of potential investments.\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c1\"\u003eOPERATIONAL_ANALYST_PROMPT\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"\"\"You are an expert private equity agent focused on operational analysis. Your core competencies include:\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e1. Evaluating operational efficiency and identifying improvement opportunities\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e2. Analyzing supply chain and procurement processes\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e3. Assessing sales and marketing effectiveness\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e4. Evaluating IT systems and digital capabilities\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003e5. Identifying potential synergies in merger or add-on acquisition scenarios\u003c/span\u003e\n\u003cspan class=\"pl-s\"\u003eProvide detailed operational analysis to uncover value creation opportunities and potential risks.\"\"\"\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Initialize specialized agents\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Data-Extractor\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eDATA_EXTRACTOR_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"data_extractor_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe_firm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Document-Summarizer\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eSUMMARIZER_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"summarizer_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe_firm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial-Analyst\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFINANCIAL_ANALYST_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"financial_analyst_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe_firm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Market-Analyst\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eMARKET_ANALYST_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"market_analyst_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe_firm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Operational-Analyst\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eOPERATIONAL_ANALYST_PROMPT\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esaved_state_path\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"operational_analyst_agent.json\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe_firm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n)\n\n\u003cspan class=\"pl-c\"\u003e# Initialize the SwarmRouter\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003erouter\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRouter\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"pe-document-analysis-swarm\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Analyze documents for private equity due diligence and investment decision-making\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\n \u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e,\n ],\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ConcurrentWorkflow\"\u003c/span\u003e, \u003cspan class=\"pl-c\"\u003e# or \"SequentialWorkflow\" or \"ConcurrentWorkflow\" or\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-c\"\u003e# Example usage\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e__name__\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"__main__\"\u003c/span\u003e:\n \u003cspan class=\"pl-c\"\u003e# Run a comprehensive private equity document analysis task\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erouter\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"Where is the best place to find template term sheets for series A startups. Provide links and references\"\u003c/span\u003e\n )\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e)\n\n \u003cspan class=\"pl-c\"\u003e# Retrieve and print logs\u003c/span\u003e\n \u003cspan class=\"pl-k\"\u003efor\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003elog\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003ein\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erouter\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eget_logs\u003c/span\u003e():\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003ef\"\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elog\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003etimestamp\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e - \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elog\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elevel\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003elog\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eChanging Swarm Types\u003c/h3\u003e\u003ca id=\"user-content-changing-swarm-types\" class=\"anchor\" aria-label=\"Permalink: Changing Swarm Types\" href=\"#changing-swarm-types\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can create multiple SwarmRouter instances with different swarm types:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sequential_router = SwarmRouter(\n name=\u0026quot;SequentialRouter\u0026quot;,\n agents=[\n data_extractor_agent,\n summarizer_agent,\n financial_analyst_agent,\n market_analyst_agent,\n operational_analyst_agent,\n ],\n swarm_type=SwarmType.SequentialWorkflow\n)\n\nconcurrent_router = SwarmRouter(\n name=\u0026quot;ConcurrentRouter\u0026quot;,\n agents=[\n data_extractor_agent,\n summarizer_agent,\n financial_analyst_agent,\n market_analyst_agent,\n operational_analyst_agent,\n ],\n swarm_type=SwarmType.ConcurrentWorkflow\n)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003esequential_router\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRouter\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"SequentialRouter\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\n \u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e,\n ],\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eSwarmType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eSequentialWorkflow\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-s1\"\u003econcurrent_router\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRouter\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ConcurrentRouter\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\n \u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e,\n ],\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eSwarmType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eConcurrentWorkflow\u003c/span\u003e\n)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAgentRearrange\u003c/h3\u003e\u003ca id=\"user-content-agentrearrange-1\" class=\"anchor\" aria-label=\"Permalink: AgentRearrange\" href=\"#agentrearrange-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eUse Case: Optimizing agent order for complex multi-step tasks.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"rearrange_router = SwarmRouter(\n name=\u0026quot;TaskOptimizer\u0026quot;,\n description=\u0026quot;Optimize agent order for multi-step tasks\u0026quot;,\n max_loops=3,\n agents=[\n data_extractor_agent,\n summarizer_agent,\n financial_analyst_agent,\n market_analyst_agent,\n operational_analyst_agent,\n ],\n swarm_type=SwarmType.AgentRearrange,\n flow = f\u0026quot;{data_extractor.name} -\u0026gt; {analyzer.name} -\u0026gt; {summarizer.name}\u0026quot;\n)\n\nresult = rearrange_router.run(\u0026quot;Analyze and summarize the quarterly financial report\u0026quot;)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003erearrange_router\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRouter\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"TaskOptimizer\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Optimize agent order for multi-step tasks\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\n \u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e,\n ],\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eSwarmType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eAgentRearrange\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eflow\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003ef\"\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003edata_extractor\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e -\u0026gt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eanalyzer\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e -\u0026gt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003esummarizer\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erearrange_router\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"Analyze and summarize the quarterly financial report\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMixtureOfAgents\u003c/h3\u003e\u003ca id=\"user-content-mixtureofagents-1\" class=\"anchor\" aria-label=\"Permalink: MixtureOfAgents\" href=\"#mixtureofagents-1\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eUse Case: Combining diverse expert agents for comprehensive analysis.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"mixture_router = SwarmRouter(\n name=\u0026quot;ExpertPanel\u0026quot;,\n description=\u0026quot;Combine insights from various expert agents\u0026quot;,\n max_loops=1,\n agents=[\n data_extractor_agent,\n summarizer_agent,\n financial_analyst_agent,\n market_analyst_agent,\n operational_analyst_agent,\n ],\n swarm_type=SwarmType.MixtureOfAgents\n)\n\nresult = mixture_router.run(\u0026quot;Evaluate the potential acquisition of TechStartup Inc.\u0026quot;)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003emixture_router\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eSwarmRouter\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ExpertPanel\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Combine insights from various expert agents\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\n \u003cspan class=\"pl-s1\"\u003edata_extractor_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esummarizer_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003efinancial_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emarket_analyst_agent\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoperational_analyst_agent\u003c/span\u003e,\n ],\n \u003cspan class=\"pl-s1\"\u003eswarm_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eSwarmType\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eMixtureOfAgents\u003c/span\u003e\n)\n\n\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003emixture_router\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"Evaluate the potential acquisition of TechStartup Inc.\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGroupChat\u003c/h2\u003e\u003ca id=\"user-content-groupchat\" class=\"anchor\" aria-label=\"Permalink: GroupChat\" href=\"#groupchat\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA production-grade multi-agent system enabling sophisticated group conversations between AI agents with customizable speaking patterns, parallel processing capabilities, and comprehensive conversation tracking.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\nimport os\nfrom dotenv import load_dotenv\nfrom swarm_models import OpenAIChat\nfrom swarms import Agent, GroupChat, expertise_based\n\n\nif __name__ == \u0026quot;__main__\u0026quot;:\n\n load_dotenv()\n\n # Get the OpenAI API key from the environment variable\n api_key = os.getenv(\u0026quot;OPENAI_API_KEY\u0026quot;)\n\n # Create an instance of the OpenAIChat class\n model = OpenAIChat(\n openai_api_key=api_key,\n model_name=\u0026quot;gpt-4o-mini\u0026quot;,\n temperature=0.1,\n )\n\n # Example agents\n agent1 = Agent(\n agent_name=\u0026quot;Financial-Analysis-Agent\u0026quot;,\n system_prompt=\u0026quot;You are a financial analyst specializing in investment strategies.\u0026quot;,\n llm=model,\n max_loops=1,\n autosave=False,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n streaming_on=False,\n )\n\n agent2 = Agent(\n agent_name=\u0026quot;Tax-Adviser-Agent\u0026quot;,\n system_prompt=\u0026quot;You are a tax adviser who provides clear and concise guidance on tax-related queries.\u0026quot;,\n llm=model,\n max_loops=1,\n autosave=False,\n dashboard=False,\n verbose=True,\n dynamic_temperature_enabled=True,\n user_name=\u0026quot;swarms_corp\u0026quot;,\n retry_attempts=1,\n context_length=200000,\n output_type=\u0026quot;string\u0026quot;,\n streaming_on=False,\n )\n\n agents = [agent1, agent2]\n\n chat = GroupChat(\n name=\u0026quot;Investment Advisory\u0026quot;,\n description=\u0026quot;Financial and tax analysis group\u0026quot;,\n agents=agents,\n speaker_fn=expertise_based,\n )\n\n history = chat.run(\n \u0026quot;How to optimize tax strategy for investments?\u0026quot;\n )\n print(history.model_dump_json(indent=2))\n\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003edotenv\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eload_dotenv\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarm_models\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eOpenAIChat\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eGroupChat\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eexpertise_based\u003c/span\u003e\n\n\n\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e__name__\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"__main__\"\u003c/span\u003e:\n\n \u003cspan class=\"pl-en\"\u003eload_dotenv\u003c/span\u003e()\n\n \u003cspan class=\"pl-c\"\u003e# Get the OpenAI API key from the environment variable\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egetenv\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"OPENAI_API_KEY\"\u003c/span\u003e)\n\n \u003cspan class=\"pl-c\"\u003e# Create an instance of the OpenAIChat class\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eOpenAIChat\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eopenai_api_key\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eapi_key\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"gpt-4o-mini\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003etemperature\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e0.1\u003c/span\u003e,\n )\n\n \u003cspan class=\"pl-c\"\u003e# Example agents\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial-Analysis-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a financial analyst specializing in investment strategies.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n )\n\n \u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Tax-Adviser-Agent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a tax adviser who provides clear and concise guidance on tax-related queries.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003ellm\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003emodel\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emax_loops\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eautosave\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edashboard\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003everbose\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edynamic_temperature_enabled\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003euser_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"swarms_corp\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eretry_attempts\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003econtext_length\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e200000\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eoutput_type\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"string\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003estreaming_on\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eFalse\u003c/span\u003e,\n )\n\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\u003cspan class=\"pl-s1\"\u003eagent1\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eagent2\u003c/span\u003e]\n\n \u003cspan class=\"pl-s1\"\u003echat\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eGroupChat\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003ename\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Investment Advisory\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Financial and tax analysis group\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003espeaker_fn\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eexpertise_based\u003c/span\u003e,\n )\n\n \u003cspan class=\"pl-s1\"\u003ehistory\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003echat\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003erun\u003c/span\u003e(\n \u003cspan class=\"pl-s\"\u003e\"How to optimize tax strategy for investments?\"\u003c/span\u003e\n )\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ehistory\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003emodel_dump_json\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eindent\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e))\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMultiAgentRouter\u003c/h2\u003e\u003ca id=\"user-content-multiagentrouter\" class=\"anchor\" aria-label=\"Permalink: MultiAgentRouter\" href=\"#multiagentrouter\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe MultiAgentRouter is a swarm architecture designed to dynamically assign tasks to the most suitable agent. It achieves this through a director or boss entity that utilizes function calls to identify and allocate tasks to the agent best equipped to handle them. \u003ca href=\"https://docs.swarms.world/en/latest/swarms/structs/multi_agent_router/\" rel=\"nofollow\"\u003eCheck out the documentation\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"from swarms import Agent\nfrom swarms.structs.multi_agent_orchestrator import MultiAgentRouter\n\n# Example usage:\nif __name__ == \u0026quot;__main__\u0026quot;:\n # Define some example agents\n agents = [\n Agent(\n agent_name=\u0026quot;ResearchAgent\u0026quot;,\n description=\u0026quot;Specializes in researching topics and providing detailed, factual information\u0026quot;,\n system_prompt=\u0026quot;You are a research specialist. Provide detailed, well-researched information about any topic, citing sources when possible.\u0026quot;,\n model_name=\u0026quot;openai/gpt-4o\u0026quot;,\n ),\n Agent(\n agent_name=\u0026quot;CodeExpertAgent\u0026quot;,\n description=\u0026quot;Expert in writing, reviewing, and explaining code across multiple programming languages\u0026quot;,\n system_prompt=\u0026quot;You are a coding expert. Write, review, and explain code with a focus on best practices and clean code principles.\u0026quot;,\n model_name=\u0026quot;openai/gpt-4o\u0026quot;,\n ),\n Agent(\n agent_name=\u0026quot;WritingAgent\u0026quot;,\n description=\u0026quot;Skilled in creative and technical writing, content creation, and editing\u0026quot;,\n system_prompt=\u0026quot;You are a writing specialist. Create, edit, and improve written content while maintaining appropriate tone and style.\u0026quot;,\n model_name=\u0026quot;openai/gpt-4o\u0026quot;,\n ),\n ]\n\n # Initialize routers with different configurations\n router_execute = MultiAgentRouter(agents=agents, execute_task=True)\n\n # Example task\n task = \u0026quot;Write a Python function to calculate fibonacci numbers\u0026quot;\n\n try:\n # Process the task with execution\n print(\u0026quot;\\nWith task execution:\u0026quot;)\n result_execute = router_execute.route_task(task)\n print(result_execute)\n\n except Exception as e:\n print(f\u0026quot;Error occurred: {str(e)}\u0026quot;)\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAgent\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eswarms\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003estructs\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003emulti_agent_orchestrator\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMultiAgentRouter\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e# Example usage:\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e__name__\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"__main__\"\u003c/span\u003e:\n \u003cspan class=\"pl-c\"\u003e# Define some example agents\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"ResearchAgent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Specializes in researching topics and providing detailed, factual information\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a research specialist. Provide detailed, well-researched information about any topic, citing sources when possible.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"openai/gpt-4o\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"CodeExpertAgent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Expert in writing, reviewing, and explaining code across multiple programming languages\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a coding expert. Write, review, and explain code with a focus on best practices and clean code principles.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"openai/gpt-4o\"\u003c/span\u003e,\n ),\n \u003cspan class=\"pl-en\"\u003eAgent\u003c/span\u003e(\n \u003cspan class=\"pl-s1\"\u003eagent_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"WritingAgent\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003edescription\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Skilled in creative and technical writing, content creation, and editing\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003esystem_prompt\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"You are a writing specialist. Create, edit, and improve written content while maintaining appropriate tone and style.\"\u003c/span\u003e,\n \u003cspan class=\"pl-s1\"\u003emodel_name\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"openai/gpt-4o\"\u003c/span\u003e,\n ),\n ]\n\n \u003cspan class=\"pl-c\"\u003e# Initialize routers with different configurations\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003erouter_execute\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eMultiAgentRouter\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eagents\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eexecute_task\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e)\n\n \u003cspan class=\"pl-c\"\u003e# Example task\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"Write a Python function to calculate fibonacci numbers\"\u003c/span\u003e\n\n \u003cspan class=\"pl-k\"\u003etry\u003c/span\u003e:\n \u003cspan class=\"pl-c\"\u003e# Process the task with execution\u003c/span\u003e\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"\u003cspan class=\"pl-cce\"\u003e\\n\u003c/span\u003eWith task execution:\"\u003c/span\u003e)\n \u003cspan class=\"pl-s1\"\u003eresult_execute\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erouter_execute\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eroute_task\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003etask\u003c/span\u003e)\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eresult_execute\u003c/span\u003e)\n\n \u003cspan class=\"pl-k\"\u003eexcept\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eException\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e:\n \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003ef\"Error occurred: \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-en\"\u003estr\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ee\u003c/span\u003e)\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOnboarding Session\u003c/h2\u003e\u003ca id=\"user-content-onboarding-session\" class=\"anchor\" aria-label=\"Permalink: Onboarding Session\" href=\"#onboarding-session\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eGet onboarded now with the creator and lead maintainer of Swarms, Kye Gomez, who will show you how to get started with the installation, usage examples, and starting to build your custom use case! \u003ca href=\"https://cal.com/swarms/swarms-onboarding-session\" rel=\"nofollow\"\u003eCLICK HERE\u003c/a\u003e\u003c/p\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eDocumentation\u003c/h2\u003e\u003ca id=\"user-content-documentation\" class=\"anchor\" aria-label=\"Permalink: Documentation\" href=\"#documentation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDocumentation is located here at: \u003ca href=\"https://docs.swarms.world\" rel=\"nofollow\"\u003edocs.swarms.world\u003c/a\u003e\u003c/p\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eFolder Structure\u003c/h2\u003e\u003ca id=\"user-content-folder-structure\" class=\"anchor\" aria-label=\"Permalink: Folder Structure\" href=\"#folder-structure\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe swarms package has been meticlously crafted for extreme use-ability and understanding, the swarms package is split up into various modules such as \u003ccode\u003eswarms.agents\u003c/code\u003e that holds pre-built agents, \u003ccode\u003eswarms.structs\u003c/code\u003e that holds a vast array of structures like \u003ccode\u003eAgent\u003c/code\u003e and multi agent structures. The 3 most important are \u003ccode\u003estructs\u003c/code\u003e, \u003ccode\u003emodels\u003c/code\u003e, and \u003ccode\u003eagents\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"├── __init__.py\n├── agents\n├── artifacts\n├── memory\n├── schemas\n├── models -\u0026gt; swarm_models\n├── prompts\n├── structs\n├── telemetry\n├── tools\n├── utils\n└── workers\"\u003e\u003cpre\u003e├── __init__.py\n├── agents\n├── artifacts\n├── memory\n├── schemas\n├── models -\u003cspan class=\"pl-k\"\u003e\u0026gt;\u003c/span\u003e swarm_models\n├── prompts\n├── structs\n├── telemetry\n├── tools\n├── utils\n└── workers\u003c/pre\u003e\u003c/div\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e🫶 Contributions:\u003c/h2\u003e\u003ca id=\"user-content--contributions\" class=\"anchor\" aria-label=\"Permalink: 🫶 Contributions:\" href=\"#-contributions\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe easiest way to contribute is to pick any issue with the \u003ccode\u003egood first issue\u003c/code\u003e tag 💪. Read the Contributing guidelines \u003ca href=\"/kyegomez/swarms/blob/master/CONTRIBUTING.md\"\u003ehere\u003c/a\u003e. Bug Report? \u003ca href=\"https://github.com/swarms/gateway/issues\"\u003eFile here\u003c/a\u003e | Feature Request? \u003ca href=\"https://github.com/swarms/gateway/issues\"\u003eFile here\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eSwarms is an open-source project, and contributions are VERY welcome. If you want to contribute, you can create new features, fix bugs, or improve the infrastructure. Please refer to the \u003ca href=\"https://github.com/kyegomez/swarms/blob/master/CONTRIBUTING.md\"\u003eCONTRIBUTING.md\u003c/a\u003e and our \u003ca href=\"https://github.com/users/kyegomez/projects/1\"\u003econtributing board\u003c/a\u003e to participate in Roadmap discussions!\u003c/p\u003e\n\u003chr\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAccelerate Backlog\u003c/h2\u003e\u003ca id=\"user-content-accelerate-backlog\" class=\"anchor\" aria-label=\"Permalink: Accelerate Backlog\" href=\"#accelerate-backlog\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAccelerate Bugs, Features, and Demos to implement by supporting us here:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://polar.sh/kyegomez\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/79ee063abf9e6ca23dd71865d4e2f29f4c3e35ef76d960b8d9b57570b75b7e49/68747470733a2f2f706f6c61722e73682f656d6265642f66756e642d6f75722d6261636b6c6f672e7376673f6f72673d6b7965676f6d657a\" data-canonical-src=\"https://polar.sh/embed/fund-our-backlog.svg?org=kyegomez\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCommunity\u003c/h2\u003e\u003ca id=\"user-content-community\" class=\"anchor\" aria-label=\"Permalink: Community\" href=\"#community\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eJoin our growing community around the world, for real-time support, ideas, and discussions on Swarms 😊\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eView our official \u003ca href=\"https://docs.swarms.world\" rel=\"nofollow\"\u003eBlog\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eChat live with us on \u003ca href=\"https://discord.gg/jM3Z6M9uMq\" rel=\"nofollow\"\u003eDiscord\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eFollow us on \u003ca href=\"https://twitter.com/kyegomez\" rel=\"nofollow\"\u003eTwitter\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eConnect with us on \u003ca href=\"https://www.linkedin.com/company/the-swarm-corporation\" rel=\"nofollow\"\u003eLinkedIn\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eVisit us on \u003ca href=\"https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ\" rel=\"nofollow\"\u003eYouTube\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://discord.gg/AJazBmhKnr\" rel=\"nofollow\"\u003eJoin the Swarms community on Discord!\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eJoin our Swarms Community Gathering every Thursday at 1pm NYC Time to unlock the potential of autonomous agents in automating your daily tasks \u003ca href=\"https://lu.ma/5p2jnc2v\" rel=\"nofollow\"\u003eSign up here\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLicense\u003c/h1\u003e\u003ca id=\"user-content-license\" class=\"anchor\" aria-label=\"Permalink: License\" href=\"#license\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAPACHE\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":2,"text":"✨ Features","anchor":"-features","htmlText":"✨ Features"},{"level":2,"text":"Requirements","anchor":"requirements","htmlText":"Requirements"},{"level":2,"text":"Guides and Walkthroughs","anchor":"guides-and-walkthroughs","htmlText":"Guides and Walkthroughs"},{"level":2,"text":"Install 💻","anchor":"install-","htmlText":"Install 💻"},{"level":2,"text":"[Optional] Onboarding","anchor":"optional-onboarding","htmlText":"[Optional] Onboarding"},{"level":1,"text":"Usage Examples 🤖","anchor":"usage-examples-","htmlText":"Usage Examples 🤖"},{"level":2,"text":"Agent Class","anchor":"agent-class","htmlText":"Agent Class"},{"level":3,"text":"run Method","anchor":"run-method","htmlText":"run Method"},{"level":2,"text":"Simple Example","anchor":"simple-example","htmlText":"Simple Example"},{"level":3,"text":"Settings and Customization","anchor":"settings-and-customization","htmlText":"Settings and Customization"},{"level":3,"text":"Integrating RAG with Swarms for Enhanced Long-Term Memory","anchor":"integrating-rag-with-swarms-for-enhanced-long-term-memory","htmlText":"Integrating RAG with Swarms for Enhanced Long-Term Memory"},{"level":2,"text":"Structured Outputs","anchor":"structured-outputs","htmlText":"Structured Outputs"},{"level":3,"text":"Misc Agent Settings","anchor":"misc-agent-settings","htmlText":"Misc Agent Settings"},{"level":3,"text":"Agentwith Pydantic BaseModel as Output Type","anchor":"agentwith-pydantic-basemodel-as-output-type","htmlText":"Agentwith Pydantic BaseModel as Output Type"},{"level":3,"text":"Multi Modal Autonomous Agent","anchor":"multi-modal-autonomous-agent","htmlText":"Multi Modal Autonomous Agent"},{"level":3,"text":"Local Agent ToolAgent","anchor":"local-agent-toolagent","htmlText":"Local Agent ToolAgent"},{"level":2,"text":"Understanding Swarms","anchor":"understanding-swarms","htmlText":"Understanding Swarms"},{"level":3,"text":"How Swarm Architectures Facilitate Communication","anchor":"how-swarm-architectures-facilitate-communication","htmlText":"How Swarm Architectures Facilitate Communication"},{"level":2,"text":"Swarms API","anchor":"swarms-api","htmlText":"Swarms API"},{"level":4,"text":"Steps:","anchor":"steps","htmlText":"Steps:"},{"level":3,"text":"SequentialWorkflow","anchor":"sequentialworkflow","htmlText":"SequentialWorkflow"},{"level":3,"text":"Methods","anchor":"methods","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output","htmlText":"Output"},{"level":2,"text":"AgentRearrange","anchor":"agentrearrange","htmlText":"AgentRearrange"},{"level":3,"text":"Methods","anchor":"methods-1","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs-1","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output-1","htmlText":"Output"},{"level":2,"text":"HierarhicalSwarm","anchor":"hierarhicalswarm","htmlText":"HierarhicalSwarm"},{"level":2,"text":"GraphSwarm","anchor":"graphswarm","htmlText":"GraphSwarm"},{"level":3,"text":"Methods","anchor":"methods-2","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs-2","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output-2","htmlText":"Output"},{"level":2,"text":"MixtureOfAgents","anchor":"mixtureofagents","htmlText":"MixtureOfAgents"},{"level":3,"text":"Methods","anchor":"methods-3","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs-3","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output-3","htmlText":"Output"},{"level":2,"text":"SpreadSheetSwarm","anchor":"spreadsheetswarm","htmlText":"SpreadSheetSwarm"},{"level":3,"text":"Key Features","anchor":"key-features","htmlText":"Key Features"},{"level":3,"text":"Methods","anchor":"methods-4","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs-4","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output-4","htmlText":"Output"},{"level":2,"text":"ForestSwarm","anchor":"forestswarm","htmlText":"ForestSwarm"},{"level":3,"text":"Methods","anchor":"methods-5","htmlText":"Methods"},{"level":3,"text":"Inputs","anchor":"inputs-5","htmlText":"Inputs"},{"level":3,"text":"Output","anchor":"output-5","htmlText":"Output"},{"level":2,"text":"SwarmRouter","anchor":"swarmrouter","htmlText":"SwarmRouter"},{"level":4,"text":"Attributes:","anchor":"attributes","htmlText":"Attributes:"},{"level":4,"text":"Methods:","anchor":"methods-6","htmlText":"Methods:"},{"level":3,"text":"Changing Swarm Types","anchor":"changing-swarm-types","htmlText":"Changing Swarm Types"},{"level":3,"text":"AgentRearrange","anchor":"agentrearrange-1","htmlText":"AgentRearrange"},{"level":3,"text":"MixtureOfAgents","anchor":"mixtureofagents-1","htmlText":"MixtureOfAgents"},{"level":2,"text":"GroupChat","anchor":"groupchat","htmlText":"GroupChat"},{"level":2,"text":"MultiAgentRouter","anchor":"multiagentrouter","htmlText":"MultiAgentRouter"},{"level":2,"text":"Onboarding Session","anchor":"onboarding-session","htmlText":"Onboarding Session"},{"level":2,"text":"Documentation","anchor":"documentation","htmlText":"Documentation"},{"level":2,"text":"Folder Structure","anchor":"folder-structure","htmlText":"Folder Structure"},{"level":2,"text":"🫶 Contributions:","anchor":"-contributions","htmlText":"🫶 Contributions:"},{"level":2,"text":"Accelerate Backlog","anchor":"accelerate-backlog","htmlText":"Accelerate Backlog"},{"level":2,"text":"Community","anchor":"community","htmlText":"Community"},{"level":1,"text":"License","anchor":"license","htmlText":"License"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms"}},{"displayName":"CODE_OF_CONDUCT.md","repoName":"swarms","refName":"master","path":"CODE_OF_CONDUCT.md","preferredFileType":"code_of_conduct","tabName":"Code of conduct","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms"}},{"displayName":"LICENSE","repoName":"swarms","refName":"master","path":"LICENSE","preferredFileType":"license","tabName":"Apache-2.0","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms"}},{"displayName":"SECURITY.md","repoName":"swarms","refName":"master","path":"SECURITY.md","preferredFileType":"security","tabName":"Security","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-708ec8ade250.js","githubDevUrl":null,"enabled_features":{"copilot_workspace":null,"code_nav_ui_events":false,"overview_shared_code_dropdown_button":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}}</script> <div data-target="react-partial.reactRoot"><style data-styled="true" data-styled-version="5.3.11">.iVEunk{margin-top:16px;margin-bottom:16px;}/*!sc*/ .jzuOtQ{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}/*!sc*/ .bGojzy{margin-bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:16px;}/*!sc*/ .iNSVHo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-bottom:16px;padding-top:8px;}/*!sc*/ .bVgnfw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:8px;}/*!sc*/ @media screen and (max-width:320px){.bVgnfw{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .CEgMp{position:relative;}/*!sc*/ @media screen and (max-width:380px){.CEgMp .ref-selector-button-text-container{max-width:80px;}}/*!sc*/ @media screen and (max-width:320px){.CEgMp{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}.CEgMp .overview-ref-selector{width:100%;}.CEgMp .overview-ref-selector > span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;}.CEgMp .overview-ref-selector > span > span[data-component="text"]{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .gMOVLe[data-size="medium"]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;}/*!sc*/ .gMOVLe[data-size="medium"] svg{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gMOVLe[data-size="medium"] > span{width:inherit;}/*!sc*/ .gUkoLg{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}/*!sc*/ .bZBlpz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;}/*!sc*/ .lhTYNA{margin-right:4px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .ffLUq{font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}/*!sc*/ .bmcJak{min-width:0;}/*!sc*/ .fLXEGX{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1079px){.fLXEGX{display:none;}}/*!sc*/ .lmSMZJ[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));padding-left:4px;padding-right:4px;}/*!sc*/ .lmSMZJ[data-size="medium"] span[data-component="leadingVisual"]{margin-right:4px !important;}/*!sc*/ .dqfxud{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1080px){.dqfxud{display:none;}}/*!sc*/ @media screen and (max-width:543px){.dqfxud{display:none;}}/*!sc*/ .fGwBZA[data-size="medium"][data-no-visuals]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .jxTzTd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:8px;gap:8px;}/*!sc*/ .gqqBXN{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:8px;}/*!sc*/ @media screen and (max-width:543px){.gqqBXN{display:none;}}/*!sc*/ .dzXgxt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1011px){.dzXgxt{display:none;}}/*!sc*/ .iWFGlI{margin-left:8px;margin-right:8px;margin:0;}/*!sc*/ .vcvyP{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:160px;}/*!sc*/ .YUPas{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1012px){.YUPas{display:none;}}/*!sc*/ .izFOf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:544px){.izFOf{display:none;}}/*!sc*/ .vIPPs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;}/*!sc*/ .fdROMU{width:100%;border-collapse:separate;border-spacing:0;border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;table-layout:fixed;overflow:unset;}/*!sc*/ .jGKpsv{height:0px;line-height:0px;}/*!sc*/ .jGKpsv tr{height:0px;font-size:0px;}/*!sc*/ .jdgHnn{padding:16px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;text-align:left;height:40px;}/*!sc*/ .jdgHnn th{padding-left:16px;background-color:var(--bgColor-muted,var(--color-canvas-subtle,#f6f8fa));}/*!sc*/ .bQivRW{width:100%;border-top-left-radius:6px;}/*!sc*/ @media screen and (min-width:544px){.bQivRW{display:none;}}/*!sc*/ .ldkMIO{width:40%;border-top-left-radius:6px;}/*!sc*/ @media screen and (max-width:543px){.ldkMIO{display:none;}}/*!sc*/ .jMbWeI{text-align:right;padding-right:16px;width:136px;border-top-right-radius:6px;}/*!sc*/ .gpqjiB{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;height:40px;}/*!sc*/ .dzCJzi{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;min-width:273px;padding:8px;}/*!sc*/ @media screen and (min-width:544px){.dzCJzi{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}}/*!sc*/ .eNCcrz{text-align:center;vertical-align:center;height:40px;border-top:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));}/*!sc*/ .bHTcCe{border-top:1px solid var(--borderColor-default,var(--color-border-default));cursor:pointer;}/*!sc*/ .csrIcr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;gap:16px;}/*!sc*/ .bUQNHB{border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}/*!sc*/ @media screen and (max-width:543px){.bUQNHB{margin-left:-16px;margin-right:-16px;max-width:calc(100% + 32px);}}/*!sc*/ @media screen and (min-width:544px){.bUQNHB{max-width:100%;}}/*!sc*/ .jPdcfu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid;border-bottom-color:var(--borderColor-default,var(--color-border-default,#d0d7de));-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:8px;position:-webkit-sticky;position:sticky;top:0;background-color:var(--bgColor-default,var(--color-canvas-default,#ffffff));z-index:1;border-top-left-radius:6px;border-top-right-radius:6px;}/*!sc*/ .iphEWz{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;border-bottom:none;max-width:100%;padding-left:8px;padding-right:8px;}/*!sc*/ .hUCRAk{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ .cwoBXV[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-subtle,#6e7781));padding-left:8px;padding-right:8px;}/*!sc*/ .QkQOb{padding:32px;overflow:auto;}/*!sc*/ data-styled.g1[id="Box-sc-g0xbh4-0"]{content:"iVEunk,jzuOtQ,bGojzy,iNSVHo,bVgnfw,CEgMp,gMOVLe,gUkoLg,bZBlpz,lhTYNA,ffLUq,bmcJak,fLXEGX,lmSMZJ,dqfxud,fGwBZA,jxTzTd,gqqBXN,dzXgxt,iWFGlI,vcvyP,YUPas,izFOf,vIPPs,fdROMU,jGKpsv,jdgHnn,bQivRW,ldkMIO,jMbWeI,gpqjiB,dzCJzi,eNCcrz,bHTcCe,csrIcr,bUQNHB,jPdcfu,iphEWz,hUCRAk,cwoBXV,QkQOb,"}/*!sc*/ .brGdpi{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}/*!sc*/ data-styled.g5[id="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0"]{content:"brGdpi,"}/*!sc*/ .hWlpPn{position:relative;display:inline-block;}/*!sc*/ .hWlpPn::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,var(--fgColor-onEmphasis,var(--color-fg-on-emphasis,#ffffff)));text-align:center;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;-webkit-letter-spacing:normal;-moz-letter-spacing:normal;-ms-letter-spacing:normal;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--tooltip-bgColor,var(--bgColor-emphasis,var(--color-neutral-emphasis-plus,#24292f)));border-radius:6px;opacity:0;}/*!sc*/ @-webkit-keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ @keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ .hWlpPn:hover::after,.hWlpPn:active::after,.hWlpPn:focus::after,.hWlpPn:focus-within::after{display:inline-block;-webkit-text-decoration:none;text-decoration:none;-webkit-animation-name:tooltip-appear;animation-name:tooltip-appear;-webkit-animation-duration:0.1s;animation-duration:0.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-no-delay:hover::after,.hWlpPn.tooltipped-no-delay:active::after,.hWlpPn.tooltipped-no-delay:focus::after,.hWlpPn.tooltipped-no-delay:focus-within::after{-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-multiline:hover::after,.hWlpPn.tooltipped-multiline:active::after,.hWlpPn.tooltipped-multiline:focus::after,.hWlpPn.tooltipped-multiline:focus-within::after{display:table-cell;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-se::after,.hWlpPn.tooltipped-sw::after{top:100%;right:50%;margin-top:6px;}/*!sc*/ .hWlpPn.tooltipped-se::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-sw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-n::after,.hWlpPn.tooltipped-ne::after,.hWlpPn.tooltipped-nw::after{right:50%;bottom:100%;margin-bottom:6px;}/*!sc*/ .hWlpPn.tooltipped-ne::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-nw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-n::after{-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}/*!sc*/ .hWlpPn.tooltipped-w::after{right:100%;bottom:50%;margin-right:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-e::after{bottom:50%;left:100%;margin-left:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-s::after,.hWlpPn.tooltipped-multiline.tooltipped-n::after{right:auto;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-w::after,.hWlpPn.tooltipped-multiline.tooltipped-e::after{right:100%;}/*!sc*/ .hWlpPn.tooltipped-align-right-2::after{right:0;margin-right:0;}/*!sc*/ .hWlpPn.tooltipped-align-left-2::after{left:0;margin-left:0;}/*!sc*/ data-styled.g16[id="Tooltip__TooltipBase-sc-17tf59c-0"]{content:"hWlpPn,"}/*!sc*/ .liVpTx{display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap;max-width:125px;}/*!sc*/ data-styled.g18[id="Truncate__StyledTruncate-sc-23o1d2-0"]{content:"liVpTx,"}/*!sc*/ </style> <!-- --> <!-- --> <div class="Box-sc-g0xbh4-0 iVEunk"><div class="Box-sc-g0xbh4-0 jzuOtQ"><div class="Box-sc-g0xbh4-0 bGojzy"></div></div><div class="Box-sc-g0xbh4-0 iNSVHo"><div class="Box-sc-g0xbh4-0 bVgnfw"><div class="Box-sc-g0xbh4-0 CEgMp"><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-label="master branch" data-testid="anchor-button" class="Box-sc-g0xbh4-0 gMOVLe prc-Button-ButtonBase-c50BI overview-ref-selector width-full" data-loading="false" data-size="medium" data-variant="default" aria-describedby="branch-picker-repos-header-ref-selector-loading-announcement" id="branch-picker-repos-header-ref-selector"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="text" class="prc-Button-Label-pTQ3x"><div class="Box-sc-g0xbh4-0 bZBlpz"><div class="Box-sc-g0xbh4-0 lhTYNA"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></div><div class="Box-sc-g0xbh4-0 ffLUq ref-selector-button-text-container"><span class="Box-sc-g0xbh4-0 bmcJak prc-Text-Text-0ima0"> <!-- -->master</span></div></div></span><span data-component="trailingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><button hidden="" data-hotkey-scope="read-only-cursor-text-area"></button></div><div class="Box-sc-g0xbh4-0 fLXEGX"><a style="--button-color:fg.muted" type="button" href="/kyegomez/swarms/branches" class="Box-sc-g0xbh4-0 lmSMZJ prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rclab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Branches</span></span></a><a style="--button-color:fg.muted" type="button" href="/kyegomez/swarms/tags" class="Box-sc-g0xbh4-0 lmSMZJ prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rklab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Tags</span></span></a></div><div class="Box-sc-g0xbh4-0 dqfxud"><a style="--button-color:fg.muted" type="button" aria-label="Go to Branches page" href="/kyegomez/swarms/branches" class="Box-sc-g0xbh4-0 fGwBZA prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Relab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></a><a style="--button-color:fg.muted" type="button" aria-label="Go to Tags page" href="/kyegomez/swarms/tags" class="Box-sc-g0xbh4-0 fGwBZA prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Rmlab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></a></div></div><div class="Box-sc-g0xbh4-0 jxTzTd"><div class="Box-sc-g0xbh4-0 gqqBXN"><div class="Box-sc-g0xbh4-0 dzXgxt"><!--$--><div class="Box-sc-g0xbh4-0 iWFGlI"><span class="Box-sc-g0xbh4-0 vcvyP TextInput-wrapper prc-components-TextInputWrapper-i1ofR prc-components-TextInputBaseWrapper-ueK9q" data-leading-visual="true" data-trailing-visual="true" aria-busy="false"><span class="TextInput-icon" id=":R2j5ab:" aria-hidden="true"><svg aria-hidden="true" focusable="false" class="octicon octicon-search" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></span><input type="text" aria-label="Go to file" role="combobox" aria-controls="file-results-list" aria-expanded="false" aria-haspopup="dialog" autoCorrect="off" spellcheck="false" placeholder="Go to file" aria-describedby=":R2j5ab: :R2j5abH1:" data-component="input" class="prc-components-Input-Ic-y8" value=""/><span class="TextInput-icon" id=":R2j5abH1:" aria-hidden="true"></span></span></div><!--/$--></div><div class="Box-sc-g0xbh4-0 YUPas"><button type="button" class="prc-Button-ButtonBase-c50BI" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-describedby=":Rr5ab:-loading-announcement"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="text" class="prc-Button-Label-pTQ3x">Go to file</span></span></button></div><div class="react-directory-add-file-icon"></div><div class="react-directory-remove-file-icon"></div></div><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="primary" aria-describedby=":R55ab:-loading-announcement" id=":R55ab:"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-code hide-sm" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x">Code</span><span data-component="trailingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="Box-sc-g0xbh4-0 izFOf"><button data-component="IconButton" type="button" aria-label="Open more actions menu" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-c50BI prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="default" aria-describedby=":R75ab:-loading-announcement" id=":R75ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button></div></div></div><div class="Box-sc-g0xbh4-0 vIPPs"><div data-hpc="true"><button hidden="" data-testid="focus-next-element-button" data-hotkey="j"></button><button hidden="" data-testid="focus-previous-element-button" data-hotkey="k"></button><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading" id="folders-and-files">Folders and files</h2><table aria-labelledby="folders-and-files" class="Box-sc-g0xbh4-0 fdROMU"><thead class="Box-sc-g0xbh4-0 jGKpsv"><tr class="Box-sc-g0xbh4-0 jdgHnn"><th colSpan="2" class="Box-sc-g0xbh4-0 bQivRW"><span class="text-bold">Name</span></th><th colSpan="1" class="Box-sc-g0xbh4-0 ldkMIO"><span class="text-bold">Name</span></th><th class="hide-sm"><div title="Last commit message" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit message</span></div></th><th colSpan="1" class="Box-sc-g0xbh4-0 jMbWeI"><div title="Last commit date" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit date</span></div></th></tr></thead><tbody><tr class="Box-sc-g0xbh4-0 gpqjiB"><td colSpan="3" class="bgColor-muted p-1 rounded-top-2"><div class="Box-sc-g0xbh4-0 dzCJzi"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">Latest commit</h2><div style="width:120px" class="Skeleton Skeleton--text" data-testid="loading"> </div><div class="d-flex flex-shrink-0 gap-2"><div data-testid="latest-commit-details" class="d-none d-sm-flex flex-items-center"></div><div class="d-flex gap-2"><h2 class="sr-only ScreenReaderHeading-module__userSelectNone--vW4Cq prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">History</h2><a href="/kyegomez/swarms/commits/master/" class="prc-Button-ButtonBase-c50BI d-none d-lg-flex LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby=":Raqj8pab:-loading-announcement"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span><span data-component="text" class="prc-Button-Label-pTQ3x"><span class="fgColor-default">3,552 Commits</span></span></span></a><div class="d-sm-none"></div><div class="d-flex d-lg-none"><span role="tooltip" aria-label="3,552 Commits" id="history-icon-button-tooltip" class="Tooltip__TooltipBase-sc-17tf59c-0 hWlpPn tooltipped-n"><a href="/kyegomez/swarms/commits/master/" class="prc-Button-ButtonBase-c50BI LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" data-variant="invisible" aria-describedby=":R1iqj8pab:-loading-announcement history-icon-button-tooltip"><span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-HKbr-"><span data-component="leadingVisual" class="prc-Button-Visual-2epfX prc-Button-VisualWrap-Db-eB"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span></span></a></span></div></div></div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-0"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".github" aria-label=".github, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/.github">.github</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".github" aria-label=".github, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/.github">.github</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-1"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="docs" aria-label="docs, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/docs">docs</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="docs" aria-label="docs, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/docs">docs</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-2"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="examples" aria-label="examples, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/examples">examples</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="examples" aria-label="examples, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/examples">examples</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-3"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="images" aria-label="images, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/images">images</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="images" aria-label="images, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/images">images</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-4"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms" aria-label="swarms, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/swarms">swarms</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms" aria-label="swarms, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/swarms">swarms</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-5"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/tests">tests</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file-directory-fill icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/kyegomez/swarms/tree/master/tests">tests</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-6"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".dockerignore" aria-label=".dockerignore, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.dockerignore">.dockerignore</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".dockerignore" aria-label=".dockerignore, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.dockerignore">.dockerignore</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-7"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".env.example" aria-label=".env.example, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.env.example">.env.example</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".env.example" aria-label=".env.example, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.env.example">.env.example</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-8"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-9"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CODE_OF_CONDUCT.md" aria-label="CODE_OF_CONDUCT.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/CODE_OF_CONDUCT.md">CODE_OF_CONDUCT.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CODE_OF_CONDUCT.md" aria-label="CODE_OF_CONDUCT.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/CODE_OF_CONDUCT.md">CODE_OF_CONDUCT.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-10"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CONTRIBUTING.md" aria-label="CONTRIBUTING.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="CONTRIBUTING.md" aria-label="CONTRIBUTING.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-11"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Dockerfile" aria-label="Dockerfile, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/Dockerfile">Dockerfile</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="Dockerfile" aria-label="Dockerfile, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/Dockerfile">Dockerfile</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-12"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE" aria-label="LICENSE, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/LICENSE">LICENSE</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE" aria-label="LICENSE, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/LICENSE">LICENSE</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-13"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/README.md">README.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="README.md" aria-label="README.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/README.md">README.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-14"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="SECURITY.md" aria-label="SECURITY.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/SECURITY.md">SECURITY.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="SECURITY.md" aria-label="SECURITY.md, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/SECURITY.md">SECURITY.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-15"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="agent_tools_dict_example.py" aria-label="agent_tools_dict_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/agent_tools_dict_example.py">agent_tools_dict_example.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="agent_tools_dict_example.py" aria-label="agent_tools_dict_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/agent_tools_dict_example.py">agent_tools_dict_example.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-16"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="deep_research_swarm_example.py" aria-label="deep_research_swarm_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/deep_research_swarm_example.py">deep_research_swarm_example.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="deep_research_swarm_example.py" aria-label="deep_research_swarm_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/deep_research_swarm_example.py">deep_research_swarm_example.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-17"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="example.py" aria-label="example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/example.py">example.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="example.py" aria-label="example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/example.py">example.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-18"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="groupchat_example.py" aria-label="groupchat_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/groupchat_example.py">groupchat_example.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="groupchat_example.py" aria-label="groupchat_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/groupchat_example.py">groupchat_example.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-19"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="hybrid_hiearchical_swarm.py" aria-label="hybrid_hiearchical_swarm.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/hybrid_hiearchical_swarm.py">hybrid_hiearchical_swarm.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="hybrid_hiearchical_swarm.py" aria-label="hybrid_hiearchical_swarm.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/hybrid_hiearchical_swarm.py">hybrid_hiearchical_swarm.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-20"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="pyproject.toml" aria-label="pyproject.toml, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/pyproject.toml">pyproject.toml</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="pyproject.toml" aria-label="pyproject.toml, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/pyproject.toml">pyproject.toml</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-21"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="requirements.txt" aria-label="requirements.txt, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/requirements.txt">requirements.txt</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="requirements.txt" aria-label="requirements.txt, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/requirements.txt">requirements.txt</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-22"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="sequential_swarm_example.py" aria-label="sequential_swarm_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/sequential_swarm_example.py">sequential_swarm_example.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="sequential_swarm_example.py" aria-label="sequential_swarm_example.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/sequential_swarm_example.py">sequential_swarm_example.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-23"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_logo_new.png" aria-label="swarms_logo_new.png, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_logo_new.png">swarms_logo_new.png</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_logo_new.png" aria-label="swarms_logo_new.png, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_logo_new.png">swarms_logo_new.png</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-24"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_logo_svg.svg" aria-label="swarms_logo_svg.svg, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_logo_svg.svg">swarms_logo_svg.svg</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_logo_svg.svg" aria-label="swarms_logo_svg.svg, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_logo_svg.svg">swarms_logo_svg.svg</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-25"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_of_browser_agents.py" aria-label="swarms_of_browser_agents.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_of_browser_agents.py">swarms_of_browser_agents.py</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="swarms_of_browser_agents.py" aria-label="swarms_of_browser_agents.py, (File)" class="Link--primary" href="/kyegomez/swarms/blob/master/swarms_of_browser_agents.py">swarms_of_browser_agents.py</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="Box-sc-g0xbh4-0 eNCcrz show-for-mobile" data-testid="view-all-files-row"><td colSpan="3" class="Box-sc-g0xbh4-0 bHTcCe"><div><button class="prc-Link-Link-85e08">View all files</button></div></td></tr></tbody></table></div><div class="Box-sc-g0xbh4-0 csrIcr"><div class="Box-sc-g0xbh4-0 bUQNHB"><div itemscope="" itemType="https://schema.org/abstract" class="Box-sc-g0xbh4-0 jPdcfu"><h2 class="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0 brGdpi">Repository files navigation</h2><nav class="Box-sc-g0xbh4-0 iphEWz prc-components-UnderlineWrapper-oOh5J" aria-label="Repository files"><ul class="prc-components-UnderlineItemList-b23Hf" role="list"><li class="Box-sc-g0xbh4-0 hUCRAk"><a class="prc-components-UnderlineItem-lJsg-" href="#" aria-current="page"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-book" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg></span><span data-component="text" data-content="README">README</span></a></li><li class="Box-sc-g0xbh4-0 hUCRAk"><a class="prc-components-UnderlineItem-lJsg-" href="#"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-code-of-conduct" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.048 2.241c.964-.709 2.079-1.238 3.325-1.241a4.616 4.616 0 0 1 3.282 1.355c.41.408.757.86.996 1.428.238.568.348 1.206.347 1.968 0 2.193-1.505 4.254-3.081 5.862-1.496 1.526-3.213 2.796-4.249 3.563l-.22.163a.749.749 0 0 1-.895 0l-.221-.163c-1.036-.767-2.753-2.037-4.249-3.563C1.51 10.008.007 7.952.002 5.762a4.614 4.614 0 0 1 1.353-3.407C3.123.585 6.223.537 8.048 2.24Zm-1.153.983c-1.25-1.033-3.321-.967-4.48.191a3.115 3.115 0 0 0-.913 2.335c0 1.556 1.109 3.24 2.652 4.813C5.463 11.898 6.96 13.032 8 13.805c.353-.262.758-.565 1.191-.905l-1.326-1.223a.75.75 0 0 1 1.018-1.102l1.48 1.366c.328-.281.659-.577.984-.887L9.99 9.802a.75.75 0 1 1 1.019-1.103l1.384 1.28c.295-.329.566-.661.81-.995L12.92 8.7l-1.167-1.168c-.674-.671-1.78-.664-2.474.03-.268.269-.538.537-.802.797-.893.882-2.319.843-3.185-.032-.346-.35-.693-.697-1.043-1.047a.75.75 0 0 1-.04-1.016c.162-.191.336-.401.52-.623.62-.748 1.356-1.637 2.166-2.417Zm7.112 4.442c.313-.65.491-1.293.491-1.916v-.001c0-.614-.088-1.045-.23-1.385-.143-.339-.357-.633-.673-.949a3.111 3.111 0 0 0-2.218-.915c-1.092.003-2.165.627-3.226 1.602-.823.755-1.554 1.637-2.228 2.45l-.127.154.562.566a.755.755 0 0 0 1.066.02l.794-.79c1.258-1.258 3.312-1.31 4.594-.032.396.394.792.791 1.173 1.173Z"></path></svg></span><span data-component="text" data-content="Code of conduct">Code of conduct</span></a></li><li class="Box-sc-g0xbh4-0 hUCRAk"><a class="prc-components-UnderlineItem-lJsg-" href="#"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="Apache-2.0 license">Apache-2.0 license</span></a></li><li class="Box-sc-g0xbh4-0 hUCRAk"><a class="prc-components-UnderlineItem-lJsg-" href="#"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="Security">Security</span></a></li></ul></nav><button style="--button-color:fg.subtle" type="button" aria-label="Outline" aria-haspopup="true" aria-expanded="false" tabindex="0" class="Box-sc-g0xbh4-0 cwoBXV prc-Button-ButtonBase-c50BI" data-loading="false" data-size="medium" data-variant="invisible" aria-describedby=":Rr9ab:-loading-announcement" id=":Rr9ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-list-unordered" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"><path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg></button></div><div class="Box-sc-g0xbh4-0 QkQOb js-snippet-clipboard-copy-unpositioned undefined" data-hpc="true"><article class="markdown-body entry-content container-lg" itemprop="text"><div align="center" dir="auto"> <a href="https://swarms.world" rel="nofollow"> <img src="https://github.com/kyegomez/swarms/raw/master/images/swarmslogobanner.png" width="50%" alt="Logo" style="max-width: 100%;"> </a> </div> <p align="center" dir="auto"> <em>The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework </em> </p> <p align="center" dir="auto"> <a href="https://pypi.org/project/swarms/" rel="nofollow"> <img alt="Python" src="https://camo.githubusercontent.com/0d0779a129f1dcf6c31613b701fe0646fd4e4d2ed2a7cbd61b27fd5514baa938/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d3336373041303f7374796c653d666f722d7468652d6261646765266c6f676f3d707974686f6e266c6f676f436f6c6f723d666664643534" data-canonical-src="https://img.shields.io/badge/python-3670A0?style=for-the-badge&amp;logo=python&amp;logoColor=ffdd54" style="max-width: 100%;"> <img alt="Version" src="https://camo.githubusercontent.com/fd776c0e79f672bd54e0ab7a8db04006d534eb1ffdee0e3bb4b5ceee2d246174/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f737761726d733f7374796c653d666f722d7468652d626164676526636f6c6f723d333637304130" data-canonical-src="https://img.shields.io/pypi/v/swarms?style=for-the-badge&amp;color=3670A0" style="max-width: 100%;"> </a> </p> <p align="center" dir="auto"> <a href="https://twitter.com/swarms_corp/" rel="nofollow">🐦 Twitter</a> <span>  •  </span> <a href="https://discord.gg/jM3Z6M9uMq" rel="nofollow">📢 Discord</a> <span>  •  </span> <a href="https://swarms.world" rel="nofollow">Swarms Platform</a> <span>  •  </span> <a href="https://docs.swarms.world" rel="nofollow">📙 Documentation</a> </p> <p align="center" dir="auto"> <a href="https://discord.gg/jHnrkH5y" rel="nofollow"> <img src="https://camo.githubusercontent.com/ec5d39ab0ea8e734562352ef135e2937a2526002b90e9a432d0cb29c695b5c1d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d4a6f696e2532306f75722532307365727665722d3538363546323f7374796c653d666f722d7468652d6261646765266c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465" alt="Discord" data-canonical-src="https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&amp;logo=discord&amp;logoColor=white" style="max-width: 100%;"> </a> <a href="https://www.youtube.com/@kyegomez3242" rel="nofollow"> <img src="https://camo.githubusercontent.com/aafea284ffcbb063291ec2cc2803493982e65fa18967a211c5b5c689170c217b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d796f7574756265266c6f676f436f6c6f723d7768697465" alt="YouTube" data-canonical-src="https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&amp;logo=youtube&amp;logoColor=white" style="max-width: 100%;"> </a> <a href="https://www.linkedin.com/in/kye-g-38759a207/" rel="nofollow"> <img src="https://camo.githubusercontent.com/e0b5da352ded24c34c027e1826bc2c4d780976b2bdabca57eff4ca185ff7ba56/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e6b6564496e2d436f6e6e6563742d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465" alt="LinkedIn" data-canonical-src="https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&amp;logo=linkedin&amp;logoColor=white" style="max-width: 100%;"> </a> <a href="https://x.com/kyegomezb" rel="nofollow"> <img src="https://camo.githubusercontent.com/527cd512620074e605797b2bb8d9cc4cf6077dcfdfcc8593ea8ac2cadc5fcb19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582e636f6d2d466f6c6c6f772d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d78266c6f676f436f6c6f723d7768697465" alt="X.com" data-canonical-src="https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&amp;logo=x&amp;logoColor=white" style="max-width: 100%;"> </a> </p> <p align="center" dir="auto"> <a href="https://github.com/kyegomez/swarms/issues"> <img src="https://camo.githubusercontent.com/00bec3acef6f98e656861315bc4c91fe84916d8bc62c137ed41f8b2ddaf7e914/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b7965676f6d657a2f737761726d73" alt="GitHub issues" data-canonical-src="https://img.shields.io/github/issues/kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://github.com/kyegomez/swarms/network"> <img src="https://camo.githubusercontent.com/8eaa30347f43ad4ce51f02d9cbb0eed8b23c8c13a7afd659354722b59219a456/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b7965676f6d657a2f737761726d73" alt="GitHub forks" data-canonical-src="https://img.shields.io/github/forks/kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://github.com/kyegomez/swarms/stargazers"> <img src="https://camo.githubusercontent.com/391c60b0f711c97f9d65c1c28695e6e8a63e4c4d4559e5c7da8a533504423783/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b7965676f6d657a2f737761726d73" alt="GitHub stars" data-canonical-src="https://img.shields.io/github/stars/kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://github.com/kyegomez/swarms/blob/main/LICENSE"> <img src="https://camo.githubusercontent.com/f8b90c5c7a49e648b5b00b145088fbed23120b42bdc3d2f1ec2c6cea848fa749/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b7965676f6d657a2f737761726d73" alt="GitHub license" data-canonical-src="https://img.shields.io/github/license/kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://star-history.com/#kyegomez/swarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/b26b12a70c0dc1f7bbe557ce950e9274aa0828e42bd6f3cd56c8a4c2400299d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b7965676f6d657a2f737761726d733f7374796c653d736f6369616c" alt="GitHub star chart" data-canonical-src="https://img.shields.io/github/stars/kyegomez/swarms?style=social" style="max-width: 100%;"> </a> <a href="https://libraries.io/github/kyegomez/swarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/9f70f43fae383a9247fae655732db89d029cb97158e46be2fa337e89292aed96/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f6769746875622f6b7965676f6d657a2f737761726d73" alt="Dependency Status" data-canonical-src="https://img.shields.io/librariesio/github/kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://pepy.tech/project/swarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/5ea1d0aa70949d7694eb10af0d5a1496be40e1f8d29c305ddc55b53c0f6e4c2e/68747470733a2f2f7374617469632e706570792e746563682f62616467652f737761726d732f6d6f6e7468" alt="Downloads" data-canonical-src="https://static.pepy.tech/badge/swarms/month" style="max-width: 100%;"> </a> </p> <p align="center" dir="auto"> <a href="https://twitter.com/intent/tweet?text=Check%20out%20this%20amazing%20AI%20project:%20&amp;url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/8248229d11b8940b0da7bf960e9513f0b0b992b1983d99b33294100b6fb7b084/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f747769747465722e636f6d2f636c6f7564706f7373652e7376673f7374796c653d736f6369616c266c6162656c3d53686172652532302534306b7965676f6d657a2f737761726d73" alt="Share on Twitter" data-canonical-src="https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&amp;label=Share%20%40kyegomez/swarms" style="max-width: 100%;"> </a> <a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/6c248e1fd1637ea7b2079e2bd96a52f93b571a51634c945a3e66fce90c122d09/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53686172652d25323066616365626f6f6b2d626c7565" alt="Share on Facebook" data-canonical-src="https://img.shields.io/badge/Share-%20facebook-blue" style="max-width: 100%;"> </a> <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&amp;title=&amp;summary=&amp;source=" rel="nofollow"> <img src="https://camo.githubusercontent.com/87f9e6aa813f4063b8ec782608f80fbccaa8c1db2e38ae8c08a2048cdedc578b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53686172652d2532306c696e6b6564696e2d626c7565" alt="Share on LinkedIn" data-canonical-src="https://img.shields.io/badge/Share-%20linkedin-blue" style="max-width: 100%;"> </a> </p> <p align="center" dir="auto"> <a href="https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&amp;title=Swarms%20-%20the%20future%20of%20AI" rel="nofollow"> <img src="https://camo.githubusercontent.com/527db5a7e12a8f17a3ac8250354e7fe5e4634299df15db613b3f9568cddef5de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e2532305265646469742d6f72616e6765" alt="Share on Reddit" data-canonical-src="https://img.shields.io/badge/-Share%20on%20Reddit-orange" style="max-width: 100%;"> </a> <a href="https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&amp;t=Swarms%20-%20the%20future%20of%20AI" rel="nofollow"> <img src="https://camo.githubusercontent.com/be9df7ef81bcb6fd2ad7a264d4a5b590566edb15fb0c62ffb5b54a0eca953ead/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e2532304861636b65722532304e6577732d6f72616e6765" alt="Share on Hacker News" data-canonical-src="https://img.shields.io/badge/-Share%20on%20Hacker%20News-orange" style="max-width: 100%;"> </a> <a href="https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&amp;media=https%3A%2F%2Fexample.com%2Fimage.jpg&amp;description=Swarms%20-%20the%20future%20of%20AI" rel="nofollow"> <img src="https://camo.githubusercontent.com/4b6034195204e3f8790ae64038d7c4a7882b0fc559454f81701b237f167ac412/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e25323050696e7465726573742d726564" alt="Share on Pinterest" data-canonical-src="https://img.shields.io/badge/-Share%20on%20Pinterest-red" style="max-width: 100%;"> </a> <a href="https://api.whatsapp.com/send?text=Check%20out%20Swarms%20-%20the%20future%20of%20AI%20%23swarms%20%23AI%0A%0Ahttps%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms" rel="nofollow"> <img src="https://camo.githubusercontent.com/fa6d5b13ef58aee29b4bf3a50e832a854c2da4c28b6a4c48644c0820b4186662/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53686172652532306f6e25323057686174734170702d677265656e" alt="Share on WhatsApp" data-canonical-src="https://img.shields.io/badge/-Share%20on%20WhatsApp-green" style="max-width: 100%;"> </a> </p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">✨ Features</h2><a id="user-content--features" class="anchor" aria-label="Permalink: ✨ Features" href="#-features"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Category</th> <th>Features</th> <th>Benefits</th> </tr> </thead> <tbody> <tr> <td>🏢 Enterprise Architecture</td> <td>• Production-Ready Infrastructure<br>• High Reliability Systems<br>• Modular Design<br>• Comprehensive Logging</td> <td>• Reduced downtime<br>• Easier maintenance<br>• Better debugging<br>• Enhanced monitoring</td> </tr> <tr> <td>🤖 Agent Orchestration</td> <td>• Hierarchical Swarms<br>• Parallel Processing<br>• Sequential Workflows<br>• Graph-based Workflows<br>• Dynamic Agent Rearrangement</td> <td>• Complex task handling<br>• Improved performance<br>• Flexible workflows<br>• Optimized execution</td> </tr> <tr> <td>🔄 Integration Capabilities</td> <td>• Multi-Model Support<br>• Custom Agent Creation<br>• Extensive Tool Library<br>• Multiple Memory Systems</td> <td>• Provider flexibility<br>• Custom solutions<br>• Extended functionality<br>• Enhanced memory management</td> </tr> <tr> <td>📈 Scalability</td> <td>• Concurrent Processing<br>• Resource Management<br>• Load Balancing<br>• Horizontal Scaling</td> <td>• Higher throughput<br>• Efficient resource use<br>• Better performance<br>• Easy scaling</td> </tr> <tr> <td>🛠️ Developer Tools</td> <td>• Simple API<br>• Extensive Documentation<br>• Active Community<br>• CLI Tools</td> <td>• Faster development<br>• Easy learning curve<br>• Community support<br>• Quick deployment</td> </tr> <tr> <td>🔐 Security Features</td> <td>• Error Handling<br>• Rate Limiting<br>• Monitoring Integration<br>• Audit Logging</td> <td>• Improved reliability<br>• API protection<br>• Better monitoring<br>• Enhanced tracking</td> </tr> <tr> <td>📊 Advanced Features</td> <td>• SpreadsheetSwarm<br>• Group Chat<br>• Agent Registry<br>• Mixture of Agents</td> <td>• Mass agent management<br>• Collaborative AI<br>• Centralized control<br>• Complex solutions</td> </tr> <tr> <td>🔌 Provider Support</td> <td>• OpenAI<br>• Anthropic<br>• ChromaDB<br>• Custom Providers</td> <td>• Provider flexibility<br>• Storage options<br>• Custom integration<br>• Vendor independence</td> </tr> <tr> <td>💪 Production Features</td> <td>• Automatic Retries<br>• Async Support<br>• Environment Management<br>• Type Safety</td> <td>• Better reliability<br>• Improved performance<br>• Easy configuration<br>• Safer code</td> </tr> <tr> <td>🎯 Use Case Support</td> <td>• Task-Specific Agents<br>• Custom Workflows<br>• Industry Solutions<br>• Extensible Framework</td> <td>• Quick deployment<br>• Flexible solutions<br>• Industry readiness<br>• Easy customization</td> </tr> </tbody> </table></markdown-accessiblity-table> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Requirements</h2><a id="user-content-requirements" class="anchor" aria-label="Permalink: Requirements" href="#requirements"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ul dir="auto"> <li><code>python3.10</code> or above!</li> <li><code>$ pip install -U swarms</code> And, don't forget to install swarms!</li> <li><code>.env</code> file with API keys from your providers like <code>OPENAI_API_KEY</code>, <code>ANTHROPIC_API_KEY</code></li> <li>Set an <code>.env</code> Variable with your desired workspace dir: <code>WORKSPACE_DIR="agent_workspace"</code> or do it in your terminal with <code>export WORKSPACE_DIR="agent_workspace"</code></li> <li>Finally, <code>swarms onboarding</code> to get you started.</li> </ul> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Guides and Walkthroughs</h2><a id="user-content-guides-and-walkthroughs" class="anchor" aria-label="Permalink: Guides and Walkthroughs" href="#guides-and-walkthroughs"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Refer to our documentation for production grade implementation details.</p> <markdown-accessiblity-table><table> <thead> <tr> <th>Section</th> <th>Links</th> </tr> </thead> <tbody> <tr> <td>Installation</td> <td><a href="https://docs.swarms.world/en/latest/swarms/install/install/" rel="nofollow">Installation</a></td> </tr> <tr> <td>Quickstart</td> <td><a href="https://docs.swarms.world/en/latest/swarms/install/quickstart/" rel="nofollow">Get Started</a></td> </tr> <tr> <td>Agent Internal Mechanisms</td> <td><a href="https://docs.swarms.world/en/latest/swarms/framework/agents_explained/" rel="nofollow">Agent Architecture</a></td> </tr> <tr> <td>Agent API</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/agent/" rel="nofollow">Agent API</a></td> </tr> <tr> <td>Integrating External Agents Griptape, Autogen, etc</td> <td><a href="https://docs.swarms.world/en/latest/swarms/agents/external_party_agents/" rel="nofollow">Integrating External APIs</a></td> </tr> <tr> <td>Creating Agents from YAML</td> <td><a href="https://docs.swarms.world/en/latest/swarms/agents/create_agents_yaml/" rel="nofollow">Creating Agents from YAML</a></td> </tr> <tr> <td>Why You Need Swarms</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/why/" rel="nofollow">Why MultiAgent Collaboration is Necessary</a></td> </tr> <tr> <td>Swarm Architectures Analysis</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/" rel="nofollow">Swarm Architectures</a></td> </tr> <tr> <td>Choosing the Right Swarm for Your Business Problem¶</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/" rel="nofollow">CLICK HERE</a></td> </tr> <tr> <td>AgentRearrange Docs</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/" rel="nofollow">CLICK HERE</a></td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Install 💻</h2><a id="user-content-install-" class="anchor" aria-label="Permalink: Install 💻" href="#install-"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Install the following packages with copy and paste</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ pip3 install -U swarms swarms-memory"><pre>$ pip3 install -U swarms swarms-memory</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">[Optional] Onboarding</h2><a id="user-content-optional-onboarding" class="anchor" aria-label="Permalink: [Optional] Onboarding" href="#optional-onboarding"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Now that you have downloaded swarms with <code>pip3 install -U swarms</code>, we get access to the <code>CLI</code>. Get Onboarded with CLI Now with:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="swarms onboarding"><pre>swarms onboarding</pre></div> <p dir="auto">You can also run this command for help:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="swarms help"><pre>swarms <span class="pl-c1">help</span></pre></div> <p dir="auto">For more documentation on the CLI <a href="https://docs.swarms.world/en/latest/swarms/cli/main/" rel="nofollow">CLICK HERE</a></p> <hr> <div class="markdown-heading" dir="auto"><h1 tabindex="-1" class="heading-element" dir="auto">Usage Examples 🤖</h1><a id="user-content-usage-examples-" class="anchor" aria-label="Permalink: Usage Examples 🤖" href="#usage-examples-"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Here are some example scripts to get you started. For more comprehensive documentation, visit our <a href="https://docs.swarms.world/en/latest/" rel="nofollow">docs</a>.</p> <markdown-accessiblity-table><table> <thead> <tr> <th>Example Name</th> <th>Description</th> <th>Type of Examples</th> <th>Link</th> </tr> </thead> <tbody> <tr> <td>Swarms Examples</td> <td>A collection of simple examples to demonstrate Swarms capabilities.</td> <td>Basic Usage</td> <td><a href="https://github.com/The-Swarm-Corporation/swarms-examples?tab=readme-ov-file">https://github.com/The-Swarm-Corporation/swarms-examples?tab=readme-ov-file</a></td> </tr> <tr> <td>Cookbook</td> <td>A comprehensive guide with recipes for various use cases and scenarios.</td> <td>Advanced Usage</td> <td><a href="https://github.com/The-Swarm-Corporation/Cookbook">https://github.com/The-Swarm-Corporation/Cookbook</a></td> </tr> </tbody> </table></markdown-accessiblity-table> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>Agent</code> Class</h2><a id="user-content-agent-class" class="anchor" aria-label="Permalink: Agent Class" href="#agent-class"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>Agent</code> class is a fundamental component of the Swarms framework, designed to execute tasks autonomously. It fuses llms, tools and long-term memory capabilities to create a full stack agent. The <code>Agent</code> class is highly customizable, allowing for fine-grained control over its behavior and interactions.</p> <section class="js-render-needs-enrichment render-needs-enrichment position-relative" data-identity="a0f46d5a-7002-4128-be87-a29463a8ed6d" data-host="https://viewscreen.githubusercontent.com" data-src="https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com" data-type="mermaid" aria-label="mermaid rendered output container"> <div class="js-render-enrichment-target" data-json="{&quot;data&quot;:&quot;graph TD\n A[Agent] --&amp;gt; B[Initialize]\n B --&amp;gt; C[Process Task]\n C --&amp;gt; D[Execute Tools]\n D --&amp;gt; E[Generate Response]\n E --&amp;gt; F[Return Output]\n C --&amp;gt; G[Long-term Memory]\n G --&amp;gt; C\n&quot;}" data-plain="graph TD A[Agent] --&gt; B[Initialize] B --&gt; C[Process Task] C --&gt; D[Execute Tools] D --&gt; E[Generate Response] E --&gt; F[Return Output] C --&gt; G[Long-term Memory] G --&gt; C " dir="auto"> <div class="render-plaintext-hidden" dir="auto"> <pre lang="mermaid" aria-label="Raw mermaid code">graph TD A[Agent] --&gt; B[Initialize] B --&gt; C[Process Task] C --&gt; D[Execute Tools] D --&gt; E[Generate Response] E --&gt; F[Return Output] C --&gt; G[Long-term Memory] G --&gt; C </pre> </div> </div> <span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full" style="min-height:100px" role="presentation"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="octospinner mx-auto anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none"></circle> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path> </svg> <span class="sr-only">Loading</span> </span> </span> </section> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto"><code>run</code> Method</h3><a id="user-content-run-method" class="anchor" aria-label="Permalink: run Method" href="#run-method"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method is the primary entry point for executing tasks with an <code>Agent</code> instance. It accepts a task string as the main input task and processes it according to the agent's configuration. And, it can also accept an <code>img</code> parameter such as <code>img="image_filepath.png</code> to process images if you have a VLM attached such as <code>GPT4VisionAPI</code></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Simple Example</h2><a id="user-content-simple-example" class="anchor" aria-label="Permalink: Simple Example" href="#simple-example"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from swarms import Agent agent = Agent( agent_name=&quot;Stock-Analysis-Agent&quot;, model_name=&quot;gpt-4o-mini&quot;, max_loops=&quot;auto&quot;, interactive=True, streaming_on=True, ) agent.run(&quot;What is the current market trend for tech stocks?&quot;) "><pre><span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Stock-Analysis-Agent"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o-mini"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>, <span class="pl-s1">interactive</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, ) <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>(<span class="pl-s">"What is the current market trend for tech stocks?"</span>)</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Settings and Customization</h3><a id="user-content-settings-and-customization" class="anchor" aria-label="Permalink: Settings and Customization" href="#settings-and-customization"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>Agent</code> class offers a range of settings to tailor its behavior to specific needs. Some key settings include:</p> <markdown-accessiblity-table><table> <thead> <tr> <th>Setting</th> <th>Description</th> <th>Default Value</th> </tr> </thead> <tbody> <tr> <td><code>agent_name</code></td> <td>The name of the agent.</td> <td>"DefaultAgent"</td> </tr> <tr> <td><code>system_prompt</code></td> <td>The system prompt to use for the agent.</td> <td>"Default system prompt."</td> </tr> <tr> <td><code>llm</code></td> <td>The language model to use for processing tasks.</td> <td><code>OpenAIChat</code> instance</td> </tr> <tr> <td><code>max_loops</code></td> <td>The maximum number of loops to execute for a task.</td> <td>1</td> </tr> <tr> <td><code>autosave</code></td> <td>Enables or disables autosaving of the agent's state.</td> <td>False</td> </tr> <tr> <td><code>dashboard</code></td> <td>Enables or disables the dashboard for the agent.</td> <td>False</td> </tr> <tr> <td><code>verbose</code></td> <td>Controls the verbosity of the agent's output.</td> <td>False</td> </tr> <tr> <td><code>dynamic_temperature_enabled</code></td> <td>Enables or disables dynamic temperature adjustment for the language model.</td> <td>False</td> </tr> <tr> <td><code>saved_state_path</code></td> <td>The path to save the agent's state.</td> <td>"agent_state.json"</td> </tr> <tr> <td><code>user_name</code></td> <td>The username associated with the agent.</td> <td>"default_user"</td> </tr> <tr> <td><code>retry_attempts</code></td> <td>The number of retry attempts for failed tasks.</td> <td>1</td> </tr> <tr> <td><code>context_length</code></td> <td>The maximum length of the context to consider for tasks.</td> <td>200000</td> </tr> <tr> <td><code>return_step_meta</code></td> <td>Controls whether to return step metadata in the output.</td> <td>False</td> </tr> <tr> <td><code>output_type</code></td> <td>The type of output to return (e.g., "json", "string").</td> <td>"string"</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from swarms import Agent from swarms.prompts.finance_agent_sys_prompt import ( FINANCIAL_AGENT_SYS_PROMPT, ) # Initialize the agent agent = Agent( agent_name=&quot;Financial-Analysis-Agent&quot;, system_prompt=FINANCIAL_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o-mini&quot;, max_loops=1, autosave=True, dashboard=False, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;finance_agent.json&quot;, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, return_step_meta=False, output_type=&quot;string&quot;, streaming_on=False, ) agent.run( &quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria&quot; ) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">prompts</span>.<span class="pl-s1">finance_agent_sys_prompt</span> <span class="pl-k">import</span> ( <span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, ) <span class="pl-c"># Initialize the agent</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial-Analysis-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o-mini"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"finance_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>( <span class="pl-s">"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria"</span> )</pre></div> <hr> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Integrating RAG with Swarms for Enhanced Long-Term Memory</h3><a id="user-content-integrating-rag-with-swarms-for-enhanced-long-term-memory" class="anchor" aria-label="Permalink: Integrating RAG with Swarms for Enhanced Long-Term Memory" href="#integrating-rag-with-swarms-for-enhanced-long-term-memory"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"><code>Agent</code> equipped with quasi-infinite long term memory using RAG (Relational Agent Graph) for advanced document understanding, analysis, and retrieval capabilities.</p> <p dir="auto"><strong>Mermaid Diagram for RAG Integration</strong></p> <section class="js-render-needs-enrichment render-needs-enrichment position-relative" data-identity="5a582f07-1b4b-4f00-90c4-e4857a725218" data-host="https://viewscreen.githubusercontent.com" data-src="https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com" data-type="mermaid" aria-label="mermaid rendered output container"> <div class="js-render-enrichment-target" data-json="{&quot;data&quot;:&quot;graph TD\n A[Initialize Agent with RAG] --&amp;gt; B[Receive Task]\n B --&amp;gt; C[Query Long-Term Memory]\n C --&amp;gt; D[Process Task with Context]\n D --&amp;gt; E[Generate Response]\n E --&amp;gt; F[Update Long-Term Memory]\n F --&amp;gt; G[Return Output]\n&quot;}" data-plain="graph TD A[Initialize Agent with RAG] --&gt; B[Receive Task] B --&gt; C[Query Long-Term Memory] C --&gt; D[Process Task with Context] D --&gt; E[Generate Response] E --&gt; F[Update Long-Term Memory] F --&gt; G[Return Output] " dir="auto"> <div class="render-plaintext-hidden" dir="auto"> <pre lang="mermaid" aria-label="Raw mermaid code">graph TD A[Initialize Agent with RAG] --&gt; B[Receive Task] B --&gt; C[Query Long-Term Memory] C --&gt; D[Process Task with Context] D --&gt; E[Generate Response] E --&gt; F[Update Long-Term Memory] F --&gt; G[Return Output] </pre> </div> </div> <span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full" style="min-height:100px" role="presentation"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="octospinner mx-auto anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none"></circle> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path> </svg> <span class="sr-only">Loading</span> </span> </span> </section> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from swarms import Agent from swarms.prompts.finance_agent_sys_prompt import ( FINANCIAL_AGENT_SYS_PROMPT, ) import os from swarms_memory import ChromaDB # Initialize the ChromaDB client for long-term memory management chromadb = ChromaDB( metric=&quot;cosine&quot;, # Metric for similarity measurement output_dir=&quot;finance_agent_rag&quot;, # Directory for storing RAG data # docs_folder=&quot;artifacts&quot;, # Uncomment and specify the folder containing your documents ) # Initialize the agent with RAG capabilities agent = Agent( agent_name=&quot;Financial-Analysis-Agent&quot;, system_prompt=FINANCIAL_AGENT_SYS_PROMPT, agent_description=&quot;Agent creates a comprehensive financial analysis&quot;, model_name=&quot;gpt-4o-mini&quot;, max_loops=&quot;auto&quot;, # Auto-adjusts loops based on task complexity autosave=True, # Automatically saves agent state dashboard=False, # Disables dashboard for this example verbose=True, # Enables verbose mode for detailed output streaming_on=True, # Enables streaming for real-time processing dynamic_temperature_enabled=True, # Dynamically adjusts temperature for optimal performance saved_state_path=&quot;finance_agent.json&quot;, # Path to save agent state user_name=&quot;swarms_corp&quot;, # User name for the agent retry_attempts=3, # Number of retry attempts for failed tasks context_length=200000, # Maximum length of the context to consider long_term_memory=chromadb, # Integrates ChromaDB for long-term memory management return_step_meta=False, output_type=&quot;string&quot;, ) # Run the agent with a sample task agent.run( &quot;What are the components of a startup's stock incentive equity plan&quot; )"><pre><span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">prompts</span>.<span class="pl-s1">finance_agent_sys_prompt</span> <span class="pl-k">import</span> ( <span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, ) <span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">swarms_memory</span> <span class="pl-k">import</span> <span class="pl-v">ChromaDB</span> <span class="pl-c"># Initialize the ChromaDB client for long-term memory management</span> <span class="pl-s1">chromadb</span> <span class="pl-c1">=</span> <span class="pl-en">ChromaDB</span>( <span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">"cosine"</span>, <span class="pl-c"># Metric for similarity measurement</span> <span class="pl-s1">output_dir</span><span class="pl-c1">=</span><span class="pl-s">"finance_agent_rag"</span>, <span class="pl-c"># Directory for storing RAG data</span> <span class="pl-c"># docs_folder="artifacts", # Uncomment and specify the folder containing your documents</span> ) <span class="pl-c"># Initialize the agent with RAG capabilities</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial-Analysis-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, <span class="pl-s1">agent_description</span><span class="pl-c1">=</span><span class="pl-s">"Agent creates a comprehensive financial analysis"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o-mini"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>, <span class="pl-c"># Auto-adjusts loops based on task complexity</span> <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c"># Automatically saves agent state</span> <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-c"># Disables dashboard for this example</span> <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c"># Enables verbose mode for detailed output</span> <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c"># Enables streaming for real-time processing</span> <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c"># Dynamically adjusts temperature for optimal performance</span> <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"finance_agent.json"</span>, <span class="pl-c"># Path to save agent state</span> <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-c"># User name for the agent</span> <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-c"># Number of retry attempts for failed tasks</span> <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-c"># Maximum length of the context to consider</span> <span class="pl-s1">long_term_memory</span><span class="pl-c1">=</span><span class="pl-s1">chromadb</span>, <span class="pl-c"># Integrates ChromaDB for long-term memory management</span> <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-c"># Run the agent with a sample task</span> <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>( <span class="pl-s">"What are the components of a startup's stock incentive equity plan"</span> )</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Structured Outputs</h2><a id="user-content-structured-outputs" class="anchor" aria-label="Permalink: Structured Outputs" href="#structured-outputs"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ol dir="auto"> <li>Create a tool schema</li> <li>Create a function schema</li> <li>Create a tool list dictionary</li> <li>Initialize the agent</li> <li>Run the agent</li> <li>Print the output</li> <li>Convert the output to a dictionary</li> </ol> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" from dotenv import load_dotenv from swarms import Agent from swarms.prompts.finance_agent_sys_prompt import ( FINANCIAL_AGENT_SYS_PROMPT, ) from swarms.utils.str_to_dict import str_to_dict load_dotenv() tools = [ { &quot;type&quot;: &quot;function&quot;, &quot;function&quot;: { &quot;name&quot;: &quot;get_stock_price&quot;, &quot;description&quot;: &quot;Retrieve the current stock price and related information for a specified company.&quot;, &quot;parameters&quot;: { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;ticker&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;The stock ticker symbol of the company, e.g. AAPL for Apple Inc.&quot;, }, &quot;include_history&quot;: { &quot;type&quot;: &quot;boolean&quot;, &quot;description&quot;: &quot;Indicates whether to include historical price data along with the current price.&quot;, }, &quot;time&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;format&quot;: &quot;date-time&quot;, &quot;description&quot;: &quot;Optional parameter to specify the time for which the stock data is requested, in ISO 8601 format.&quot;, }, }, &quot;required&quot;: [ &quot;ticker&quot;, &quot;include_history&quot;, &quot;time&quot;, ], }, }, } ] # Initialize the agent agent = Agent( agent_name=&quot;Financial-Analysis-Agent&quot;, agent_description=&quot;Personal finance advisor agent&quot;, system_prompt=FINANCIAL_AGENT_SYS_PROMPT, max_loops=1, tools_list_dictionary=tools, ) out = agent.run( &quot;What is the current stock price for Apple Inc. (AAPL)? Include historical price data.&quot;, ) print(out) print(type(out)) print(str_to_dict(out)) print(type(str_to_dict(out)))"><pre><span class="pl-k">from</span> <span class="pl-s1">dotenv</span> <span class="pl-k">import</span> <span class="pl-s1">load_dotenv</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">prompts</span>.<span class="pl-s1">finance_agent_sys_prompt</span> <span class="pl-k">import</span> ( <span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, ) <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">str_to_dict</span> <span class="pl-k">import</span> <span class="pl-s1">str_to_dict</span> <span class="pl-en">load_dotenv</span>() <span class="pl-s1">tools</span> <span class="pl-c1">=</span> [ { <span class="pl-s">"type"</span>: <span class="pl-s">"function"</span>, <span class="pl-s">"function"</span>: { <span class="pl-s">"name"</span>: <span class="pl-s">"get_stock_price"</span>, <span class="pl-s">"description"</span>: <span class="pl-s">"Retrieve the current stock price and related information for a specified company."</span>, <span class="pl-s">"parameters"</span>: { <span class="pl-s">"type"</span>: <span class="pl-s">"object"</span>, <span class="pl-s">"properties"</span>: { <span class="pl-s">"ticker"</span>: { <span class="pl-s">"type"</span>: <span class="pl-s">"string"</span>, <span class="pl-s">"description"</span>: <span class="pl-s">"The stock ticker symbol of the company, e.g. AAPL for Apple Inc."</span>, }, <span class="pl-s">"include_history"</span>: { <span class="pl-s">"type"</span>: <span class="pl-s">"boolean"</span>, <span class="pl-s">"description"</span>: <span class="pl-s">"Indicates whether to include historical price data along with the current price."</span>, }, <span class="pl-s">"time"</span>: { <span class="pl-s">"type"</span>: <span class="pl-s">"string"</span>, <span class="pl-s">"format"</span>: <span class="pl-s">"date-time"</span>, <span class="pl-s">"description"</span>: <span class="pl-s">"Optional parameter to specify the time for which the stock data is requested, in ISO 8601 format."</span>, }, }, <span class="pl-s">"required"</span>: [ <span class="pl-s">"ticker"</span>, <span class="pl-s">"include_history"</span>, <span class="pl-s">"time"</span>, ], }, }, } ] <span class="pl-c"># Initialize the agent</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial-Analysis-Agent"</span>, <span class="pl-s1">agent_description</span><span class="pl-c1">=</span><span class="pl-s">"Personal finance advisor agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">FINANCIAL_AGENT_SYS_PROMPT</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">tools_list_dictionary</span><span class="pl-c1">=</span><span class="pl-s1">tools</span>, ) <span class="pl-s1">out</span> <span class="pl-c1">=</span> <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>( <span class="pl-s">"What is the current stock price for Apple Inc. (AAPL)? Include historical price data."</span>, ) <span class="pl-en">print</span>(<span class="pl-s1">out</span>) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">out</span>)) <span class="pl-en">print</span>(<span class="pl-en">str_to_dict</span>(<span class="pl-s1">out</span>)) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-en">str_to_dict</span>(<span class="pl-s1">out</span>)))</pre></div> <hr> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Misc Agent Settings</h3><a id="user-content-misc-agent-settings" class="anchor" aria-label="Permalink: Misc Agent Settings" href="#misc-agent-settings"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">We provide vast array of features to save agent states using json, yaml, toml, upload pdfs, batched jobs, and much more!</p> <p dir="auto"><strong>Method Table</strong></p> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>to_dict()</code></td> <td>Converts the agent object to a dictionary.</td> </tr> <tr> <td><code>to_toml()</code></td> <td>Converts the agent object to a TOML string.</td> </tr> <tr> <td><code>model_dump_json()</code></td> <td>Dumps the model to a JSON file.</td> </tr> <tr> <td><code>model_dump_yaml()</code></td> <td>Dumps the model to a YAML file.</td> </tr> <tr> <td><code>ingest_docs()</code></td> <td>Ingests documents into the agent's knowledge base.</td> </tr> <tr> <td><code>receive_message()</code></td> <td>Receives a message from a user and processes it.</td> </tr> <tr> <td><code>send_agent_message()</code></td> <td>Sends a message from the agent to a user.</td> </tr> <tr> <td><code>filtered_run()</code></td> <td>Runs the agent with a filtered system prompt.</td> </tr> <tr> <td><code>bulk_run()</code></td> <td>Runs the agent with multiple system prompts.</td> </tr> <tr> <td><code>add_memory()</code></td> <td>Adds a memory to the agent.</td> </tr> <tr> <td><code>check_available_tokens()</code></td> <td>Checks the number of available tokens for the agent.</td> </tr> <tr> <td><code>tokens_checks()</code></td> <td>Performs token checks for the agent.</td> </tr> <tr> <td><code>print_dashboard()</code></td> <td>Prints the dashboard of the agent.</td> </tr> <tr> <td><code>get_docs_from_doc_folders()</code></td> <td>Fetches all the documents from the doc folders.</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# # Convert the agent object to a dictionary print(agent.to_dict()) print(agent.to_toml()) print(agent.model_dump_json()) print(agent.model_dump_yaml()) # Ingest documents into the agent's knowledge base (&quot;your_pdf_path.pdf&quot;) # Receive a message from a user and process it agent.receive_message(name=&quot;agent_name&quot;, message=&quot;message&quot;) # Send a message from the agent to a user agent.send_agent_message(agent_name=&quot;agent_name&quot;, message=&quot;message&quot;) # Ingest multiple documents into the agent's knowledge base agent.ingest_docs(&quot;your_pdf_path.pdf&quot;, &quot;your_csv_path.csv&quot;) # Run the agent with a filtered system prompt agent.filtered_run( &quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?&quot; ) # Run the agent with multiple system prompts agent.bulk_run( [ &quot;How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?&quot;, &quot;Another system prompt&quot;, ] ) # Add a memory to the agent agent.add_memory(&quot;Add a memory to the agent&quot;) # Check the number of available tokens for the agent agent.check_available_tokens() # Perform token checks for the agent agent.tokens_checks() # Print the dashboard of the agent agent.print_dashboard() # Fetch all the documents from the doc folders agent.get_docs_from_doc_folders() # Activate agent ops # Dump the model to a JSON file agent.model_dump_json() print(agent.to_toml()) "><pre><span class="pl-c"># # Convert the agent object to a dictionary</span> <span class="pl-en">print</span>(<span class="pl-s1">agent</span>.<span class="pl-c1">to_dict</span>()) <span class="pl-en">print</span>(<span class="pl-s1">agent</span>.<span class="pl-c1">to_toml</span>()) <span class="pl-en">print</span>(<span class="pl-s1">agent</span>.<span class="pl-c1">model_dump_json</span>()) <span class="pl-en">print</span>(<span class="pl-s1">agent</span>.<span class="pl-c1">model_dump_yaml</span>()) <span class="pl-c"># Ingest documents into the agent's knowledge base</span> (<span class="pl-s">"your_pdf_path.pdf"</span>) <span class="pl-c"># Receive a message from a user and process it</span> <span class="pl-s1">agent</span>.<span class="pl-c1">receive_message</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"agent_name"</span>, <span class="pl-s1">message</span><span class="pl-c1">=</span><span class="pl-s">"message"</span>) <span class="pl-c"># Send a message from the agent to a user</span> <span class="pl-s1">agent</span>.<span class="pl-c1">send_agent_message</span>(<span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"agent_name"</span>, <span class="pl-s1">message</span><span class="pl-c1">=</span><span class="pl-s">"message"</span>) <span class="pl-c"># Ingest multiple documents into the agent's knowledge base</span> <span class="pl-s1">agent</span>.<span class="pl-c1">ingest_docs</span>(<span class="pl-s">"your_pdf_path.pdf"</span>, <span class="pl-s">"your_csv_path.csv"</span>) <span class="pl-c"># Run the agent with a filtered system prompt</span> <span class="pl-s1">agent</span>.<span class="pl-c1">filtered_run</span>( <span class="pl-s">"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?"</span> ) <span class="pl-c"># Run the agent with multiple system prompts</span> <span class="pl-s1">agent</span>.<span class="pl-c1">bulk_run</span>( [ <span class="pl-s">"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria?"</span>, <span class="pl-s">"Another system prompt"</span>, ] ) <span class="pl-c"># Add a memory to the agent</span> <span class="pl-s1">agent</span>.<span class="pl-c1">add_memory</span>(<span class="pl-s">"Add a memory to the agent"</span>) <span class="pl-c"># Check the number of available tokens for the agent</span> <span class="pl-s1">agent</span>.<span class="pl-c1">check_available_tokens</span>() <span class="pl-c"># Perform token checks for the agent</span> <span class="pl-s1">agent</span>.<span class="pl-c1">tokens_checks</span>() <span class="pl-c"># Print the dashboard of the agent</span> <span class="pl-s1">agent</span>.<span class="pl-c1">print_dashboard</span>() <span class="pl-c"># Fetch all the documents from the doc folders</span> <span class="pl-s1">agent</span>.<span class="pl-c1">get_docs_from_doc_folders</span>() <span class="pl-c"># Activate agent ops</span> <span class="pl-c"># Dump the model to a JSON file</span> <span class="pl-s1">agent</span>.<span class="pl-c1">model_dump_json</span>() <span class="pl-en">print</span>(<span class="pl-s1">agent</span>.<span class="pl-c1">to_toml</span>())</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto"><code>Agent</code>with Pydantic BaseModel as Output Type</h3><a id="user-content-agentwith-pydantic-basemodel-as-output-type" class="anchor" aria-label="Permalink: Agentwith Pydantic BaseModel as Output Type" href="#agentwith-pydantic-basemodel-as-output-type"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The following is an example of an agent that intakes a pydantic basemodel and outputs it at the same time:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from pydantic import BaseModel, Field from swarms import Agent # Initialize the schema for the person's information class Schema(BaseModel): name: str = Field(..., title=&quot;Name of the person&quot;) agent: int = Field(..., title=&quot;Age of the person&quot;) is_student: bool = Field(..., title=&quot;Whether the person is a student&quot;) courses: list[str] = Field( ..., title=&quot;List of courses the person is taking&quot; ) # Convert the schema to a JSON string tool_schema = Schema( name=&quot;Tool Name&quot;, agent=1, is_student=True, courses=[&quot;Course1&quot;, &quot;Course2&quot;], ) # Define the task to generate a person's information task = &quot;Generate a person's information based on the following schema:&quot; # Initialize the agent agent = Agent( agent_name=&quot;Person Information Generator&quot;, system_prompt=( &quot;Generate a person's information based on the following schema:&quot; ), # Set the tool schema to the JSON string -- this is the key difference tool_schema=tool_schema, model_name=&quot;gpt-4o&quot;, max_loops=3, autosave=True, dashboard=False, streaming_on=True, verbose=True, interactive=True, # Set the output type to the tool schema which is a BaseModel output_type=tool_schema, # or dict, or str metadata_output_type=&quot;json&quot;, # List of schemas that the agent can handle list_base_models=[tool_schema], function_calling_format_type=&quot;OpenAI&quot;, function_calling_type=&quot;json&quot;, # or soon yaml ) # Run the agent to generate the person's information generated_data = agent.run(task) # Print the generated data print(f&quot;Generated data: {generated_data}&quot;) "><pre><span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>, <span class="pl-v">Field</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-c"># Initialize the schema for the person's information</span> <span class="pl-k">class</span> <span class="pl-v">Schema</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">name</span>: <span class="pl-smi">str</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>(..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Name of the person"</span>) <span class="pl-s1">agent</span>: <span class="pl-smi">int</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>(..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Age of the person"</span>) <span class="pl-s1">is_student</span>: <span class="pl-smi">bool</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>(..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Whether the person is a student"</span>) <span class="pl-s1">courses</span>: <span class="pl-s1">list</span>[<span class="pl-smi">str</span>] <span class="pl-c1">=</span> <span class="pl-en">Field</span>( ..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"List of courses the person is taking"</span> ) <span class="pl-c"># Convert the schema to a JSON string</span> <span class="pl-s1">tool_schema</span> <span class="pl-c1">=</span> <span class="pl-en">Schema</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Tool Name"</span>, <span class="pl-s1">agent</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">is_student</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">courses</span><span class="pl-c1">=</span>[<span class="pl-s">"Course1"</span>, <span class="pl-s">"Course2"</span>], ) <span class="pl-c"># Define the task to generate a person's information</span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-s">"Generate a person's information based on the following schema:"</span> <span class="pl-c"># Initialize the agent</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Person Information Generator"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span>( <span class="pl-s">"Generate a person's information based on the following schema:"</span> ), <span class="pl-c"># Set the tool schema to the JSON string -- this is the key difference</span> <span class="pl-s1">tool_schema</span><span class="pl-c1">=</span><span class="pl-s1">tool_schema</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">interactive</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c"># Set the output type to the tool schema which is a BaseModel</span> <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s1">tool_schema</span>, <span class="pl-c"># or dict, or str</span> <span class="pl-s1">metadata_output_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-c"># List of schemas that the agent can handle</span> <span class="pl-s1">list_base_models</span><span class="pl-c1">=</span>[<span class="pl-s1">tool_schema</span>], <span class="pl-s1">function_calling_format_type</span><span class="pl-c1">=</span><span class="pl-s">"OpenAI"</span>, <span class="pl-s1">function_calling_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-c"># or soon yaml</span> ) <span class="pl-c"># Run the agent to generate the person's information</span> <span class="pl-s1">generated_data</span> <span class="pl-c1">=</span> <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>(<span class="pl-s1">task</span>) <span class="pl-c"># Print the generated data</span> <span class="pl-en">print</span>(<span class="pl-s">f"Generated data: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">generated_data</span><span class="pl-kos">}</span></span>"</span>) </pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Multi Modal Autonomous Agent</h3><a id="user-content-multi-modal-autonomous-agent" class="anchor" aria-label="Permalink: Multi Modal Autonomous Agent" href="#multi-modal-autonomous-agent"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Run the agent with multiple modalities useful for various real-world tasks in manufacturing, logistics, and health.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from dotenv import load_dotenv from swarms import Agent from swarm_models import GPT4VisionAPI # Load the environment variables load_dotenv() # Initialize the language model llm = GPT4VisionAPI( openai_api_key=os.environ.get(&quot;OPENAI_API_KEY&quot;), max_tokens=500, ) # Initialize the task task = ( &quot;Analyze this image of an assembly line and identify any issues such as&quot; &quot; misaligned parts, defects, or deviations from the standard assembly&quot; &quot; process. If there is anything unsafe in the image, explain why it is&quot; &quot; unsafe and how it could be improved.&quot; ) img = &quot;assembly_line.jpg&quot; ## Initialize the workflow agent = Agent( agent_name = &quot;Multi-ModalAgent&quot;, llm=llm, max_loops=&quot;auto&quot;, autosave=True, dashboard=True, multi_modal=True ) # Run the workflow on a task agent.run(task, img)"><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">dotenv</span> <span class="pl-k">import</span> <span class="pl-s1">load_dotenv</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">GPT4VisionAPI</span> <span class="pl-c"># Load the environment variables</span> <span class="pl-en">load_dotenv</span>() <span class="pl-c"># Initialize the language model</span> <span class="pl-s1">llm</span> <span class="pl-c1">=</span> <span class="pl-en">GPT4VisionAPI</span>( <span class="pl-s1">openai_api_key</span><span class="pl-c1">=</span><span class="pl-s1">os</span>.<span class="pl-c1">environ</span>.<span class="pl-c1">get</span>(<span class="pl-s">"OPENAI_API_KEY"</span>), <span class="pl-s1">max_tokens</span><span class="pl-c1">=</span><span class="pl-c1">500</span>, ) <span class="pl-c"># Initialize the task</span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> ( <span class="pl-s">"Analyze this image of an assembly line and identify any issues such as"</span> <span class="pl-s">" misaligned parts, defects, or deviations from the standard assembly"</span> <span class="pl-s">" process. If there is anything unsafe in the image, explain why it is"</span> <span class="pl-s">" unsafe and how it could be improved."</span> ) <span class="pl-s1">img</span> <span class="pl-c1">=</span> <span class="pl-s">"assembly_line.jpg"</span> <span class="pl-c">## Initialize the workflow</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span> <span class="pl-c1">=</span> <span class="pl-s">"Multi-ModalAgent"</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">llm</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">multi_modal</span><span class="pl-c1">=</span><span class="pl-c1">True</span> ) <span class="pl-c"># Run the workflow on a task</span> <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>(<span class="pl-s1">task</span>, <span class="pl-s1">img</span>)</pre></div> <hr> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Local Agent <code>ToolAgent</code></h3><a id="user-content-local-agent-toolagent" class="anchor" aria-label="Permalink: Local Agent ToolAgent" href="#local-agent-toolagent"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">ToolAgent is a fully local agent that can use tools through JSON function calling. It intakes any open source model from huggingface and is extremely modular and plug in and play. We need help adding general support to all models soon.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from pydantic import BaseModel, Field from transformers import AutoModelForCausalLM, AutoTokenizer from swarms import ToolAgent from swarms.tools.json_utils import base_model_to_json # Load the pre-trained model and tokenizer model = AutoModelForCausalLM.from_pretrained( &quot;databricks/dolly-v2-12b&quot;, load_in_4bit=True, device_map=&quot;auto&quot;, ) tokenizer = AutoTokenizer.from_pretrained(&quot;databricks/dolly-v2-12b&quot;) # Initialize the schema for the person's information class Schema(BaseModel): name: str = Field(..., title=&quot;Name of the person&quot;) agent: int = Field(..., title=&quot;Age of the person&quot;) is_student: bool = Field( ..., title=&quot;Whether the person is a student&quot; ) courses: list[str] = Field( ..., title=&quot;List of courses the person is taking&quot; ) # Convert the schema to a JSON string tool_schema = base_model_to_json(Schema) # Define the task to generate a person's information task = ( &quot;Generate a person's information based on the following schema:&quot; ) # Create an instance of the ToolAgent class agent = ToolAgent( name=&quot;dolly-function-agent&quot;, description=&quot;An agent to create a child's data&quot;, model=model, tokenizer=tokenizer, json_schema=tool_schema, ) # Run the agent to generate the person's information generated_data = agent.run(task) # Print the generated data print(f&quot;Generated data: {generated_data}&quot;) "><pre><span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>, <span class="pl-v">Field</span> <span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-v">AutoModelForCausalLM</span>, <span class="pl-v">AutoTokenizer</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">ToolAgent</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">tools</span>.<span class="pl-s1">json_utils</span> <span class="pl-k">import</span> <span class="pl-s1">base_model_to_json</span> <span class="pl-c"># Load the pre-trained model and tokenizer</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">AutoModelForCausalLM</span>.<span class="pl-c1">from_pretrained</span>( <span class="pl-s">"databricks/dolly-v2-12b"</span>, <span class="pl-s1">load_in_4bit</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">device_map</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>, ) <span class="pl-s1">tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">AutoTokenizer</span>.<span class="pl-c1">from_pretrained</span>(<span class="pl-s">"databricks/dolly-v2-12b"</span>) <span class="pl-c"># Initialize the schema for the person's information</span> <span class="pl-k">class</span> <span class="pl-v">Schema</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">name</span>: <span class="pl-smi">str</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>(..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Name of the person"</span>) <span class="pl-s1">agent</span>: <span class="pl-smi">int</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>(..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Age of the person"</span>) <span class="pl-s1">is_student</span>: <span class="pl-smi">bool</span> <span class="pl-c1">=</span> <span class="pl-en">Field</span>( ..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"Whether the person is a student"</span> ) <span class="pl-s1">courses</span>: <span class="pl-s1">list</span>[<span class="pl-smi">str</span>] <span class="pl-c1">=</span> <span class="pl-en">Field</span>( ..., <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"List of courses the person is taking"</span> ) <span class="pl-c"># Convert the schema to a JSON string</span> <span class="pl-s1">tool_schema</span> <span class="pl-c1">=</span> <span class="pl-en">base_model_to_json</span>(<span class="pl-v">Schema</span>) <span class="pl-c"># Define the task to generate a person's information</span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> ( <span class="pl-s">"Generate a person's information based on the following schema:"</span> ) <span class="pl-c"># Create an instance of the ToolAgent class</span> <span class="pl-s1">agent</span> <span class="pl-c1">=</span> <span class="pl-en">ToolAgent</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"dolly-function-agent"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"An agent to create a child's data"</span>, <span class="pl-s1">model</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">tokenizer</span><span class="pl-c1">=</span><span class="pl-s1">tokenizer</span>, <span class="pl-s1">json_schema</span><span class="pl-c1">=</span><span class="pl-s1">tool_schema</span>, ) <span class="pl-c"># Run the agent to generate the person's information</span> <span class="pl-s1">generated_data</span> <span class="pl-c1">=</span> <span class="pl-s1">agent</span>.<span class="pl-c1">run</span>(<span class="pl-s1">task</span>) <span class="pl-c"># Print the generated data</span> <span class="pl-en">print</span>(<span class="pl-s">f"Generated data: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">generated_data</span><span class="pl-kos">}</span></span>"</span>)</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Understanding Swarms</h2><a id="user-content-understanding-swarms" class="anchor" aria-label="Permalink: Understanding Swarms" href="#understanding-swarms"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">A swarm refers to a group of more than two agents working collaboratively to achieve a common goal. These agents can be software entities, such as llms that interact with each other to perform complex tasks. The concept of a swarm is inspired by natural systems like ant colonies or bird flocks, where simple individual behaviors lead to complex group dynamics and problem-solving capabilities.</p> <section class="js-render-needs-enrichment render-needs-enrichment position-relative" data-identity="a6dd182b-581e-43f6-b654-45590e737310" data-host="https://viewscreen.githubusercontent.com" data-src="https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com" data-type="mermaid" aria-label="mermaid rendered output container"> <div class="js-render-enrichment-target" data-json="{&quot;data&quot;:&quot;graph TD\n A[Swarm] --&amp;gt; B[Agent 1]\n A --&amp;gt; C[Agent 2]\n A --&amp;gt; D[Agent N]\n B --&amp;gt; E[Task Processing]\n C --&amp;gt; E\n D --&amp;gt; E\n E --&amp;gt; F[Result Aggregation]\n F --&amp;gt; G[Final Output]\n&quot;}" data-plain="graph TD A[Swarm] --&gt; B[Agent 1] A --&gt; C[Agent 2] A --&gt; D[Agent N] B --&gt; E[Task Processing] C --&gt; E D --&gt; E E --&gt; F[Result Aggregation] F --&gt; G[Final Output] " dir="auto"> <div class="render-plaintext-hidden" dir="auto"> <pre lang="mermaid" aria-label="Raw mermaid code">graph TD A[Swarm] --&gt; B[Agent 1] A --&gt; C[Agent 2] A --&gt; D[Agent N] B --&gt; E[Task Processing] C --&gt; E D --&gt; E E --&gt; F[Result Aggregation] F --&gt; G[Final Output] </pre> </div> </div> <span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full" style="min-height:100px" role="presentation"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="octospinner mx-auto anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none"></circle> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path> </svg> <span class="sr-only">Loading</span> </span> </span> </section> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">How Swarm Architectures Facilitate Communication</h3><a id="user-content-how-swarm-architectures-facilitate-communication" class="anchor" aria-label="Permalink: How Swarm Architectures Facilitate Communication" href="#how-swarm-architectures-facilitate-communication"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Swarm architectures are designed to establish and manage communication between agents within a swarm. These architectures define how agents interact, share information, and coordinate their actions to achieve the desired outcomes. Here are some key aspects of swarm architectures:</p> <ol dir="auto"> <li> <p dir="auto"><strong>Hierarchical Communication</strong>: In hierarchical swarms, communication flows from higher-level agents to lower-level agents. Higher-level agents act as coordinators, distributing tasks and aggregating results. This structure is efficient for tasks that require top-down control and decision-making.</p> </li> <li> <p dir="auto"><strong>Parallel Communication</strong>: In parallel swarms, agents operate independently and communicate with each other as needed. This architecture is suitable for tasks that can be processed concurrently without dependencies, allowing for faster execution and scalability.</p> </li> <li> <p dir="auto"><strong>Sequential Communication</strong>: Sequential swarms process tasks in a linear order, where each agent's output becomes the input for the next agent. This ensures that tasks with dependencies are handled in the correct sequence, maintaining the integrity of the workflow.</p> </li> </ol> <section class="js-render-needs-enrichment render-needs-enrichment position-relative" data-identity="c1183d7f-224b-43d5-bde4-4af11a6fb2be" data-host="https://viewscreen.githubusercontent.com" data-src="https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com" data-type="mermaid" aria-label="mermaid rendered output container"> <div class="js-render-enrichment-target" data-json="{&quot;data&quot;:&quot;graph LR\n A[Hierarchical] --&amp;gt; D[Task Distribution]\n B[Parallel] --&amp;gt; E[Concurrent Processing]\n C[Sequential] --&amp;gt; F[Linear Processing]\n D --&amp;gt; G[Results]\n E --&amp;gt; G\n F --&amp;gt; G\n&quot;}" data-plain="graph LR A[Hierarchical] --&gt; D[Task Distribution] B[Parallel] --&gt; E[Concurrent Processing] C[Sequential] --&gt; F[Linear Processing] D --&gt; G[Results] E --&gt; G F --&gt; G " dir="auto"> <div class="render-plaintext-hidden" dir="auto"> <pre lang="mermaid" aria-label="Raw mermaid code">graph LR A[Hierarchical] --&gt; D[Task Distribution] B[Parallel] --&gt; E[Concurrent Processing] C[Sequential] --&gt; F[Linear Processing] D --&gt; G[Results] E --&gt; G F --&gt; G </pre> </div> </div> <span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full" style="min-height:100px" role="presentation"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="octospinner mx-auto anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none"></circle> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path> </svg> <span class="sr-only">Loading</span> </span> </span> </section> <p dir="auto">Swarm architectures leverage these communication patterns to ensure that agents work together efficiently, adapting to the specific requirements of the task at hand. By defining clear communication protocols and interaction models, swarm architectures enable the seamless orchestration of multiple agents, leading to enhanced performance and problem-solving capabilities.</p> <markdown-accessiblity-table><table> <thead> <tr> <th><strong>Name</strong></th> <th><strong>Description</strong></th> <th><strong>Code Link</strong></th> <th><strong>Use Cases</strong></th> </tr> </thead> <tbody> <tr> <td>Hierarchical Swarms</td> <td>A system where agents are organized in a hierarchy, with higher-level agents coordinating lower-level agents to achieve complex tasks.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#hierarchical-swarm" rel="nofollow">Code Link</a></td> <td>Manufacturing process optimization, multi-level sales management, healthcare resource coordination</td> </tr> <tr> <td>Agent Rearrange</td> <td>A setup where agents rearrange themselves dynamically based on the task requirements and environmental conditions.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/" rel="nofollow">Code Link</a></td> <td>Adaptive manufacturing lines, dynamic sales territory realignment, flexible healthcare staffing</td> </tr> <tr> <td>Concurrent Workflows</td> <td>Agents perform different tasks simultaneously, coordinating to complete a larger goal.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#concurrent-workflows" rel="nofollow">Code Link</a></td> <td>Concurrent production lines, parallel sales operations, simultaneous patient care processes</td> </tr> <tr> <td>Sequential Coordination</td> <td>Agents perform tasks in a specific sequence, where the completion of one task triggers the start of the next.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/sequential_workflow/" rel="nofollow">Code Link</a></td> <td>Step-by-step assembly lines, sequential sales processes, stepwise patient treatment workflows</td> </tr> <tr> <td>Parallel Processing</td> <td>Agents work on different parts of a task simultaneously to speed up the overall process.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/concept/swarm_architectures/#parallel-processing" rel="nofollow">Code Link</a></td> <td>Parallel data processing in manufacturing, simultaneous sales analytics, concurrent medical tests</td> </tr> <tr> <td>Mixture of Agents</td> <td>A heterogeneous swarm where agents with different capabilities are combined to solve complex problems.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/moa/" rel="nofollow">Code Link</a></td> <td>Financial forecasting, complex problem-solving requiring diverse skills</td> </tr> <tr> <td>Graph Workflow</td> <td>Agents collaborate in a directed acyclic graph (DAG) format to manage dependencies and parallel tasks.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/graph_workflow/" rel="nofollow">Code Link</a></td> <td>AI-driven software development pipelines, complex project management</td> </tr> <tr> <td>Group Chat</td> <td>Agents engage in a chat-like interaction to reach decisions collaboratively.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/group_chat/" rel="nofollow">Code Link</a></td> <td>Real-time collaborative decision-making, contract negotiations</td> </tr> <tr> <td>Agent Registry</td> <td>A centralized registry where agents are stored, retrieved, and invoked dynamically.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/agent_registry/" rel="nofollow">Code Link</a></td> <td>Dynamic agent management, evolving recommendation engines</td> </tr> <tr> <td>Spreadsheet Swarm</td> <td>Manages tasks at scale, tracking agent outputs in a structured format like CSV files.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/spreadsheet_swarm/" rel="nofollow">Code Link</a></td> <td>Large-scale marketing analytics, financial audits</td> </tr> <tr> <td>Forest Swarm</td> <td>A swarm structure that organizes agents in a tree-like hierarchy for complex decision-making processes.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/forest_swarm/" rel="nofollow">Code Link</a></td> <td>Multi-stage workflows, hierarchical reinforcement learning</td> </tr> <tr> <td>Swarm Router</td> <td>Routes and chooses the swarm architecture based on the task requirements and available agents.</td> <td><a href="https://docs.swarms.world/en/latest/swarms/structs/swarm_router/" rel="nofollow">Code Link</a></td> <td>Dynamic task routing, adaptive swarm architecture selection, optimized agent allocation</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Swarms API</h2><a id="user-content-swarms-api" class="anchor" aria-label="Permalink: Swarms API" href="#swarms-api"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">We recently launched our enterprise-grade Swarms API. This API allows you to create, manage, and execute swarms from your own application.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Steps:</h4><a id="user-content-steps" class="anchor" aria-label="Permalink: Steps:" href="#steps"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ol dir="auto"> <li>Create a Swarms API key <a href="https://swarms.world" rel="nofollow">HERE</a></li> <li>Upload your key to the <code>.env</code> file like so: <code>SWARMS_API_KEY=&lt;your-api-key&gt;</code></li> <li>Use the following code to create and execute a swarm:</li> <li>Read our docs for more information for deeper customization <a href="https://docs.swarms.world/en/latest/swarms_cloud/swarms_api/" rel="nofollow">HERE</a></li> </ol> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import json from swarms.structs.swarms_api import ( SwarmsAPIClient, SwarmRequest, AgentInput, ) import os agents = [ AgentInput( agent_name=&quot;Medical Researcher&quot;, description=&quot;Conducts medical research and analysis&quot;, system_prompt=&quot;You are a medical researcher specializing in clinical studies.&quot;, max_loops=1, model_name=&quot;gpt-4o&quot;, role=&quot;worker&quot;, ), AgentInput( agent_name=&quot;Medical Diagnostician&quot;, description=&quot;Provides medical diagnoses based on symptoms and test results&quot;, system_prompt=&quot;You are a medical diagnostician with expertise in identifying diseases.&quot;, max_loops=1, model_name=&quot;gpt-4o&quot;, role=&quot;worker&quot;, ), AgentInput( agent_name=&quot;Pharmaceutical Expert&quot;, description=&quot;Advises on pharmaceutical treatments and drug interactions&quot;, system_prompt=&quot;You are a pharmaceutical expert knowledgeable about medications and their effects.&quot;, max_loops=1, model_name=&quot;gpt-4o&quot;, role=&quot;worker&quot;, ), ] swarm_request = SwarmRequest( name=&quot;Medical Swarm&quot;, description=&quot;A swarm for medical research and diagnostics&quot;, agents=agents, max_loops=1, swarm_type=&quot;ConcurrentWorkflow&quot;, output_type=&quot;str&quot;, return_history=True, task=&quot;What is the cause of the common cold?&quot;, ) client = SwarmsAPIClient( api_key=os.getenv(&quot;SWARMS_API_KEY&quot;), format_type=&quot;json&quot; ) response = client.run(swarm_request) print(json.dumps(response, indent=4)) "><pre><span class="pl-k">import</span> <span class="pl-s1">json</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">structs</span>.<span class="pl-s1">swarms_api</span> <span class="pl-k">import</span> ( <span class="pl-v">SwarmsAPIClient</span>, <span class="pl-v">SwarmRequest</span>, <span class="pl-v">AgentInput</span>, ) <span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [ <span class="pl-en">AgentInput</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Medical Researcher"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Conducts medical research and analysis"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a medical researcher specializing in clinical studies."</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">role</span><span class="pl-c1">=</span><span class="pl-s">"worker"</span>, ), <span class="pl-en">AgentInput</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Medical Diagnostician"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Provides medical diagnoses based on symptoms and test results"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a medical diagnostician with expertise in identifying diseases."</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">role</span><span class="pl-c1">=</span><span class="pl-s">"worker"</span>, ), <span class="pl-en">AgentInput</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Pharmaceutical Expert"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Advises on pharmaceutical treatments and drug interactions"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a pharmaceutical expert knowledgeable about medications and their effects."</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">role</span><span class="pl-c1">=</span><span class="pl-s">"worker"</span>, ), ] <span class="pl-s1">swarm_request</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRequest</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Medical Swarm"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"A swarm for medical research and diagnostics"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-s">"ConcurrentWorkflow"</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"str"</span>, <span class="pl-s1">return_history</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">task</span><span class="pl-c1">=</span><span class="pl-s">"What is the cause of the common cold?"</span>, ) <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmsAPIClient</span>( <span class="pl-s1">api_key</span><span class="pl-c1">=</span><span class="pl-s1">os</span>.<span class="pl-c1">getenv</span>(<span class="pl-s">"SWARMS_API_KEY"</span>), <span class="pl-s1">format_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span> ) <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-s1">client</span>.<span class="pl-c1">run</span>(<span class="pl-s1">swarm_request</span>) <span class="pl-en">print</span>(<span class="pl-s1">json</span>.<span class="pl-c1">dumps</span>(<span class="pl-s1">response</span>, <span class="pl-s1">indent</span><span class="pl-c1">=</span><span class="pl-c1">4</span>)) </pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto"><code>SequentialWorkflow</code></h3><a id="user-content-sequentialworkflow" class="anchor" aria-label="Permalink: SequentialWorkflow" href="#sequentialworkflow"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Sequential Workflow enables you to sequentially execute tasks with <code>Agent</code> and then pass the output into the next agent and onwards until you have specified your max loops.</p> <section class="js-render-needs-enrichment render-needs-enrichment position-relative" data-identity="b2ae9bc2-43dd-4062-9188-0936d9bf09b4" data-host="https://viewscreen.githubusercontent.com" data-src="https://viewscreen.githubusercontent.com/markdown/mermaid?docs_host=https%3A%2F%2Fdocs.github.com" data-type="mermaid" aria-label="mermaid rendered output container"> <div class="js-render-enrichment-target" data-json="{&quot;data&quot;:&quot;graph LR\n A[Agent 1] --&amp;gt; B[Agent 2]\n B --&amp;gt; C[Agent 3]\n C --&amp;gt; D[Agent 4]\n D --&amp;gt; E[Max Loops]\n E --&amp;gt; F[End]\n&quot;}" data-plain="graph LR A[Agent 1] --&gt; B[Agent 2] B --&gt; C[Agent 3] C --&gt; D[Agent 4] D --&gt; E[Max Loops] E --&gt; F[End] " dir="auto"> <div class="render-plaintext-hidden" dir="auto"> <pre lang="mermaid" aria-label="Raw mermaid code">graph LR A[Agent 1] --&gt; B[Agent 2] B --&gt; C[Agent 3] C --&gt; D[Agent 4] D --&gt; E[Max Loops] E --&gt; F[End] </pre> </div> </div> <span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full" style="min-height:100px" role="presentation"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="octospinner mx-auto anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none"></circle> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path> </svg> <span class="sr-only">Loading</span> </span> </span> </section> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods" class="anchor" aria-label="Permalink: Methods" href="#methods"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>__init__</code></td> <td>Initialize the SequentialWorkflow</td> <td><code>agents</code>: List of Agent objects<br><code>max_loops</code>: Maximum number of iterations<br><code>verbose</code>: Boolean for verbose output</td> <td>None</td> </tr> <tr> <td><code>run</code></td> <td>Execute the workflow</td> <td><code>input_data</code>: Initial input for the first agent</td> <td>Final output after all agents have processed</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs" class="anchor" aria-label="Permalink: Inputs" href="#inputs"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>agents</code></td> <td>List[Agent]</td> <td>List of Agent objects to be executed sequentially</td> </tr> <tr> <td><code>max_loops</code></td> <td>int</td> <td>Maximum number of times the entire sequence will be repeated</td> </tr> <tr> <td><code>verbose</code></td> <td>bool</td> <td>If True, print detailed information during execution</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output" class="anchor" aria-label="Permalink: Output" href="#output"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns the final output after all agents have processed the input sequentially.</p> <p dir="auto">In this example, each <code>Agent</code> represents a task that is executed sequentially. The output of each agent is passed to the next agent in the sequence until the maximum number of loops is reached. This workflow is particularly useful for tasks that require a series of steps to be executed in a specific order, such as data processing pipelines or complex calculations that rely on the output of previous steps.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from swarms import Agent, SequentialWorkflow from swarm_models import OpenAIChat # model = Anthropic(anthropic_api_key=os.getenv(&quot;ANTHROPIC_API_KEY&quot;)) company = &quot;Nvidia&quot; # Get the OpenAI API key from the environment variable api_key = os.getenv(&quot;GROQ_API_KEY&quot;) # Model model = OpenAIChat( openai_api_base=&quot;https://api.groq.com/openai/v1&quot;, openai_api_key=api_key, model_name=&quot;llama-3.1-70b-versatile&quot;, temperature=0.1, ) # Initialize the Managing Director agent managing_director = Agent( agent_name=&quot;Managing-Director&quot;, system_prompt=f&quot;&quot;&quot; As the Managing Director at Blackstone, your role is to oversee the entire investment analysis process for potential acquisitions. Your responsibilities include: 1. Setting the overall strategy and direction for the analysis 2. Coordinating the efforts of the various team members and ensuring a comprehensive evaluation 3. Reviewing the findings and recommendations from each team member 4. Making the final decision on whether to proceed with the acquisition For the current potential acquisition of {company}, direct the tasks for the team to thoroughly analyze all aspects of the company, including its financials, industry position, technology, market potential, and regulatory compliance. Provide guidance and feedback as needed to ensure a rigorous and unbiased assessment. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;managing-director.json&quot;, ) # Initialize the Vice President of Finance vp_finance = Agent( agent_name=&quot;VP-Finance&quot;, system_prompt=f&quot;&quot;&quot; As the Vice President of Finance at Blackstone, your role is to lead the financial analysis of potential acquisitions. For the current potential acquisition of {company}, your tasks include: 1. Conducting a thorough review of {company}' financial statements, including income statements, balance sheets, and cash flow statements 2. Analyzing key financial metrics such as revenue growth, profitability margins, liquidity ratios, and debt levels 3. Assessing the company's historical financial performance and projecting future performance based on assumptions and market conditions 4. Identifying any financial risks or red flags that could impact the acquisition decision 5. Providing a detailed report on your findings and recommendations to the Managing Director Be sure to consider factors such as the sustainability of {company}' business model, the strength of its customer base, and its ability to generate consistent cash flows. Your analysis should be data-driven, objective, and aligned with Blackstone's investment criteria. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;vp-finance.json&quot;, ) # Initialize the Industry Analyst industry_analyst = Agent( agent_name=&quot;Industry-Analyst&quot;, system_prompt=f&quot;&quot;&quot; As the Industry Analyst at Blackstone, your role is to provide in-depth research and analysis on the industries and markets relevant to potential acquisitions. For the current potential acquisition of {company}, your tasks include: 1. Conducting a comprehensive analysis of the industrial robotics and automation solutions industry, including market size, growth rates, key trends, and future prospects 2. Identifying the major players in the industry and assessing their market share, competitive strengths and weaknesses, and strategic positioning 3. Evaluating {company}' competitive position within the industry, including its market share, differentiation, and competitive advantages 4. Analyzing the key drivers and restraints for the industry, such as technological advancements, labor costs, regulatory changes, and economic conditions 5. Identifying potential risks and opportunities for {company} based on the industry analysis, such as disruptive technologies, emerging markets, or shifts in customer preferences Your analysis should provide a clear and objective assessment of the attractiveness and future potential of the industrial robotics industry, as well as {company}' positioning within it. Consider both short-term and long-term factors, and provide evidence-based insights to inform the investment decision. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;industry-analyst.json&quot;, ) # Initialize the Technology Expert tech_expert = Agent( agent_name=&quot;Tech-Expert&quot;, system_prompt=f&quot;&quot;&quot; As the Technology Expert at Blackstone, your role is to assess the technological capabilities, competitive advantages, and potential risks of companies being considered for acquisition. For the current potential acquisition of {company}, your tasks include: 1. Conducting a deep dive into {company}' proprietary technologies, including its robotics platforms, automation software, and AI capabilities 2. Assessing the uniqueness, scalability, and defensibility of {company}' technology stack and intellectual property 3. Comparing {company}' technologies to those of its competitors and identifying any key differentiators or technology gaps 4. Evaluating {company}' research and development capabilities, including its innovation pipeline, engineering talent, and R&amp;D investments 5. Identifying any potential technology risks or disruptive threats that could impact {company}' long-term competitiveness, such as emerging technologies or expiring patents Your analysis should provide a comprehensive assessment of {company}' technological strengths and weaknesses, as well as the sustainability of its competitive advantages. Consider both the current state of its technology and its future potential in light of industry trends and advancements. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;tech-expert.json&quot;, ) # Initialize the Market Researcher market_researcher = Agent( agent_name=&quot;Market-Researcher&quot;, system_prompt=f&quot;&quot;&quot; As the Market Researcher at Blackstone, your role is to analyze the target company's customer base, market share, and growth potential to assess the commercial viability and attractiveness of the potential acquisition. For the current potential acquisition of {company}, your tasks include: 1. Analyzing {company}' current customer base, including customer segmentation, concentration risk, and retention rates 2. Assessing {company}' market share within its target markets and identifying key factors driving its market position 3. Conducting a detailed market sizing and segmentation analysis for the industrial robotics and automation markets, including identifying high-growth segments and emerging opportunities 4. Evaluating the demand drivers and sales cycles for {company}' products and services, and identifying any potential risks or limitations to adoption 5. Developing financial projections and estimates for {company}' revenue growth potential based on the market analysis and assumptions around market share and penetration Your analysis should provide a data-driven assessment of the market opportunity for {company} and the feasibility of achieving our investment return targets. Consider both bottom-up and top-down market perspectives, and identify any key sensitivities or assumptions in your projections. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;market-researcher.json&quot;, ) # Initialize the Regulatory Specialist regulatory_specialist = Agent( agent_name=&quot;Regulatory-Specialist&quot;, system_prompt=f&quot;&quot;&quot; As the Regulatory Specialist at Blackstone, your role is to identify and assess any regulatory risks, compliance requirements, and potential legal liabilities associated with potential acquisitions. For the current potential acquisition of {company}, your tasks include: 1. Identifying all relevant regulatory bodies and laws that govern the operations of {company}, including industry-specific regulations, labor laws, and environmental regulations 2. Reviewing {company}' current compliance policies, procedures, and track record to identify any potential gaps or areas of non-compliance 3. Assessing the potential impact of any pending or proposed changes to relevant regulations that could affect {company}' business or create additional compliance burdens 4. Evaluating the potential legal liabilities and risks associated with {company}' products, services, and operations, including product liability, intellectual property, and customer contracts 5. Providing recommendations on any regulatory or legal due diligence steps that should be taken as part of the acquisition process, as well as any post-acquisition integration considerations Your analysis should provide a comprehensive assessment of the regulatory and legal landscape surrounding {company}, and identify any material risks or potential deal-breakers. Consider both the current state and future outlook, and provide practical recommendations to mitigate identified risks. &quot;&quot;&quot;, llm=model, max_loops=1, dashboard=False, streaming_on=True, verbose=True, stopping_token=&quot;&lt;DONE&gt;&quot;, state_save_file_type=&quot;json&quot;, saved_state_path=&quot;regulatory-specialist.json&quot;, ) # Create a list of agents agents = [ managing_director, vp_finance, industry_analyst, tech_expert, market_researcher, regulatory_specialist, ] swarm = SequentialWorkflow( name=&quot;blackstone-private-equity-advisors&quot;, agents=agents, ) print( swarm.run( &quot;Analyze nvidia if it's a good deal to invest in now 10B&quot; ) ) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">SequentialWorkflow</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">OpenAIChat</span> <span class="pl-c"># model = Anthropic(anthropic_api_key=os.getenv("ANTHROPIC_API_KEY"))</span> <span class="pl-s1">company</span> <span class="pl-c1">=</span> <span class="pl-s">"Nvidia"</span> <span class="pl-c"># Get the OpenAI API key from the environment variable</span> <span class="pl-s1">api_key</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-c1">getenv</span>(<span class="pl-s">"GROQ_API_KEY"</span>) <span class="pl-c"># Model</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">OpenAIChat</span>( <span class="pl-s1">openai_api_base</span><span class="pl-c1">=</span><span class="pl-s">"https://api.groq.com/openai/v1"</span>, <span class="pl-s1">openai_api_key</span><span class="pl-c1">=</span><span class="pl-s1">api_key</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"llama-3.1-70b-versatile"</span>, <span class="pl-s1">temperature</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>, ) <span class="pl-c"># Initialize the Managing Director agent</span> <span class="pl-s1">managing_director</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Managing-Director"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Managing Director at Blackstone, your role is to oversee the entire investment analysis process for potential acquisitions. </span> <span class="pl-s"> Your responsibilities include:</span> <span class="pl-s"> 1. Setting the overall strategy and direction for the analysis</span> <span class="pl-s"> 2. Coordinating the efforts of the various team members and ensuring a comprehensive evaluation</span> <span class="pl-s"> 3. Reviewing the findings and recommendations from each team member</span> <span class="pl-s"> 4. Making the final decision on whether to proceed with the acquisition</span> <span class="pl-s"> </span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, direct the tasks for the team to thoroughly analyze all aspects of the company, including its financials, industry position, technology, market potential, and regulatory compliance. Provide guidance and feedback as needed to ensure a rigorous and unbiased assessment.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"managing-director.json"</span>, ) <span class="pl-c"># Initialize the Vice President of Finance</span> <span class="pl-s1">vp_finance</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"VP-Finance"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Vice President of Finance at Blackstone, your role is to lead the financial analysis of potential acquisitions. </span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, your tasks include:</span> <span class="pl-s"> 1. Conducting a thorough review of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' financial statements, including income statements, balance sheets, and cash flow statements</span> <span class="pl-s"> 2. Analyzing key financial metrics such as revenue growth, profitability margins, liquidity ratios, and debt levels</span> <span class="pl-s"> 3. Assessing the company's historical financial performance and projecting future performance based on assumptions and market conditions</span> <span class="pl-s"> 4. Identifying any financial risks or red flags that could impact the acquisition decision</span> <span class="pl-s"> 5. Providing a detailed report on your findings and recommendations to the Managing Director</span> <span class="pl-s"></span> <span class="pl-s"> Be sure to consider factors such as the sustainability of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' business model, the strength of its customer base, and its ability to generate consistent cash flows. Your analysis should be data-driven, objective, and aligned with Blackstone's investment criteria.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"vp-finance.json"</span>, ) <span class="pl-c"># Initialize the Industry Analyst</span> <span class="pl-s1">industry_analyst</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Industry-Analyst"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Industry Analyst at Blackstone, your role is to provide in-depth research and analysis on the industries and markets relevant to potential acquisitions.</span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, your tasks include:</span> <span class="pl-s"> 1. Conducting a comprehensive analysis of the industrial robotics and automation solutions industry, including market size, growth rates, key trends, and future prospects</span> <span class="pl-s"> 2. Identifying the major players in the industry and assessing their market share, competitive strengths and weaknesses, and strategic positioning </span> <span class="pl-s"> 3. Evaluating <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' competitive position within the industry, including its market share, differentiation, and competitive advantages</span> <span class="pl-s"> 4. Analyzing the key drivers and restraints for the industry, such as technological advancements, labor costs, regulatory changes, and economic conditions</span> <span class="pl-s"> 5. Identifying potential risks and opportunities for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span> based on the industry analysis, such as disruptive technologies, emerging markets, or shifts in customer preferences </span> <span class="pl-s"> </span> <span class="pl-s"> Your analysis should provide a clear and objective assessment of the attractiveness and future potential of the industrial robotics industry, as well as <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' positioning within it. Consider both short-term and long-term factors, and provide evidence-based insights to inform the investment decision.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"industry-analyst.json"</span>, ) <span class="pl-c"># Initialize the Technology Expert</span> <span class="pl-s1">tech_expert</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Tech-Expert"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Technology Expert at Blackstone, your role is to assess the technological capabilities, competitive advantages, and potential risks of companies being considered for acquisition.</span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, your tasks include:</span> <span class="pl-s"> 1. Conducting a deep dive into <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' proprietary technologies, including its robotics platforms, automation software, and AI capabilities </span> <span class="pl-s"> 2. Assessing the uniqueness, scalability, and defensibility of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' technology stack and intellectual property</span> <span class="pl-s"> 3. Comparing <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' technologies to those of its competitors and identifying any key differentiators or technology gaps</span> <span class="pl-s"> 4. Evaluating <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' research and development capabilities, including its innovation pipeline, engineering talent, and R&amp;D investments</span> <span class="pl-s"> 5. Identifying any potential technology risks or disruptive threats that could impact <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' long-term competitiveness, such as emerging technologies or expiring patents</span> <span class="pl-s"> </span> <span class="pl-s"> Your analysis should provide a comprehensive assessment of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' technological strengths and weaknesses, as well as the sustainability of its competitive advantages. Consider both the current state of its technology and its future potential in light of industry trends and advancements.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"tech-expert.json"</span>, ) <span class="pl-c"># Initialize the Market Researcher</span> <span class="pl-s1">market_researcher</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Market-Researcher"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Market Researcher at Blackstone, your role is to analyze the target company's customer base, market share, and growth potential to assess the commercial viability and attractiveness of the potential acquisition.</span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, your tasks include:</span> <span class="pl-s"> 1. Analyzing <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' current customer base, including customer segmentation, concentration risk, and retention rates</span> <span class="pl-s"> 2. Assessing <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' market share within its target markets and identifying key factors driving its market position</span> <span class="pl-s"> 3. Conducting a detailed market sizing and segmentation analysis for the industrial robotics and automation markets, including identifying high-growth segments and emerging opportunities</span> <span class="pl-s"> 4. Evaluating the demand drivers and sales cycles for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' products and services, and identifying any potential risks or limitations to adoption</span> <span class="pl-s"> 5. Developing financial projections and estimates for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' revenue growth potential based on the market analysis and assumptions around market share and penetration</span> <span class="pl-s"> </span> <span class="pl-s"> Your analysis should provide a data-driven assessment of the market opportunity for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span> and the feasibility of achieving our investment return targets. Consider both bottom-up and top-down market perspectives, and identify any key sensitivities or assumptions in your projections.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"market-researcher.json"</span>, ) <span class="pl-c"># Initialize the Regulatory Specialist</span> <span class="pl-s1">regulatory_specialist</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Regulatory-Specialist"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">f"""</span> <span class="pl-s"> As the Regulatory Specialist at Blackstone, your role is to identify and assess any regulatory risks, compliance requirements, and potential legal liabilities associated with potential acquisitions.</span> <span class="pl-s"> For the current potential acquisition of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, your tasks include: </span> <span class="pl-s"> 1. Identifying all relevant regulatory bodies and laws that govern the operations of <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, including industry-specific regulations, labor laws, and environmental regulations</span> <span class="pl-s"> 2. Reviewing <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' current compliance policies, procedures, and track record to identify any potential gaps or areas of non-compliance</span> <span class="pl-s"> 3. Assessing the potential impact of any pending or proposed changes to relevant regulations that could affect <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' business or create additional compliance burdens</span> <span class="pl-s"> 4. Evaluating the potential legal liabilities and risks associated with <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>' products, services, and operations, including product liability, intellectual property, and customer contracts</span> <span class="pl-s"> 5. Providing recommendations on any regulatory or legal due diligence steps that should be taken as part of the acquisition process, as well as any post-acquisition integration considerations</span> <span class="pl-s"> </span> <span class="pl-s"> Your analysis should provide a comprehensive assessment of the regulatory and legal landscape surrounding <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company</span><span class="pl-kos">}</span></span>, and identify any material risks or potential deal-breakers. Consider both the current state and future outlook, and provide practical recommendations to mitigate identified risks.</span> <span class="pl-s"> """</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">stopping_token</span><span class="pl-c1">=</span><span class="pl-s">"&lt;DONE&gt;"</span>, <span class="pl-s1">state_save_file_type</span><span class="pl-c1">=</span><span class="pl-s">"json"</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"regulatory-specialist.json"</span>, ) <span class="pl-c"># Create a list of agents</span> <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [ <span class="pl-s1">managing_director</span>, <span class="pl-s1">vp_finance</span>, <span class="pl-s1">industry_analyst</span>, <span class="pl-s1">tech_expert</span>, <span class="pl-s1">market_researcher</span>, <span class="pl-s1">regulatory_specialist</span>, ] <span class="pl-s1">swarm</span> <span class="pl-c1">=</span> <span class="pl-en">SequentialWorkflow</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"blackstone-private-equity-advisors"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, ) <span class="pl-en">print</span>( <span class="pl-s1">swarm</span>.<span class="pl-c1">run</span>( <span class="pl-s">"Analyze nvidia if it's a good deal to invest in now 10B"</span> ) )</pre></div> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>AgentRearrange</code></h2><a id="user-content-agentrearrange" class="anchor" aria-label="Permalink: AgentRearrange" href="#agentrearrange"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>AgentRearrange</code> orchestration technique, inspired by Einops and einsum, allows you to define and map out the relationships between various agents. It provides a powerful tool for orchestrating complex workflows, enabling you to specify linear and sequential relationships such as <code>a -&gt; a1 -&gt; a2 -&gt; a3</code>, or concurrent relationships where the first agent sends a message to 3 agents simultaneously: <code>a -&gt; a1, a2, a3</code>. This level of customization allows for the creation of highly efficient and dynamic workflows, where agents can work in parallel or in sequence as needed. The <code>AgentRearrange</code> technique is a valuable addition to the swarms library, providing a new level of flexibility and control over the orchestration of agents. For more detailed information and examples, please refer to the <a href="https://docs.swarms.world/en/latest/swarms/structs/agent_rearrange/" rel="nofollow">official documentation</a>.</p> <p dir="auto"><a href="https://youtu.be/Rq8wWQ073mg" rel="nofollow">Check out my video on agent rearrange!</a></p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods-1" class="anchor" aria-label="Permalink: Methods" href="#methods-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>__init__</code></td> <td>Initialize the AgentRearrange</td> <td><code>agents</code>: List of Agent objects<br><code>flow</code>: String describing the agent flow</td> <td>None</td> </tr> <tr> <td><code>run</code></td> <td>Execute the workflow</td> <td><code>input_data</code>: Initial input for the first agent</td> <td>Final output after all agents have processed</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs-1" class="anchor" aria-label="Permalink: Inputs" href="#inputs-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>agents</code></td> <td>List[Agent]</td> <td>List of Agent objects to be orchestrated</td> </tr> <tr> <td><code>flow</code></td> <td>str</td> <td>String describing the flow of agents (e.g., "A -&gt; B, C")</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output-1" class="anchor" aria-label="Permalink: Output" href="#output-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns the final output after all agents have processed the input according to the specified flow.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" from datetime import datetime from swarms import Agent, AgentRearrange, create_file_in_folder chief_medical_officer = Agent( agent_name=&quot;Chief Medical Officer&quot;, system_prompt=&quot;&quot;&quot;You are the Chief Medical Officer coordinating a team of medical specialists for viral disease diagnosis. Your responsibilities include: - Gathering initial patient symptoms and medical history - Coordinating with specialists to form differential diagnoses - Synthesizing different specialist opinions into a cohesive diagnosis - Ensuring all relevant symptoms and test results are considered - Making final diagnostic recommendations - Suggesting treatment plans based on team input - Identifying when additional specialists need to be consulted Guidelines: 1. Always start with a comprehensive patient history 2. Consider both common and rare viral conditions 3. Factor in patient demographics and risk factors 4. Document your reasoning process clearly 5. Highlight any critical or emergency symptoms 6. Note any limitations or uncertainties in the diagnosis Format all responses with clear sections for: - Initial Assessment - Differential Diagnoses - Specialist Consultations Needed - Recommended Next Steps&quot;&quot;&quot;, model_name=&quot;gpt-4o&quot;, # Models from litellm -&gt; claude-2 max_loops=1, ) # Viral Disease Specialist virologist = Agent( agent_name=&quot;Virologist&quot;, system_prompt=&quot;&quot;&quot;You are a specialist in viral diseases with expertise in: - Respiratory viruses (Influenza, Coronavirus, RSV) - Systemic viral infections (EBV, CMV, HIV) - Childhood viral diseases (Measles, Mumps, Rubella) - Emerging viral threats Your role involves: 1. Analyzing symptoms specific to viral infections 2. Distinguishing between different viral pathogens 3. Assessing viral infection patterns and progression 4. Recommending specific viral tests 5. Evaluating epidemiological factors For each case, consider: - Incubation periods - Transmission patterns - Seasonal factors - Geographic prevalence - Patient immune status - Current viral outbreaks Provide detailed analysis of: - Characteristic viral symptoms - Disease progression timeline - Risk factors for severe disease - Potential complications&quot;&quot;&quot;, model_name=&quot;gpt-4o&quot;, max_loops=1, ) # Internal Medicine Specialist internist = Agent( agent_name=&quot;Internist&quot;, system_prompt=&quot;&quot;&quot;You are an Internal Medicine specialist responsible for: - Comprehensive system-based evaluation - Integration of symptoms across organ systems - Identification of systemic manifestations - Assessment of comorbidities For each case, analyze: 1. Vital signs and their implications 2. System-by-system review (cardiovascular, respiratory, etc.) 3. Impact of existing medical conditions 4. Medication interactions and contraindications 5. Risk stratification Consider these aspects: - Age-related factors - Chronic disease impact - Medication history - Social and environmental factors Document: - Physical examination findings - System-specific symptoms - Relevant lab abnormalities - Risk factors for complications&quot;&quot;&quot;, model_name=&quot;gpt-4o&quot;, max_loops=1, ) # Diagnostic Synthesizer synthesizer = Agent( agent_name=&quot;Diagnostic Synthesizer&quot;, system_prompt=&quot;&quot;&quot;You are responsible for synthesizing all specialist inputs to create a final diagnostic assessment: Core responsibilities: 1. Integrate findings from all specialists 2. Identify patterns and correlations 3. Resolve conflicting opinions 4. Generate probability-ranked differential diagnoses 5. Recommend additional testing if needed Analysis framework: - Weight evidence based on reliability and specificity - Consider epidemiological factors - Evaluate diagnostic certainty - Account for test limitations Provide structured output including: 1. Primary diagnosis with confidence level 2. Supporting evidence summary 3. Alternative diagnoses to consider 4. Recommended confirmatory tests 5. Red flags or warning signs 6. Follow-up recommendations Documentation requirements: - Clear reasoning chain - Evidence quality assessment - Confidence levels for each diagnosis - Knowledge gaps identified - Risk assessment&quot;&quot;&quot;, model_name=&quot;gpt-4o&quot;, max_loops=1, ) # Create agent list agents = [chief_medical_officer, virologist, internist, synthesizer] # Define diagnostic flow flow = f&quot;&quot;&quot;{chief_medical_officer.agent_name} -&gt; {virologist.agent_name} -&gt; {internist.agent_name} -&gt; {synthesizer.agent_name}&quot;&quot;&quot; # Create the swarm system diagnosis_system = AgentRearrange( name=&quot;Medical-nlp-diagnosis-swarm&quot;, description=&quot;natural language symptions to diagnosis report&quot;, agents=agents, flow=flow, max_loops=1, output_type=&quot;all&quot;, ) # Example usage if __name__ == &quot;__main__&quot;: # Example patient case patient_case = &quot;&quot;&quot; Patient: 45-year-old female Presenting symptoms: - Fever (101.5°F) for 3 days - Dry cough - Fatigue - Mild shortness of breath Medical history: - Controlled hypertension - No recent travel - Fully vaccinated for COVID-19 - No known sick contacts &quot;&quot;&quot; # Add timestamp to the patient case case_info = f&quot;Timestamp: {datetime.now()}\nPatient Information: {patient_case}&quot; # Run the diagnostic process diagnosis = diagnosis_system.run(case_info) # Create a folder and file called reports create_file_in_folder( &quot;reports&quot;, &quot;medical_analysis_agent_rearrange.md&quot;, diagnosis ) "><pre><span class="pl-k">from</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">AgentRearrange</span>, <span class="pl-s1">create_file_in_folder</span> <span class="pl-s1">chief_medical_officer</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Chief Medical Officer"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are the Chief Medical Officer coordinating a team of medical specialists for viral disease diagnosis.</span> <span class="pl-s"> Your responsibilities include:</span> <span class="pl-s"> - Gathering initial patient symptoms and medical history</span> <span class="pl-s"> - Coordinating with specialists to form differential diagnoses</span> <span class="pl-s"> - Synthesizing different specialist opinions into a cohesive diagnosis</span> <span class="pl-s"> - Ensuring all relevant symptoms and test results are considered</span> <span class="pl-s"> - Making final diagnostic recommendations</span> <span class="pl-s"> - Suggesting treatment plans based on team input</span> <span class="pl-s"> - Identifying when additional specialists need to be consulted</span> <span class="pl-s"> </span> <span class="pl-s"> Guidelines:</span> <span class="pl-s"> 1. Always start with a comprehensive patient history</span> <span class="pl-s"> 2. Consider both common and rare viral conditions</span> <span class="pl-s"> 3. Factor in patient demographics and risk factors</span> <span class="pl-s"> 4. Document your reasoning process clearly</span> <span class="pl-s"> 5. Highlight any critical or emergency symptoms</span> <span class="pl-s"> 6. Note any limitations or uncertainties in the diagnosis</span> <span class="pl-s"> </span> <span class="pl-s"> Format all responses with clear sections for:</span> <span class="pl-s"> - Initial Assessment</span> <span class="pl-s"> - Differential Diagnoses</span> <span class="pl-s"> - Specialist Consultations Needed</span> <span class="pl-s"> - Recommended Next Steps"""</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-c"># Models from litellm -&gt; claude-2</span> <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ) <span class="pl-c"># Viral Disease Specialist</span> <span class="pl-s1">virologist</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Virologist"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a specialist in viral diseases with expertise in:</span> <span class="pl-s"> - Respiratory viruses (Influenza, Coronavirus, RSV)</span> <span class="pl-s"> - Systemic viral infections (EBV, CMV, HIV)</span> <span class="pl-s"> - Childhood viral diseases (Measles, Mumps, Rubella)</span> <span class="pl-s"> - Emerging viral threats</span> <span class="pl-s"> </span> <span class="pl-s"> Your role involves:</span> <span class="pl-s"> 1. Analyzing symptoms specific to viral infections</span> <span class="pl-s"> 2. Distinguishing between different viral pathogens</span> <span class="pl-s"> 3. Assessing viral infection patterns and progression</span> <span class="pl-s"> 4. Recommending specific viral tests</span> <span class="pl-s"> 5. Evaluating epidemiological factors</span> <span class="pl-s"> </span> <span class="pl-s"> For each case, consider:</span> <span class="pl-s"> - Incubation periods</span> <span class="pl-s"> - Transmission patterns</span> <span class="pl-s"> - Seasonal factors</span> <span class="pl-s"> - Geographic prevalence</span> <span class="pl-s"> - Patient immune status</span> <span class="pl-s"> - Current viral outbreaks</span> <span class="pl-s"> </span> <span class="pl-s"> Provide detailed analysis of:</span> <span class="pl-s"> - Characteristic viral symptoms</span> <span class="pl-s"> - Disease progression timeline</span> <span class="pl-s"> - Risk factors for severe disease</span> <span class="pl-s"> - Potential complications"""</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ) <span class="pl-c"># Internal Medicine Specialist</span> <span class="pl-s1">internist</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Internist"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are an Internal Medicine specialist responsible for:</span> <span class="pl-s"> - Comprehensive system-based evaluation</span> <span class="pl-s"> - Integration of symptoms across organ systems</span> <span class="pl-s"> - Identification of systemic manifestations</span> <span class="pl-s"> - Assessment of comorbidities</span> <span class="pl-s"> </span> <span class="pl-s"> For each case, analyze:</span> <span class="pl-s"> 1. Vital signs and their implications</span> <span class="pl-s"> 2. System-by-system review (cardiovascular, respiratory, etc.)</span> <span class="pl-s"> 3. Impact of existing medical conditions</span> <span class="pl-s"> 4. Medication interactions and contraindications</span> <span class="pl-s"> 5. Risk stratification</span> <span class="pl-s"> </span> <span class="pl-s"> Consider these aspects:</span> <span class="pl-s"> - Age-related factors</span> <span class="pl-s"> - Chronic disease impact</span> <span class="pl-s"> - Medication history</span> <span class="pl-s"> - Social and environmental factors</span> <span class="pl-s"> </span> <span class="pl-s"> Document:</span> <span class="pl-s"> - Physical examination findings</span> <span class="pl-s"> - System-specific symptoms</span> <span class="pl-s"> - Relevant lab abnormalities</span> <span class="pl-s"> - Risk factors for complications"""</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ) <span class="pl-c"># Diagnostic Synthesizer</span> <span class="pl-s1">synthesizer</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Diagnostic Synthesizer"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are responsible for synthesizing all specialist inputs to create a final diagnostic assessment:</span> <span class="pl-s"> </span> <span class="pl-s"> Core responsibilities:</span> <span class="pl-s"> 1. Integrate findings from all specialists</span> <span class="pl-s"> 2. Identify patterns and correlations</span> <span class="pl-s"> 3. Resolve conflicting opinions</span> <span class="pl-s"> 4. Generate probability-ranked differential diagnoses</span> <span class="pl-s"> 5. Recommend additional testing if needed</span> <span class="pl-s"> </span> <span class="pl-s"> Analysis framework:</span> <span class="pl-s"> - Weight evidence based on reliability and specificity</span> <span class="pl-s"> - Consider epidemiological factors</span> <span class="pl-s"> - Evaluate diagnostic certainty</span> <span class="pl-s"> - Account for test limitations</span> <span class="pl-s"> </span> <span class="pl-s"> Provide structured output including:</span> <span class="pl-s"> 1. Primary diagnosis with confidence level</span> <span class="pl-s"> 2. Supporting evidence summary</span> <span class="pl-s"> 3. Alternative diagnoses to consider</span> <span class="pl-s"> 4. Recommended confirmatory tests</span> <span class="pl-s"> 5. Red flags or warning signs</span> <span class="pl-s"> 6. Follow-up recommendations</span> <span class="pl-s"> </span> <span class="pl-s"> Documentation requirements:</span> <span class="pl-s"> - Clear reasoning chain</span> <span class="pl-s"> - Evidence quality assessment</span> <span class="pl-s"> - Confidence levels for each diagnosis</span> <span class="pl-s"> - Knowledge gaps identified</span> <span class="pl-s"> - Risk assessment"""</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ) <span class="pl-c"># Create agent list</span> <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [<span class="pl-s1">chief_medical_officer</span>, <span class="pl-s1">virologist</span>, <span class="pl-s1">internist</span>, <span class="pl-s1">synthesizer</span>] <span class="pl-c"># Define diagnostic flow</span> <span class="pl-s1">flow</span> <span class="pl-c1">=</span> <span class="pl-s">f"""<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">chief_medical_officer</span>.<span class="pl-c1">agent_name</span><span class="pl-kos">}</span></span> -&gt; <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">virologist</span>.<span class="pl-c1">agent_name</span><span class="pl-kos">}</span></span> -&gt; <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">internist</span>.<span class="pl-c1">agent_name</span><span class="pl-kos">}</span></span> -&gt; <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">synthesizer</span>.<span class="pl-c1">agent_name</span><span class="pl-kos">}</span></span>"""</span> <span class="pl-c"># Create the swarm system</span> <span class="pl-s1">diagnosis_system</span> <span class="pl-c1">=</span> <span class="pl-en">AgentRearrange</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Medical-nlp-diagnosis-swarm"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"natural language symptions to diagnosis report"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, <span class="pl-s1">flow</span><span class="pl-c1">=</span><span class="pl-s1">flow</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"all"</span>, ) <span class="pl-c"># Example usage</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-c"># Example patient case</span> <span class="pl-s1">patient_case</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s"> Patient: 45-year-old female</span> <span class="pl-s"> Presenting symptoms: </span> <span class="pl-s"> - Fever (101.5°F) for 3 days</span> <span class="pl-s"> - Dry cough</span> <span class="pl-s"> - Fatigue</span> <span class="pl-s"> - Mild shortness of breath</span> <span class="pl-s"> Medical history:</span> <span class="pl-s"> - Controlled hypertension</span> <span class="pl-s"> - No recent travel</span> <span class="pl-s"> - Fully vaccinated for COVID-19</span> <span class="pl-s"> - No known sick contacts</span> <span class="pl-s"> """</span> <span class="pl-c"># Add timestamp to the patient case</span> <span class="pl-s1">case_info</span> <span class="pl-c1">=</span> <span class="pl-s">f"Timestamp: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">datetime</span>.<span class="pl-c1">now</span>()<span class="pl-kos">}</span></span><span class="pl-cce">\n</span>Patient Information: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">patient_case</span><span class="pl-kos">}</span></span>"</span> <span class="pl-c"># Run the diagnostic process</span> <span class="pl-s1">diagnosis</span> <span class="pl-c1">=</span> <span class="pl-s1">diagnosis_system</span>.<span class="pl-c1">run</span>(<span class="pl-s1">case_info</span>) <span class="pl-c"># Create a folder and file called reports</span> <span class="pl-en">create_file_in_folder</span>( <span class="pl-s">"reports"</span>, <span class="pl-s">"medical_analysis_agent_rearrange.md"</span>, <span class="pl-s1">diagnosis</span> ) </pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>HierarhicalSwarm</code></h2><a id="user-content-hierarhicalswarm" class="anchor" aria-label="Permalink: HierarhicalSwarm" href="#hierarhicalswarm"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Coming soon...</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>GraphSwarm</code></h2><a id="user-content-graphswarm" class="anchor" aria-label="Permalink: GraphSwarm" href="#graphswarm"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>GraphSwarm</code> is a workflow management system designed to orchestrate complex tasks by leveraging the power of graph theory. It enables the creation of a directed acyclic graph (DAG) to model dependencies between tasks and agents. This allows for efficient task assignment, execution, and monitoring.</p> <p dir="auto">Here's a breakdown of how the <code>GraphSwarm</code> works:</p> <ol dir="auto"> <li><strong>Node Creation</strong>: The <code>GraphSwarm</code> workflow is composed of nodes, which can be either agents or tasks. Agents are responsible for executing tasks, and tasks represent specific operations that need to be performed. In the example, two agents (<code>agent1</code> and <code>agent2</code>) and one task (<code>task1</code>) are created.</li> <li><strong>Edge Definition</strong>: Edges are used to define the relationships between nodes. In this case, edges are created to connect <code>agent1</code> and <code>agent2</code> to <code>task1</code>, indicating that both agents are capable of executing <code>task1</code>.</li> <li><strong>Entry and End Points</strong>: The <code>GraphSwarm</code> workflow requires the definition of entry points (where the workflow starts) and end points (where the workflow concludes). In this example, <code>agent1</code> and <code>agent2</code> are set as entry points, and <code>task1</code> is set as the end point.</li> <li><strong>Visualization</strong>: The <code>GraphSwarm</code> provides a visualization feature to graphically represent the workflow. This allows for easy understanding and debugging of the workflow structure.</li> <li><strong>Execution</strong>: The <code>GraphSwarm</code> workflow is executed by traversing the graph from the entry points to the end points. In this case, both <code>agent1</code> and <code>agent2</code> execute <code>task1</code> concurrently, and the results are collected.</li> <li><strong>Results</strong>: The final results of the workflow execution are aggregated and returned. In this example, the result of executing <code>task1</code> is "Task completed".</li> </ol> <p dir="auto">The <code>GraphSwarm</code> offers several benefits, including:</p> <ul dir="auto"> <li><strong>Concurrency</strong>: Enables the execution of tasks concurrently, improving overall workflow efficiency.</li> <li><strong>Flexibility</strong>: Allows for dynamic task assignment based on agent availability and task requirements.</li> <li><strong>Scalability</strong>: Supports the addition of new agents and tasks as needed, making it suitable for large-scale workflows.</li> <li><strong>Visualization</strong>: Provides a graphical representation of the workflow, facilitating understanding and debugging.</li> </ul> <p dir="auto">By leveraging the <code>GraphSwarm</code>, complex workflows can be efficiently managed, and tasks can be executed in a coordinated and scalable manner.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods-2" class="anchor" aria-label="Permalink: Methods" href="#methods-2"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>add_node</code></td> <td>Add a node to the graph</td> <td><code>node</code>: Node object</td> <td>None</td> </tr> <tr> <td><code>add_edge</code></td> <td>Add an edge to the graph</td> <td><code>edge</code>: Edge object</td> <td>None</td> </tr> <tr> <td><code>set_entry_points</code></td> <td>Set the entry points of the graph</td> <td><code>entry_points</code>: List of node IDs</td> <td>None</td> </tr> <tr> <td><code>set_end_points</code></td> <td>Set the end points of the graph</td> <td><code>end_points</code>: List of node IDs</td> <td>None</td> </tr> <tr> <td><code>visualize</code></td> <td>Generate a visual representation of the graph</td> <td>None</td> <td>String representation of the graph</td> </tr> <tr> <td><code>run</code></td> <td>Execute the workflow</td> <td>None</td> <td>Dictionary of execution results</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs-2" class="anchor" aria-label="Permalink: Inputs" href="#inputs-2"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>Node</code></td> <td>Object</td> <td>Represents a node in the graph (agent or task)</td> </tr> <tr> <td><code>Edge</code></td> <td>Object</td> <td>Represents an edge connecting two nodes</td> </tr> <tr> <td><code>entry_points</code></td> <td>List[str]</td> <td>List of node IDs where the workflow starts</td> </tr> <tr> <td><code>end_points</code></td> <td>List[str]</td> <td>List of node IDs where the workflow ends</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output-2" class="anchor" aria-label="Permalink: Output" href="#output-2"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns a dictionary containing the execution results of all nodes in the graph.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from dotenv import load_dotenv from swarms import Agent, Edge, GraphWorkflow, Node, NodeType from swarm_models import OpenAIChat load_dotenv() api_key = os.environ.get(&quot;OPENAI_API_KEY&quot;) llm = OpenAIChat( temperature=0.5, openai_api_key=api_key, max_tokens=4000 ) agent1 = Agent(llm=llm, max_loops=1, autosave=True, dashboard=True) agent2 = Agent(llm=llm, max_loops=1, autosave=True, dashboard=True) def sample_task(): print(&quot;Running sample task&quot;) return &quot;Task completed&quot; wf_graph = GraphWorkflow() wf_graph.add_node(Node(id=&quot;agent1&quot;, type=NodeType.AGENT, agent=agent1)) wf_graph.add_node(Node(id=&quot;agent2&quot;, type=NodeType.AGENT, agent=agent2)) wf_graph.add_node( Node(id=&quot;task1&quot;, type=NodeType.TASK, callable=sample_task) ) wf_graph.add_edge(Edge(source=&quot;agent1&quot;, target=&quot;task1&quot;)) wf_graph.add_edge(Edge(source=&quot;agent2&quot;, target=&quot;task1&quot;)) wf_graph.set_entry_points([&quot;agent1&quot;, &quot;agent2&quot;]) wf_graph.set_end_points([&quot;task1&quot;]) print(wf_graph.visualize()) # Run the workflow results = wf_graph.run() print(&quot;Execution results:&quot;, results) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">dotenv</span> <span class="pl-k">import</span> <span class="pl-s1">load_dotenv</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">Edge</span>, <span class="pl-v">GraphWorkflow</span>, <span class="pl-v">Node</span>, <span class="pl-v">NodeType</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">OpenAIChat</span> <span class="pl-en">load_dotenv</span>() <span class="pl-s1">api_key</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-c1">environ</span>.<span class="pl-c1">get</span>(<span class="pl-s">"OPENAI_API_KEY"</span>) <span class="pl-s1">llm</span> <span class="pl-c1">=</span> <span class="pl-en">OpenAIChat</span>( <span class="pl-s1">temperature</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">openai_api_key</span><span class="pl-c1">=</span><span class="pl-s1">api_key</span>, <span class="pl-s1">max_tokens</span><span class="pl-c1">=</span><span class="pl-c1">4000</span> ) <span class="pl-s1">agent1</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>(<span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">llm</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">agent2</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>(<span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">llm</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-k">def</span> <span class="pl-en">sample_task</span>(): <span class="pl-en">print</span>(<span class="pl-s">"Running sample task"</span>) <span class="pl-k">return</span> <span class="pl-s">"Task completed"</span> <span class="pl-s1">wf_graph</span> <span class="pl-c1">=</span> <span class="pl-en">GraphWorkflow</span>() <span class="pl-s1">wf_graph</span>.<span class="pl-c1">add_node</span>(<span class="pl-en">Node</span>(<span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-s">"agent1"</span>, <span class="pl-s1">type</span><span class="pl-c1">=</span><span class="pl-v">NodeType</span>.<span class="pl-c1">AGENT</span>, <span class="pl-s1">agent</span><span class="pl-c1">=</span><span class="pl-s1">agent1</span>)) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">add_node</span>(<span class="pl-en">Node</span>(<span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-s">"agent2"</span>, <span class="pl-s1">type</span><span class="pl-c1">=</span><span class="pl-v">NodeType</span>.<span class="pl-c1">AGENT</span>, <span class="pl-s1">agent</span><span class="pl-c1">=</span><span class="pl-s1">agent2</span>)) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">add_node</span>( <span class="pl-en">Node</span>(<span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-s">"task1"</span>, <span class="pl-s1">type</span><span class="pl-c1">=</span><span class="pl-v">NodeType</span>.<span class="pl-c1">TASK</span>, <span class="pl-s1">callable</span><span class="pl-c1">=</span><span class="pl-s1">sample_task</span>) ) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">add_edge</span>(<span class="pl-en">Edge</span>(<span class="pl-s1">source</span><span class="pl-c1">=</span><span class="pl-s">"agent1"</span>, <span class="pl-s1">target</span><span class="pl-c1">=</span><span class="pl-s">"task1"</span>)) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">add_edge</span>(<span class="pl-en">Edge</span>(<span class="pl-s1">source</span><span class="pl-c1">=</span><span class="pl-s">"agent2"</span>, <span class="pl-s1">target</span><span class="pl-c1">=</span><span class="pl-s">"task1"</span>)) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">set_entry_points</span>([<span class="pl-s">"agent1"</span>, <span class="pl-s">"agent2"</span>]) <span class="pl-s1">wf_graph</span>.<span class="pl-c1">set_end_points</span>([<span class="pl-s">"task1"</span>]) <span class="pl-en">print</span>(<span class="pl-s1">wf_graph</span>.<span class="pl-c1">visualize</span>()) <span class="pl-c"># Run the workflow</span> <span class="pl-s1">results</span> <span class="pl-c1">=</span> <span class="pl-s1">wf_graph</span>.<span class="pl-c1">run</span>() <span class="pl-en">print</span>(<span class="pl-s">"Execution results:"</span>, <span class="pl-s1">results</span>)</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>MixtureOfAgents</code></h2><a id="user-content-mixtureofagents" class="anchor" aria-label="Permalink: MixtureOfAgents" href="#mixtureofagents"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">This is an implementation based on the paper: "Mixture-of-Agents Enhances Large Language Model Capabilities" by together.ai, available at <a href="https://arxiv.org/abs/2406.04692" rel="nofollow">https://arxiv.org/abs/2406.04692</a>. It achieves state-of-the-art (SOTA) results on AlpacaEval 2.0, MT-Bench, and FLASK, surpassing GPT-4 Omni. This architecture is particularly suitable for tasks that require parallelization followed by sequential processing in another loop.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods-3" class="anchor" aria-label="Permalink: Methods" href="#methods-3"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>__init__</code></td> <td>Initialize the MixtureOfAgents</td> <td><code>name</code>: Name of the swarm<br><code>agents</code>: List of Agent objects<br><code>layers</code>: Number of processing layers<br><code>final_agent</code>: Agent for final processing</td> <td>None</td> </tr> <tr> <td><code>run</code></td> <td>Execute the swarm</td> <td><code>task</code>: Input task for the swarm</td> <td>Final output after all agents have processed</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs-3" class="anchor" aria-label="Permalink: Inputs" href="#inputs-3"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>name</code></td> <td>str</td> <td>Name of the swarm</td> </tr> <tr> <td><code>agents</code></td> <td>List[Agent]</td> <td>List of Agent objects to be used in the swarm</td> </tr> <tr> <td><code>layers</code></td> <td>int</td> <td>Number of processing layers in the swarm</td> </tr> <tr> <td><code>final_agent</code></td> <td>Agent</td> <td>Agent responsible for final processing</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output-3" class="anchor" aria-label="Permalink: Output" href="#output-3"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns the final output after all agents have processed the input according to the specified layers and final agent.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import os from swarms import Agent, MixtureOfAgents # Agent 1: Financial Statement Analyzer agent1 = Agent( agent_name=&quot;FinancialStatementAnalyzer&quot;, model_name=&quot;gpt-4o&quot;, system_prompt=&quot;&quot;&quot;You are a Financial Statement Analyzer specializing in 10-K SEC reports. Your primary focus is on analyzing the financial statements, including the balance sheet, income statement, and cash flow statement. Key responsibilities: 1. Identify and explain significant changes in financial metrics year-over-year. 2. Calculate and interpret key financial ratios (e.g., liquidity ratios, profitability ratios, leverage ratios). 3. Analyze trends in revenue, expenses, and profitability. 4. Highlight any red flags or areas of concern in the financial statements. 5. Provide insights on the company's financial health and performance based on the data. When analyzing, consider industry standards and compare the company's performance to its peers when possible. Your analysis should be thorough, data-driven, and provide actionable insights for investors and stakeholders.&quot;&quot;&quot;, max_loops=1, autosave=True, dashboard=False, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;financial_statement_analyzer_state.json&quot;, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, return_step_meta=False, ) # Agent 2: Risk Assessment Specialist agent2 = Agent( agent_name=&quot;RiskAssessmentSpecialist&quot;, model_name=&quot;gpt-4o&quot;, system_prompt=&quot;&quot;&quot;You are a Risk Assessment Specialist focusing on 10-K SEC reports. Your primary role is to identify, analyze, and evaluate potential risks disclosed in the report. Key responsibilities: 1. Thoroughly review the &quot;Risk Factors&quot; section of the 10-K report. 2. Identify and categorize different types of risks (e.g., operational, financial, legal, market, technological). 3. Assess the potential impact and likelihood of each identified risk. 4. Analyze the company's risk mitigation strategies and their effectiveness. 5. Identify any emerging risks not explicitly mentioned but implied by the company's operations or market conditions. 6. Compare the company's risk profile with industry peers when possible. Your analysis should provide a comprehensive overview of the company's risk landscape, helping stakeholders understand the potential challenges and uncertainties facing the business. Be sure to highlight any critical risks that could significantly impact the company's future performance or viability.&quot;&quot;&quot;, max_loops=1, autosave=True, dashboard=False, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;risk_assessment_specialist_state.json&quot;, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, return_step_meta=False, ) # Agent 3: Business Strategy Evaluator agent3 = Agent( agent_name=&quot;BusinessStrategyEvaluator&quot;, model_name=&quot;gpt-4o&quot;, system_prompt=&quot;&quot;&quot;You are a Business Strategy Evaluator specializing in analyzing 10-K SEC reports. Your focus is on assessing the company's overall strategy, market position, and future outlook. Key responsibilities: 1. Analyze the company's business description, market opportunities, and competitive landscape. 2. Evaluate the company's products or services, including their market share and growth potential. 3. Assess the effectiveness of the company's current business strategy and its alignment with market trends. 4. Identify key performance indicators (KPIs) and evaluate the company's performance against these metrics. 5. Analyze management's discussion and analysis (MD&amp;A) section to understand their perspective on the business. 6. Identify potential growth opportunities or areas for improvement in the company's strategy. 7. Compare the company's strategic position with key competitors in the industry. Your analysis should provide insights into the company's strategic direction, its ability to create value, and its potential for future growth. Consider both short-term and long-term perspectives in your evaluation.&quot;&quot;&quot;, max_loops=1, autosave=True, dashboard=False, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;business_strategy_evaluator_state.json&quot;, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, return_step_meta=False, ) # Aggregator Agent aggregator_agent = Agent( agent_name=&quot;10KReportAggregator&quot;, model_name=&quot;gpt-4o&quot;, system_prompt=&quot;&quot;&quot;You are the 10-K Report Aggregator, responsible for synthesizing and summarizing the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator. Your goal is to create a comprehensive, coherent, and insightful summary of the 10-K SEC report. Key responsibilities: 1. Integrate the financial analysis, risk assessment, and business strategy evaluation into a unified report. 2. Identify and highlight the most critical information and insights from each specialist's analysis. 3. Reconcile any conflicting information or interpretations among the specialists' reports. 4. Provide a balanced view of the company's overall performance, risks, and strategic position. 5. Summarize key findings and their potential implications for investors and stakeholders. 6. Identify any areas where further investigation or clarification may be needed. Your final report should be well-structured, easy to understand, and provide a holistic view of the company based on the 10-K SEC report. It should offer valuable insights for decision-making while acknowledging any limitations or uncertainties in the analysis.&quot;&quot;&quot;, max_loops=1, autosave=True, dashboard=False, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;10k_report_aggregator_state.json&quot;, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, return_step_meta=False, ) # Create the Mixture of Agents class moa = MixtureOfAgents( agents=[agent1, agent2, agent3], aggregator_agent=aggregator_agent, aggregator_system_prompt=&quot;&quot;&quot;As the 10-K Report Aggregator, your task is to synthesize the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator into a comprehensive and coherent report. Follow these steps: 1. Review and summarize the key points from each specialist's analysis. 2. Identify common themes and insights across the analyses. 3. Highlight any discrepancies or conflicting interpretations, if present. 4. Provide a balanced and integrated view of the company's financial health, risks, and strategic position. 5. Summarize the most critical findings and their potential impact on investors and stakeholders. 6. Suggest areas for further investigation or monitoring, if applicable. Your final output should be a well-structured, insightful report that offers a holistic view of the company based on the 10-K SEC report analysis.&quot;&quot;&quot;, layers=3, ) # Example usage company_name = &quot;NVIDIA&quot; out = moa.run( f&quot;Analyze the latest 10-K SEC report for {company_name}. Provide a comprehensive summary of the company's financial performance, risk profile, and business strategy.&quot; ) print(out) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">MixtureOfAgents</span> <span class="pl-c"># Agent 1: Financial Statement Analyzer</span> <span class="pl-s1">agent1</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"FinancialStatementAnalyzer"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a Financial Statement Analyzer specializing in 10-K SEC reports. Your primary focus is on analyzing the financial statements, including the balance sheet, income statement, and cash flow statement. </span> <span class="pl-s"></span> <span class="pl-s">Key responsibilities:</span> <span class="pl-s">1. Identify and explain significant changes in financial metrics year-over-year.</span> <span class="pl-s">2. Calculate and interpret key financial ratios (e.g., liquidity ratios, profitability ratios, leverage ratios).</span> <span class="pl-s">3. Analyze trends in revenue, expenses, and profitability.</span> <span class="pl-s">4. Highlight any red flags or areas of concern in the financial statements.</span> <span class="pl-s">5. Provide insights on the company's financial health and performance based on the data.</span> <span class="pl-s"></span> <span class="pl-s">When analyzing, consider industry standards and compare the company's performance to its peers when possible. Your analysis should be thorough, data-driven, and provide actionable insights for investors and stakeholders."""</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"financial_statement_analyzer_state.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-c"># Agent 2: Risk Assessment Specialist</span> <span class="pl-s1">agent2</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"RiskAssessmentSpecialist"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a Risk Assessment Specialist focusing on 10-K SEC reports. Your primary role is to identify, analyze, and evaluate potential risks disclosed in the report.</span> <span class="pl-s"></span> <span class="pl-s">Key responsibilities:</span> <span class="pl-s">1. Thoroughly review the "Risk Factors" section of the 10-K report.</span> <span class="pl-s">2. Identify and categorize different types of risks (e.g., operational, financial, legal, market, technological).</span> <span class="pl-s">3. Assess the potential impact and likelihood of each identified risk.</span> <span class="pl-s">4. Analyze the company's risk mitigation strategies and their effectiveness.</span> <span class="pl-s">5. Identify any emerging risks not explicitly mentioned but implied by the company's operations or market conditions.</span> <span class="pl-s">6. Compare the company's risk profile with industry peers when possible.</span> <span class="pl-s"></span> <span class="pl-s">Your analysis should provide a comprehensive overview of the company's risk landscape, helping stakeholders understand the potential challenges and uncertainties facing the business. Be sure to highlight any critical risks that could significantly impact the company's future performance or viability."""</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"risk_assessment_specialist_state.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-c"># Agent 3: Business Strategy Evaluator</span> <span class="pl-s1">agent3</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"BusinessStrategyEvaluator"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a Business Strategy Evaluator specializing in analyzing 10-K SEC reports. Your focus is on assessing the company's overall strategy, market position, and future outlook.</span> <span class="pl-s"></span> <span class="pl-s">Key responsibilities:</span> <span class="pl-s">1. Analyze the company's business description, market opportunities, and competitive landscape.</span> <span class="pl-s">2. Evaluate the company's products or services, including their market share and growth potential.</span> <span class="pl-s">3. Assess the effectiveness of the company's current business strategy and its alignment with market trends.</span> <span class="pl-s">4. Identify key performance indicators (KPIs) and evaluate the company's performance against these metrics.</span> <span class="pl-s">5. Analyze management's discussion and analysis (MD&amp;A) section to understand their perspective on the business.</span> <span class="pl-s">6. Identify potential growth opportunities or areas for improvement in the company's strategy.</span> <span class="pl-s">7. Compare the company's strategic position with key competitors in the industry.</span> <span class="pl-s"></span> <span class="pl-s">Your analysis should provide insights into the company's strategic direction, its ability to create value, and its potential for future growth. Consider both short-term and long-term perspectives in your evaluation."""</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"business_strategy_evaluator_state.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-c"># Aggregator Agent</span> <span class="pl-s1">aggregator_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"10KReportAggregator"</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are the 10-K Report Aggregator, responsible for synthesizing and summarizing the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator. Your goal is to create a comprehensive, coherent, and insightful summary of the 10-K SEC report.</span> <span class="pl-s"></span> <span class="pl-s">Key responsibilities:</span> <span class="pl-s">1. Integrate the financial analysis, risk assessment, and business strategy evaluation into a unified report.</span> <span class="pl-s">2. Identify and highlight the most critical information and insights from each specialist's analysis.</span> <span class="pl-s">3. Reconcile any conflicting information or interpretations among the specialists' reports.</span> <span class="pl-s">4. Provide a balanced view of the company's overall performance, risks, and strategic position.</span> <span class="pl-s">5. Summarize key findings and their potential implications for investors and stakeholders.</span> <span class="pl-s">6. Identify any areas where further investigation or clarification may be needed.</span> <span class="pl-s"></span> <span class="pl-s">Your final report should be well-structured, easy to understand, and provide a holistic view of the company based on the 10-K SEC report. It should offer valuable insights for decision-making while acknowledging any limitations or uncertainties in the analysis."""</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"10k_report_aggregator_state.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">return_step_meta</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-c"># Create the Mixture of Agents class</span> <span class="pl-s1">moa</span> <span class="pl-c1">=</span> <span class="pl-en">MixtureOfAgents</span>( <span class="pl-s1">agents</span><span class="pl-c1">=</span>[<span class="pl-s1">agent1</span>, <span class="pl-s1">agent2</span>, <span class="pl-s1">agent3</span>], <span class="pl-s1">aggregator_agent</span><span class="pl-c1">=</span><span class="pl-s1">aggregator_agent</span>, <span class="pl-s1">aggregator_system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""As the 10-K Report Aggregator, your task is to synthesize the analyses provided by the Financial Statement Analyzer, Risk Assessment Specialist, and Business Strategy Evaluator into a comprehensive and coherent report. </span> <span class="pl-s"></span> <span class="pl-s">Follow these steps:</span> <span class="pl-s">1. Review and summarize the key points from each specialist's analysis.</span> <span class="pl-s">2. Identify common themes and insights across the analyses.</span> <span class="pl-s">3. Highlight any discrepancies or conflicting interpretations, if present.</span> <span class="pl-s">4. Provide a balanced and integrated view of the company's financial health, risks, and strategic position.</span> <span class="pl-s">5. Summarize the most critical findings and their potential impact on investors and stakeholders.</span> <span class="pl-s">6. Suggest areas for further investigation or monitoring, if applicable.</span> <span class="pl-s"></span> <span class="pl-s">Your final output should be a well-structured, insightful report that offers a holistic view of the company based on the 10-K SEC report analysis."""</span>, <span class="pl-s1">layers</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, ) <span class="pl-c"># Example usage</span> <span class="pl-s1">company_name</span> <span class="pl-c1">=</span> <span class="pl-s">"NVIDIA"</span> <span class="pl-s1">out</span> <span class="pl-c1">=</span> <span class="pl-s1">moa</span>.<span class="pl-c1">run</span>( <span class="pl-s">f"Analyze the latest 10-K SEC report for <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">company_name</span><span class="pl-kos">}</span></span>. Provide a comprehensive summary of the company's financial performance, risk profile, and business strategy."</span> ) <span class="pl-en">print</span>(<span class="pl-s1">out</span>)</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">SpreadSheetSwarm</h2><a id="user-content-spreadsheetswarm" class="anchor" aria-label="Permalink: SpreadSheetSwarm" href="#spreadsheetswarm"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>SpreadSheetSwarm</code> is designed for concurrent management and oversight of thousands of agents, facilitating a one-to-many approach for efficient task processing and output analysis.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Key Features</h3><a id="user-content-key-features" class="anchor" aria-label="Permalink: Key Features" href="#key-features"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ul dir="auto"> <li><strong>Concurrency</strong>: Enables the simultaneous execution of multiple agents, significantly reducing processing time and increasing overall system efficiency.</li> <li><strong>One-to-Many</strong>: Allows a single task to be dynamically distributed among multiple agents, ensuring that each agent is utilized to its full potential.</li> <li><strong>Scalability</strong>: Supports the integration of thousands of agents, making it an ideal solution for large-scale task processing and data analysis.</li> </ul> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods-4" class="anchor" aria-label="Permalink: Methods" href="#methods-4"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>__init__</code></td> <td>Initialize the SpreadSheetSwarm</td> <td><code>name</code>: Name of the swarm<br><code>description</code>: Description of the swarm<br><code>agents</code>: List of Agent objects<br><code>autosave_on</code>: Boolean to enable autosave<br><code>save_file_path</code>: Path to save the spreadsheet<br><code>run_all_agents</code>: Boolean to run all agents or not<br><code>max_loops</code>: Maximum number of loops</td> <td>None</td> </tr> <tr> <td><code>run</code></td> <td>Execute the swarm</td> <td><code>task</code>: Input task for the swarm</td> <td>Dictionary of agent outputs</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs-4" class="anchor" aria-label="Permalink: Inputs" href="#inputs-4"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>name</code></td> <td>str</td> <td>Name of the swarm</td> </tr> <tr> <td><code>description</code></td> <td>str</td> <td>Description of the swarm's purpose</td> </tr> <tr> <td><code>agents</code></td> <td>List[Agent]</td> <td>List of Agent objects to be used in the swarm</td> </tr> <tr> <td><code>autosave_on</code></td> <td>bool</td> <td>Enable autosaving of results</td> </tr> <tr> <td><code>save_file_path</code></td> <td>str</td> <td>Path to save the spreadsheet results</td> </tr> <tr> <td><code>run_all_agents</code></td> <td>bool</td> <td>Whether to run all agents or select based on relevance</td> </tr> <tr> <td><code>max_loops</code></td> <td>int</td> <td>Maximum number of processing loops</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output-4" class="anchor" aria-label="Permalink: Output" href="#output-4"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns a dictionary containing the outputs of each agent that processed the task.</p> <p dir="auto"><a href="https://docs.swarms.world/en/latest/swarms/structs/spreadsheet_swarm/" rel="nofollow">Learn more at the docs here:</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from swarms import Agent, SpreadSheetSwarm from swarm_models import OpenAIChat # Define custom system prompts for each social media platform TWITTER_AGENT_SYS_PROMPT = &quot;&quot;&quot; You are a Twitter marketing expert specializing in real estate. Your task is to create engaging, concise tweets to promote properties, analyze trends to maximize engagement, and use appropriate hashtags and timing to reach potential buyers. &quot;&quot;&quot; INSTAGRAM_AGENT_SYS_PROMPT = &quot;&quot;&quot; You are an Instagram marketing expert focusing on real estate. Your task is to create visually appealing posts with engaging captions and hashtags to showcase properties, targeting specific demographics interested in real estate. &quot;&quot;&quot; FACEBOOK_AGENT_SYS_PROMPT = &quot;&quot;&quot; You are a Facebook marketing expert for real estate. Your task is to craft posts optimized for engagement and reach on Facebook, including using images, links, and targeted messaging to attract potential property buyers. &quot;&quot;&quot; LINKEDIN_AGENT_SYS_PROMPT = &quot;&quot;&quot; You are a LinkedIn marketing expert for the real estate industry. Your task is to create professional and informative posts, highlighting property features, market trends, and investment opportunities, tailored to professionals and investors. &quot;&quot;&quot; EMAIL_AGENT_SYS_PROMPT = &quot;&quot;&quot; You are an Email marketing expert specializing in real estate. Your task is to write compelling email campaigns to promote properties, focusing on personalization, subject lines, and effective call-to-action strategies to drive conversions. &quot;&quot;&quot; # Initialize your agents for different social media platforms agents = [ Agent( agent_name=&quot;Twitter-RealEstate-Agent&quot;, system_prompt=TWITTER_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o&quot;, max_loops=1, dynamic_temperature_enabled=True, saved_state_path=&quot;twitter_realestate_agent.json&quot;, user_name=&quot;realestate_swarms&quot;, retry_attempts=1, ), Agent( agent_name=&quot;Instagram-RealEstate-Agent&quot;, system_prompt=INSTAGRAM_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o&quot;, max_loops=1, dynamic_temperature_enabled=True, saved_state_path=&quot;instagram_realestate_agent.json&quot;, user_name=&quot;realestate_swarms&quot;, retry_attempts=1, ), Agent( agent_name=&quot;Facebook-RealEstate-Agent&quot;, system_prompt=FACEBOOK_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o&quot;, max_loops=1, dynamic_temperature_enabled=True, saved_state_path=&quot;facebook_realestate_agent.json&quot;, user_name=&quot;realestate_swarms&quot;, retry_attempts=1, ), Agent( agent_name=&quot;LinkedIn-RealEstate-Agent&quot;, system_prompt=LINKEDIN_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o&quot;, max_loops=1, dynamic_temperature_enabled=True, saved_state_path=&quot;linkedin_realestate_agent.json&quot;, user_name=&quot;realestate_swarms&quot;, retry_attempts=1, ), Agent( agent_name=&quot;Email-RealEstate-Agent&quot;, system_prompt=EMAIL_AGENT_SYS_PROMPT, model_name=&quot;gpt-4o&quot;, max_loops=1, dynamic_temperature_enabled=True, saved_state_path=&quot;email_realestate_agent.json&quot;, user_name=&quot;realestate_swarms&quot;, retry_attempts=1, ), ] # Create a Swarm with the list of agents swarm = SpreadSheetSwarm( name=&quot;Real-Estate-Marketing-Swarm&quot;, description=&quot;A swarm that processes real estate marketing tasks using multiple agents on different threads.&quot;, agents=agents, autosave_on=True, save_file_path=&quot;real_estate_marketing_spreadsheet.csv&quot;, run_all_agents=False, max_loops=2, ) # Run the swarm swarm.run( task=&quot;&quot;&quot; Create posts to promote luxury properties in North Texas, highlighting their features, location, and investment potential. Include relevant hashtags, images, and engaging captions. Property: $10,399,000 1609 Meandering Way Dr, Roanoke, TX 76262 Link to the property: https://www.zillow.com/homedetails/1609-Meandering-Way-Dr-Roanoke-TX-76262/308879785_zpid/ What's special Unveiling a new custom estate in the prestigious gated Quail Hollow Estates! This impeccable residence, set on a sprawling acre surrounded by majestic trees, features a gourmet kitchen equipped with top-tier Subzero and Wolf appliances. European soft-close cabinets and drawers, paired with a double Cambria Quartzite island, perfect for family gatherings. The first-floor game room&amp;media room add extra layers of entertainment. Step into the outdoor sanctuary, where a sparkling pool and spa, and sunken fire pit, beckon leisure. The lavish master suite features stunning marble accents, custom his&amp;her closets, and a secure storm shelter.Throughout the home,indulge in the visual charm of designer lighting and wallpaper, elevating every space. The property is complete with a 6-car garage and a sports court, catering to the preferences of basketball or pickleball enthusiasts. This residence seamlessly combines luxury&amp;recreational amenities, making it a must-see for the discerning buyer. Facts &amp; features Interior Bedrooms &amp; bathrooms Bedrooms: 6 Bathrooms: 8 Full bathrooms: 7 1/2 bathrooms: 1 Primary bedroom Bedroom Features: Built-in Features, En Suite Bathroom, Walk-In Closet(s) Cooling Central Air, Ceiling Fan(s), Electric Appliances Included: Built-In Gas Range, Built-In Refrigerator, Double Oven, Dishwasher, Gas Cooktop, Disposal, Ice Maker, Microwave, Range, Refrigerator, Some Commercial Grade, Vented Exhaust Fan, Warming Drawer, Wine Cooler Features Wet Bar, Built-in Features, Dry Bar, Decorative/Designer Lighting Fixtures, Eat-in Kitchen, Elevator, High Speed Internet, Kitchen Island, Pantry, Smart Home, Cable TV, Walk-In Closet(s), Wired for Sound Flooring: Hardwood Has basement: No Number of fireplaces: 3 Fireplace features: Living Room, Primary Bedroom Interior area Total interior livable area: 10,466 sqft Total spaces: 12 Parking features: Additional Parking Attached garage spaces: 6 Carport spaces: 6 Features Levels: Two Stories: 2 Patio &amp; porch: Covered Exterior features: Built-in Barbecue, Barbecue, Gas Grill, Lighting, Outdoor Grill, Outdoor Living Area, Private Yard, Sport Court, Fire Pit Pool features: Heated, In Ground, Pool, Pool/Spa Combo Fencing: Wrought Iron Lot Size: 1.05 Acres Details Additional structures: Outdoor Kitchen Parcel number: 42232692 Special conditions: Standard Construction Type &amp; style Home type: SingleFamily Architectural style: Contemporary/Modern,Detached Property subtype: Single Family Residence &quot;&quot;&quot; ) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">SpreadSheetSwarm</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">OpenAIChat</span> <span class="pl-c"># Define custom system prompts for each social media platform</span> <span class="pl-c1">TWITTER_AGENT_SYS_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s">You are a Twitter marketing expert specializing in real estate. Your task is to create engaging, concise tweets to promote properties, analyze trends to maximize engagement, and use appropriate hashtags and timing to reach potential buyers.</span> <span class="pl-s">"""</span> <span class="pl-c1">INSTAGRAM_AGENT_SYS_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s">You are an Instagram marketing expert focusing on real estate. Your task is to create visually appealing posts with engaging captions and hashtags to showcase properties, targeting specific demographics interested in real estate.</span> <span class="pl-s">"""</span> <span class="pl-c1">FACEBOOK_AGENT_SYS_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s">You are a Facebook marketing expert for real estate. Your task is to craft posts optimized for engagement and reach on Facebook, including using images, links, and targeted messaging to attract potential property buyers.</span> <span class="pl-s">"""</span> <span class="pl-c1">LINKEDIN_AGENT_SYS_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s">You are a LinkedIn marketing expert for the real estate industry. Your task is to create professional and informative posts, highlighting property features, market trends, and investment opportunities, tailored to professionals and investors.</span> <span class="pl-s">"""</span> <span class="pl-c1">EMAIL_AGENT_SYS_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""</span> <span class="pl-s">You are an Email marketing expert specializing in real estate. Your task is to write compelling email campaigns to promote properties, focusing on personalization, subject lines, and effective call-to-action strategies to drive conversions.</span> <span class="pl-s">"""</span> <span class="pl-c"># Initialize your agents for different social media platforms</span> <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [ <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Twitter-RealEstate-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">TWITTER_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"twitter_realestate_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"realestate_swarms"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Instagram-RealEstate-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">INSTAGRAM_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"instagram_realestate_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"realestate_swarms"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Facebook-RealEstate-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">FACEBOOK_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"facebook_realestate_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"realestate_swarms"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"LinkedIn-RealEstate-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">LINKEDIN_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"linkedin_realestate_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"realestate_swarms"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Email-RealEstate-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">EMAIL_AGENT_SYS_PROMPT</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"email_realestate_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"realestate_swarms"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, ), ] <span class="pl-c"># Create a Swarm with the list of agents</span> <span class="pl-s1">swarm</span> <span class="pl-c1">=</span> <span class="pl-en">SpreadSheetSwarm</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Real-Estate-Marketing-Swarm"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"A swarm that processes real estate marketing tasks using multiple agents on different threads."</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, <span class="pl-s1">autosave_on</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">save_file_path</span><span class="pl-c1">=</span><span class="pl-s">"real_estate_marketing_spreadsheet.csv"</span>, <span class="pl-s1">run_all_agents</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, ) <span class="pl-c"># Run the swarm</span> <span class="pl-s1">swarm</span>.<span class="pl-c1">run</span>( <span class="pl-s1">task</span><span class="pl-c1">=</span><span class="pl-s">"""</span> <span class="pl-s"> Create posts to promote luxury properties in North Texas, highlighting their features, location, and investment potential. Include relevant hashtags, images, and engaging captions.</span> <span class="pl-s"></span> <span class="pl-s"> </span> <span class="pl-s"> Property:</span> <span class="pl-s"> $10,399,000</span> <span class="pl-s"> 1609 Meandering Way Dr, Roanoke, TX 76262</span> <span class="pl-s"> Link to the property: https://www.zillow.com/homedetails/1609-Meandering-Way-Dr-Roanoke-TX-76262/308879785_zpid/</span> <span class="pl-s"> </span> <span class="pl-s"> What's special</span> <span class="pl-s"> Unveiling a new custom estate in the prestigious gated Quail Hollow Estates! This impeccable residence, set on a sprawling acre surrounded by majestic trees, features a gourmet kitchen equipped with top-tier Subzero and Wolf appliances. European soft-close cabinets and drawers, paired with a double Cambria Quartzite island, perfect for family gatherings. The first-floor game room&amp;media room add extra layers of entertainment. Step into the outdoor sanctuary, where a sparkling pool and spa, and sunken fire pit, beckon leisure. The lavish master suite features stunning marble accents, custom his&amp;her closets, and a secure storm shelter.Throughout the home,indulge in the visual charm of designer lighting and wallpaper, elevating every space. The property is complete with a 6-car garage and a sports court, catering to the preferences of basketball or pickleball enthusiasts. This residence seamlessly combines luxury&amp;recreational amenities, making it a must-see for the discerning buyer.</span> <span class="pl-s"> </span> <span class="pl-s"> Facts &amp; features</span> <span class="pl-s"> Interior</span> <span class="pl-s"> Bedrooms &amp; bathrooms</span> <span class="pl-s"> Bedrooms: 6</span> <span class="pl-s"> Bathrooms: 8</span> <span class="pl-s"> Full bathrooms: 7</span> <span class="pl-s"> 1/2 bathrooms: 1</span> <span class="pl-s"> Primary bedroom</span> <span class="pl-s"> Bedroom</span> <span class="pl-s"> Features: Built-in Features, En Suite Bathroom, Walk-In Closet(s)</span> <span class="pl-s"> Cooling</span> <span class="pl-s"> Central Air, Ceiling Fan(s), Electric</span> <span class="pl-s"> Appliances</span> <span class="pl-s"> Included: Built-In Gas Range, Built-In Refrigerator, Double Oven, Dishwasher, Gas Cooktop, Disposal, Ice Maker, Microwave, Range, Refrigerator, Some Commercial Grade, Vented Exhaust Fan, Warming Drawer, Wine Cooler</span> <span class="pl-s"> Features</span> <span class="pl-s"> Wet Bar, Built-in Features, Dry Bar, Decorative/Designer Lighting Fixtures, Eat-in Kitchen, Elevator, High Speed Internet, Kitchen Island, Pantry, Smart Home, Cable TV, Walk-In Closet(s), Wired for Sound</span> <span class="pl-s"> Flooring: Hardwood</span> <span class="pl-s"> Has basement: No</span> <span class="pl-s"> Number of fireplaces: 3</span> <span class="pl-s"> Fireplace features: Living Room, Primary Bedroom</span> <span class="pl-s"> Interior area</span> <span class="pl-s"> Total interior livable area: 10,466 sqft</span> <span class="pl-s"> Total spaces: 12</span> <span class="pl-s"> Parking features: Additional Parking</span> <span class="pl-s"> Attached garage spaces: 6</span> <span class="pl-s"> Carport spaces: 6</span> <span class="pl-s"> Features</span> <span class="pl-s"> Levels: Two</span> <span class="pl-s"> Stories: 2</span> <span class="pl-s"> Patio &amp; porch: Covered</span> <span class="pl-s"> Exterior features: Built-in Barbecue, Barbecue, Gas Grill, Lighting, Outdoor Grill, Outdoor Living Area, Private Yard, Sport Court, Fire Pit</span> <span class="pl-s"> Pool features: Heated, In Ground, Pool, Pool/Spa Combo</span> <span class="pl-s"> Fencing: Wrought Iron</span> <span class="pl-s"> Lot</span> <span class="pl-s"> Size: 1.05 Acres</span> <span class="pl-s"> Details</span> <span class="pl-s"> Additional structures: Outdoor Kitchen</span> <span class="pl-s"> Parcel number: 42232692</span> <span class="pl-s"> Special conditions: Standard</span> <span class="pl-s"> Construction</span> <span class="pl-s"> Type &amp; style</span> <span class="pl-s"> Home type: SingleFamily</span> <span class="pl-s"> Architectural style: Contemporary/Modern,Detached</span> <span class="pl-s"> Property subtype: Single Family Residence</span> <span class="pl-s"> """</span> )</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>ForestSwarm</code></h2><a id="user-content-forestswarm" class="anchor" aria-label="Permalink: ForestSwarm" href="#forestswarm"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>ForestSwarm</code> architecture is designed for efficient task assignment by dynamically selecting the most suitable agent from a collection of trees. This is achieved through asynchronous task processing, where agents are chosen based on their relevance to the task at hand. The relevance is determined by calculating the similarity between the system prompts associated with each agent and the keywords present in the task itself. For a more in-depth understanding of how <code>ForestSwarm</code> works, please refer to the <a href="https://docs.swarms.world/en/latest/swarms/structs/forest_swarm/" rel="nofollow">official documentation</a>.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Methods</h3><a id="user-content-methods-5" class="anchor" aria-label="Permalink: Methods" href="#methods-5"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Method</th> <th>Description</th> <th>Parameters</th> <th>Return Value</th> </tr> </thead> <tbody> <tr> <td><code>__init__</code></td> <td>Initialize the ForestSwarm</td> <td><code>trees</code>: List of Tree objects</td> <td>None</td> </tr> <tr> <td><code>run</code></td> <td>Execute the ForestSwarm</td> <td><code>task</code>: Input task for the swarm</td> <td>Output from the most relevant agent</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Inputs</h3><a id="user-content-inputs-5" class="anchor" aria-label="Permalink: Inputs" href="#inputs-5"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <markdown-accessiblity-table><table> <thead> <tr> <th>Input</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>trees</code></td> <td>List[Tree]</td> <td>List of Tree objects, each containing TreeAgent objects</td> </tr> <tr> <td><code>task</code></td> <td>str</td> <td>The task to be processed by the ForestSwarm</td> </tr> </tbody> </table></markdown-accessiblity-table> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Output</h3><a id="user-content-output-5" class="anchor" aria-label="Permalink: Output" href="#output-5"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>run</code> method returns the output from the most relevant agent selected based on the input task.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from swarms import TreeAgent, Tree, ForestSwarm # Create agents with varying system prompts and dynamically generated distances/keywords agents_tree1 = [ TreeAgent( system_prompt=&quot;&quot;&quot;You are an expert Stock Analysis Agent with deep knowledge of financial markets, technical analysis, and fundamental analysis. Your primary function is to analyze stock performance, market trends, and provide actionable insights. When analyzing stocks: 1. Always start with a brief overview of the current market conditions. 2. Use a combination of technical indicators (e.g., moving averages, RSI, MACD) and fundamental metrics (e.g., P/E ratio, EPS growth, debt-to-equity). 3. Consider both short-term and long-term perspectives in your analysis. 4. Provide clear buy, hold, or sell recommendations with supporting rationale. 5. Highlight potential risks and opportunities specific to each stock or sector. 6. Use bullet points for clarity when listing key points or metrics. 7. If relevant, compare the stock to its peers or sector benchmarks. Remember to maintain objectivity and base your analysis on factual data. If asked about future performance, always include a disclaimer about market unpredictability. Your goal is to provide comprehensive, accurate, and actionable stock analysis to inform investment decisions.&quot;&quot;&quot;, agent_name=&quot;Stock Analysis Agent&quot;, ), TreeAgent( system_prompt=&quot;&quot;&quot;You are a highly skilled Financial Planning Agent, specializing in personal and corporate financial strategies. Your role is to provide comprehensive financial advice tailored to each client's unique situation. When creating financial plans: 1. Begin by asking key questions about the client's financial goals, current situation, and risk tolerance. 2. Develop a holistic view of the client's finances, including income, expenses, assets, and liabilities. 3. Create detailed, step-by-step action plans to achieve financial goals. 4. Provide specific recommendations for budgeting, saving, and investing. 5. Consider tax implications and suggest tax-efficient strategies. 6. Incorporate risk management and insurance planning into your recommendations. 7. Use charts or tables to illustrate financial projections and scenarios. 8. Regularly suggest reviewing and adjusting the plan as circumstances change. Always prioritize the client's best interests and adhere to fiduciary standards. Explain complex financial concepts in simple terms, and be prepared to justify your recommendations with data and reasoning.&quot;&quot;&quot;, agent_name=&quot;Financial Planning Agent&quot;, ), TreeAgent( agent_name=&quot;Retirement Strategy Agent&quot;, system_prompt=&quot;&quot;&quot;You are a specialized Retirement Strategy Agent, focused on helping individuals and couples plan for a secure and comfortable retirement. Your expertise covers various aspects of retirement planning, including savings strategies, investment allocation, and income generation during retirement. When developing retirement strategies: 1. Start by assessing the client's current age, desired retirement age, and expected lifespan. 2. Calculate retirement savings goals based on desired lifestyle and projected expenses. 3. Analyze current retirement accounts (e.g., 401(k), IRA) and suggest optimization strategies. 4. Provide guidance on asset allocation and rebalancing as retirement approaches. 5. Explain various retirement income sources (e.g., Social Security, pensions, annuities). 6. Discuss healthcare costs and long-term care planning. 7. Offer strategies for tax-efficient withdrawals during retirement. 8. Consider estate planning and legacy goals in your recommendations. Use Monte Carlo simulations or other statistical tools to illustrate the probability of retirement success. Always emphasize the importance of starting early and the power of compound interest. Be prepared to adjust strategies based on changing market conditions or personal circumstances.&quot;&quot;&quot;, ), ] agents_tree2 = [ TreeAgent( system_prompt=&quot;&quot;&quot;You are a knowledgeable Tax Filing Agent, specializing in personal and business tax preparation and strategy. Your role is to ensure accurate tax filings while maximizing legitimate deductions and credits. When assisting with tax matters: 1. Start by gathering all necessary financial information and documents. 2. Stay up-to-date with the latest tax laws and regulations, including state-specific rules. 3. Identify all applicable deductions and credits based on the client's situation. 4. Provide step-by-step guidance for completing tax forms accurately. 5. Explain tax implications of various financial decisions. 6. Offer strategies for tax-efficient investing and income management. 7. Assist with estimated tax payments for self-employed individuals or businesses. 8. Advise on record-keeping practices for tax purposes. Always prioritize compliance with tax laws while ethically minimizing tax liability. Be prepared to explain complex tax concepts in simple terms and provide rationale for your recommendations. If a situation is beyond your expertise, advise consulting a certified tax professional or IRS resources.&quot;&quot;&quot;, agent_name=&quot;Tax Filing Agent&quot;, ), TreeAgent( system_prompt=&quot;&quot;&quot;You are a sophisticated Investment Strategy Agent, adept at creating and managing investment portfolios to meet diverse financial goals. Your expertise covers various asset classes, market analysis, and risk management techniques. When developing investment strategies: 1. Begin by assessing the client's investment goals, time horizon, and risk tolerance. 2. Provide a comprehensive overview of different asset classes and their risk-return profiles. 3. Create diversified portfolio recommendations based on modern portfolio theory. 4. Explain the benefits and risks of various investment vehicles (e.g., stocks, bonds, ETFs, mutual funds). 5. Incorporate both passive and active investment strategies as appropriate. 6. Discuss the importance of regular portfolio rebalancing and provide a rebalancing strategy. 7. Consider tax implications of investment decisions and suggest tax-efficient strategies. 8. Provide ongoing market analysis and suggest portfolio adjustments as needed. Use historical data and forward-looking projections to illustrate potential outcomes. Always emphasize the importance of long-term investing and the risks of market timing. Be prepared to explain complex investment concepts in clear, accessible language.&quot;&quot;&quot;, agent_name=&quot;Investment Strategy Agent&quot;, ), TreeAgent( system_prompt=&quot;&quot;&quot;You are a specialized ROTH IRA Agent, focusing on the intricacies of Roth Individual Retirement Accounts. Your role is to provide expert guidance on Roth IRA rules, benefits, and strategies to maximize their value for retirement planning. When advising on Roth IRAs: 1. Explain the fundamental differences between traditional and Roth IRAs. 2. Clarify Roth IRA contribution limits and income eligibility requirements. 3. Discuss the tax advantages of Roth IRAs, including tax-free growth and withdrawals. 4. Provide guidance on Roth IRA conversion strategies and their tax implications. 5. Explain the five-year rule and how it affects Roth IRA withdrawals. 6. Offer strategies for maximizing Roth IRA contributions, such as the backdoor Roth IRA method. 7. Discuss how Roth IRAs fit into overall retirement and estate planning strategies. 8. Provide insights on investment choices within a Roth IRA to maximize tax-free growth. Always stay current with IRS regulations regarding Roth IRAs. Be prepared to provide numerical examples to illustrate the long-term benefits of Roth IRAs. Emphasize the importance of considering individual financial situations when making Roth IRA decisions.&quot;&quot;&quot;, agent_name=&quot;ROTH IRA Agent&quot;, ), ] # Create trees tree1 = Tree(tree_name=&quot;Financial Tree&quot;, agents=agents_tree1) tree2 = Tree(tree_name=&quot;Investment Tree&quot;, agents=agents_tree2) # Create the ForestSwarm multi_agent_structure = ForestSwarm(trees=[tree1, tree2]) # Run a task task = &quot;What are the best platforms to do our taxes on&quot; output = multi_agent_structure.run(task) print(output) "><pre><span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">TreeAgent</span>, <span class="pl-v">Tree</span>, <span class="pl-v">ForestSwarm</span> <span class="pl-c"># Create agents with varying system prompts and dynamically generated distances/keywords</span> <span class="pl-s1">agents_tree1</span> <span class="pl-c1">=</span> [ <span class="pl-en">TreeAgent</span>( <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are an expert Stock Analysis Agent with deep knowledge of financial markets, technical analysis, and fundamental analysis. Your primary function is to analyze stock performance, market trends, and provide actionable insights. When analyzing stocks:</span> <span class="pl-s"></span> <span class="pl-s">1. Always start with a brief overview of the current market conditions.</span> <span class="pl-s">2. Use a combination of technical indicators (e.g., moving averages, RSI, MACD) and fundamental metrics (e.g., P/E ratio, EPS growth, debt-to-equity).</span> <span class="pl-s">3. Consider both short-term and long-term perspectives in your analysis.</span> <span class="pl-s">4. Provide clear buy, hold, or sell recommendations with supporting rationale.</span> <span class="pl-s">5. Highlight potential risks and opportunities specific to each stock or sector.</span> <span class="pl-s">6. Use bullet points for clarity when listing key points or metrics.</span> <span class="pl-s">7. If relevant, compare the stock to its peers or sector benchmarks.</span> <span class="pl-s"></span> <span class="pl-s">Remember to maintain objectivity and base your analysis on factual data. If asked about future performance, always include a disclaimer about market unpredictability. Your goal is to provide comprehensive, accurate, and actionable stock analysis to inform investment decisions."""</span>, <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Stock Analysis Agent"</span>, ), <span class="pl-en">TreeAgent</span>( <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a highly skilled Financial Planning Agent, specializing in personal and corporate financial strategies. Your role is to provide comprehensive financial advice tailored to each client's unique situation. When creating financial plans:</span> <span class="pl-s"></span> <span class="pl-s">1. Begin by asking key questions about the client's financial goals, current situation, and risk tolerance.</span> <span class="pl-s">2. Develop a holistic view of the client's finances, including income, expenses, assets, and liabilities.</span> <span class="pl-s">3. Create detailed, step-by-step action plans to achieve financial goals.</span> <span class="pl-s">4. Provide specific recommendations for budgeting, saving, and investing.</span> <span class="pl-s">5. Consider tax implications and suggest tax-efficient strategies.</span> <span class="pl-s">6. Incorporate risk management and insurance planning into your recommendations.</span> <span class="pl-s">7. Use charts or tables to illustrate financial projections and scenarios.</span> <span class="pl-s">8. Regularly suggest reviewing and adjusting the plan as circumstances change.</span> <span class="pl-s"></span> <span class="pl-s">Always prioritize the client's best interests and adhere to fiduciary standards. Explain complex financial concepts in simple terms, and be prepared to justify your recommendations with data and reasoning."""</span>, <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial Planning Agent"</span>, ), <span class="pl-en">TreeAgent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Retirement Strategy Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a specialized Retirement Strategy Agent, focused on helping individuals and couples plan for a secure and comfortable retirement. Your expertise covers various aspects of retirement planning, including savings strategies, investment allocation, and income generation during retirement. When developing retirement strategies:</span> <span class="pl-s"></span> <span class="pl-s">1. Start by assessing the client's current age, desired retirement age, and expected lifespan.</span> <span class="pl-s">2. Calculate retirement savings goals based on desired lifestyle and projected expenses.</span> <span class="pl-s">3. Analyze current retirement accounts (e.g., 401(k), IRA) and suggest optimization strategies.</span> <span class="pl-s">4. Provide guidance on asset allocation and rebalancing as retirement approaches.</span> <span class="pl-s">5. Explain various retirement income sources (e.g., Social Security, pensions, annuities).</span> <span class="pl-s">6. Discuss healthcare costs and long-term care planning.</span> <span class="pl-s">7. Offer strategies for tax-efficient withdrawals during retirement.</span> <span class="pl-s">8. Consider estate planning and legacy goals in your recommendations.</span> <span class="pl-s"></span> <span class="pl-s">Use Monte Carlo simulations or other statistical tools to illustrate the probability of retirement success. Always emphasize the importance of starting early and the power of compound interest. Be prepared to adjust strategies based on changing market conditions or personal circumstances."""</span>, ), ] <span class="pl-s1">agents_tree2</span> <span class="pl-c1">=</span> [ <span class="pl-en">TreeAgent</span>( <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a knowledgeable Tax Filing Agent, specializing in personal and business tax preparation and strategy. Your role is to ensure accurate tax filings while maximizing legitimate deductions and credits. When assisting with tax matters:</span> <span class="pl-s"></span> <span class="pl-s">1. Start by gathering all necessary financial information and documents.</span> <span class="pl-s">2. Stay up-to-date with the latest tax laws and regulations, including state-specific rules.</span> <span class="pl-s">3. Identify all applicable deductions and credits based on the client's situation.</span> <span class="pl-s">4. Provide step-by-step guidance for completing tax forms accurately.</span> <span class="pl-s">5. Explain tax implications of various financial decisions.</span> <span class="pl-s">6. Offer strategies for tax-efficient investing and income management.</span> <span class="pl-s">7. Assist with estimated tax payments for self-employed individuals or businesses.</span> <span class="pl-s">8. Advise on record-keeping practices for tax purposes.</span> <span class="pl-s"></span> <span class="pl-s">Always prioritize compliance with tax laws while ethically minimizing tax liability. Be prepared to explain complex tax concepts in simple terms and provide rationale for your recommendations. If a situation is beyond your expertise, advise consulting a certified tax professional or IRS resources."""</span>, <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Tax Filing Agent"</span>, ), <span class="pl-en">TreeAgent</span>( <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a sophisticated Investment Strategy Agent, adept at creating and managing investment portfolios to meet diverse financial goals. Your expertise covers various asset classes, market analysis, and risk management techniques. When developing investment strategies:</span> <span class="pl-s"></span> <span class="pl-s">1. Begin by assessing the client's investment goals, time horizon, and risk tolerance.</span> <span class="pl-s">2. Provide a comprehensive overview of different asset classes and their risk-return profiles.</span> <span class="pl-s">3. Create diversified portfolio recommendations based on modern portfolio theory.</span> <span class="pl-s">4. Explain the benefits and risks of various investment vehicles (e.g., stocks, bonds, ETFs, mutual funds).</span> <span class="pl-s">5. Incorporate both passive and active investment strategies as appropriate.</span> <span class="pl-s">6. Discuss the importance of regular portfolio rebalancing and provide a rebalancing strategy.</span> <span class="pl-s">7. Consider tax implications of investment decisions and suggest tax-efficient strategies.</span> <span class="pl-s">8. Provide ongoing market analysis and suggest portfolio adjustments as needed.</span> <span class="pl-s"></span> <span class="pl-s">Use historical data and forward-looking projections to illustrate potential outcomes. Always emphasize the importance of long-term investing and the risks of market timing. Be prepared to explain complex investment concepts in clear, accessible language."""</span>, <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Investment Strategy Agent"</span>, ), <span class="pl-en">TreeAgent</span>( <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"""You are a specialized ROTH IRA Agent, focusing on the intricacies of Roth Individual Retirement Accounts. Your role is to provide expert guidance on Roth IRA rules, benefits, and strategies to maximize their value for retirement planning. When advising on Roth IRAs:</span> <span class="pl-s"></span> <span class="pl-s">1. Explain the fundamental differences between traditional and Roth IRAs.</span> <span class="pl-s">2. Clarify Roth IRA contribution limits and income eligibility requirements.</span> <span class="pl-s">3. Discuss the tax advantages of Roth IRAs, including tax-free growth and withdrawals.</span> <span class="pl-s">4. Provide guidance on Roth IRA conversion strategies and their tax implications.</span> <span class="pl-s">5. Explain the five-year rule and how it affects Roth IRA withdrawals.</span> <span class="pl-s">6. Offer strategies for maximizing Roth IRA contributions, such as the backdoor Roth IRA method.</span> <span class="pl-s">7. Discuss how Roth IRAs fit into overall retirement and estate planning strategies.</span> <span class="pl-s">8. Provide insights on investment choices within a Roth IRA to maximize tax-free growth.</span> <span class="pl-s"></span> <span class="pl-s">Always stay current with IRS regulations regarding Roth IRAs. Be prepared to provide numerical examples to illustrate the long-term benefits of Roth IRAs. Emphasize the importance of considering individual financial situations when making Roth IRA decisions."""</span>, <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"ROTH IRA Agent"</span>, ), ] <span class="pl-c"># Create trees</span> <span class="pl-s1">tree1</span> <span class="pl-c1">=</span> <span class="pl-en">Tree</span>(<span class="pl-s1">tree_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial Tree"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents_tree1</span>) <span class="pl-s1">tree2</span> <span class="pl-c1">=</span> <span class="pl-en">Tree</span>(<span class="pl-s1">tree_name</span><span class="pl-c1">=</span><span class="pl-s">"Investment Tree"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents_tree2</span>) <span class="pl-c"># Create the ForestSwarm</span> <span class="pl-s1">multi_agent_structure</span> <span class="pl-c1">=</span> <span class="pl-en">ForestSwarm</span>(<span class="pl-s1">trees</span><span class="pl-c1">=</span>[<span class="pl-s1">tree1</span>, <span class="pl-s1">tree2</span>]) <span class="pl-c"># Run a task</span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-s">"What are the best platforms to do our taxes on"</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">multi_agent_structure</span>.<span class="pl-c1">run</span>(<span class="pl-s1">task</span>) <span class="pl-en">print</span>(<span class="pl-s1">output</span>)</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto"><code>SwarmRouter</code></h2><a id="user-content-swarmrouter" class="anchor" aria-label="Permalink: SwarmRouter" href="#swarmrouter"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>SwarmRouter</code> class is a flexible routing system designed to manage different types of swarms for task execution. It provides a unified interface to interact with various swarm types, including <code>AgentRearrange</code>, <code>MixtureOfAgents</code>, <code>SpreadSheetSwarm</code>, <code>SequentialWorkflow</code>, and <code>ConcurrentWorkflow</code>. We will be continuously adding more and more swarm architectures here as we progress with new architectures.</p> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Attributes:</h4><a id="user-content-attributes" class="anchor" aria-label="Permalink: Attributes:" href="#attributes"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ul dir="auto"> <li><code>name</code> (str): Name of the SwarmRouter instance.</li> <li><code>description</code> (str): Description of the SwarmRouter instance.</li> <li><code>max_loops</code> (int): Maximum number of loops to perform.</li> <li><code>agents</code> (List[Agent]): List of Agent objects to be used in the swarm.</li> <li><code>swarm_type</code> (SwarmType): Type of swarm to be used.</li> <li><code>swarm</code> (Union[AgentRearrange, MixtureOfAgents, SpreadSheetSwarm, SequentialWorkflow, ConcurrentWorkflow]): Instantiated swarm object.</li> <li><code>logs</code> (List[SwarmLog]): List of log entries captured during operations.</li> </ul> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Methods:</h4><a id="user-content-methods-6" class="anchor" aria-label="Permalink: Methods:" href="#methods-6"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ul dir="auto"> <li><code>__init__(self, name: str, description: str, max_loops: int, agents: List[Agent], swarm_type: SwarmType, *args, **kwargs)</code>: Initialize the SwarmRouter.</li> <li><code>_create_swarm(self, *args, **kwargs)</code>: Create and return the specified swarm type.</li> <li><code>_log(self, level: str, message: str, task: str, metadata: Dict[str, Any])</code>: Create a log entry and add it to the logs list.</li> <li><code>run(self, task: str, *args, **kwargs)</code>: Run the specified task on the selected swarm.</li> <li><code>get_logs(self)</code>: Retrieve all logged entries.</li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from dotenv import load_dotenv from swarms import Agent from swarm_models import OpenAIChat from swarms.structs.swarm_router import SwarmRouter, SwarmType load_dotenv() # Get the OpenAI API key from the environment variable api_key = os.getenv(&quot;GROQ_API_KEY&quot;) # Model model = OpenAIChat( openai_api_base=&quot;https://api.groq.com/openai/v1&quot;, openai_api_key=api_key, model_name=&quot;llama-3.1-70b-versatile&quot;, temperature=0.1, ) # Define specialized system prompts for each agent DATA_EXTRACTOR_PROMPT = &quot;&quot;&quot;You are a highly specialized private equity agent focused on data extraction from various documents. Your expertise includes: 1. Extracting key financial metrics (revenue, EBITDA, growth rates, etc.) from financial statements and reports 2. Identifying and extracting important contract terms from legal documents 3. Pulling out relevant market data from industry reports and analyses 4. Extracting operational KPIs from management presentations and internal reports 5. Identifying and extracting key personnel information from organizational charts and bios Provide accurate, structured data extracted from various document types to support investment analysis.&quot;&quot;&quot; SUMMARIZER_PROMPT = &quot;&quot;&quot;You are an expert private equity agent specializing in summarizing complex documents. Your core competencies include: 1. Distilling lengthy financial reports into concise executive summaries 2. Summarizing legal documents, highlighting key terms and potential risks 3. Condensing industry reports to capture essential market trends and competitive dynamics 4. Summarizing management presentations to highlight key strategic initiatives and projections 5. Creating brief overviews of technical documents, emphasizing critical points for non-technical stakeholders Deliver clear, concise summaries that capture the essence of various documents while highlighting information crucial for investment decisions.&quot;&quot;&quot; FINANCIAL_ANALYST_PROMPT = &quot;&quot;&quot;You are a specialized private equity agent focused on financial analysis. Your key responsibilities include: 1. Analyzing historical financial statements to identify trends and potential issues 2. Evaluating the quality of earnings and potential adjustments to EBITDA 3. Assessing working capital requirements and cash flow dynamics 4. Analyzing capital structure and debt capacity 5. Evaluating financial projections and underlying assumptions Provide thorough, insightful financial analysis to inform investment decisions and valuation.&quot;&quot;&quot; MARKET_ANALYST_PROMPT = &quot;&quot;&quot;You are a highly skilled private equity agent specializing in market analysis. Your expertise covers: 1. Analyzing industry trends, growth drivers, and potential disruptors 2. Evaluating competitive landscape and market positioning 3. Assessing market size, segmentation, and growth potential 4. Analyzing customer dynamics, including concentration and loyalty 5. Identifying potential regulatory or macroeconomic impacts on the market Deliver comprehensive market analysis to assess the attractiveness and risks of potential investments.&quot;&quot;&quot; OPERATIONAL_ANALYST_PROMPT = &quot;&quot;&quot;You are an expert private equity agent focused on operational analysis. Your core competencies include: 1. Evaluating operational efficiency and identifying improvement opportunities 2. Analyzing supply chain and procurement processes 3. Assessing sales and marketing effectiveness 4. Evaluating IT systems and digital capabilities 5. Identifying potential synergies in merger or add-on acquisition scenarios Provide detailed operational analysis to uncover value creation opportunities and potential risks.&quot;&quot;&quot; # Initialize specialized agents data_extractor_agent = Agent( agent_name=&quot;Data-Extractor&quot;, system_prompt=DATA_EXTRACTOR_PROMPT, llm=model, max_loops=1, autosave=True, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;data_extractor_agent.json&quot;, user_name=&quot;pe_firm&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, ) summarizer_agent = Agent( agent_name=&quot;Document-Summarizer&quot;, system_prompt=SUMMARIZER_PROMPT, llm=model, max_loops=1, autosave=True, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;summarizer_agent.json&quot;, user_name=&quot;pe_firm&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, ) financial_analyst_agent = Agent( agent_name=&quot;Financial-Analyst&quot;, system_prompt=FINANCIAL_ANALYST_PROMPT, llm=model, max_loops=1, autosave=True, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;financial_analyst_agent.json&quot;, user_name=&quot;pe_firm&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, ) market_analyst_agent = Agent( agent_name=&quot;Market-Analyst&quot;, system_prompt=MARKET_ANALYST_PROMPT, llm=model, max_loops=1, autosave=True, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;market_analyst_agent.json&quot;, user_name=&quot;pe_firm&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, ) operational_analyst_agent = Agent( agent_name=&quot;Operational-Analyst&quot;, system_prompt=OPERATIONAL_ANALYST_PROMPT, llm=model, max_loops=1, autosave=True, verbose=True, dynamic_temperature_enabled=True, saved_state_path=&quot;operational_analyst_agent.json&quot;, user_name=&quot;pe_firm&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, ) # Initialize the SwarmRouter router = SwarmRouter( name=&quot;pe-document-analysis-swarm&quot;, description=&quot;Analyze documents for private equity due diligence and investment decision-making&quot;, max_loops=1, agents=[ data_extractor_agent, summarizer_agent, financial_analyst_agent, market_analyst_agent, operational_analyst_agent, ], swarm_type=&quot;ConcurrentWorkflow&quot;, # or &quot;SequentialWorkflow&quot; or &quot;ConcurrentWorkflow&quot; or ) # Example usage if __name__ == &quot;__main__&quot;: # Run a comprehensive private equity document analysis task result = router.run( &quot;Where is the best place to find template term sheets for series A startups. Provide links and references&quot; ) print(result) # Retrieve and print logs for log in router.get_logs(): print(f&quot;{log.timestamp} - {log.level}: {log.message}&quot;) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">dotenv</span> <span class="pl-k">import</span> <span class="pl-s1">load_dotenv</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">OpenAIChat</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">structs</span>.<span class="pl-s1">swarm_router</span> <span class="pl-k">import</span> <span class="pl-v">SwarmRouter</span>, <span class="pl-v">SwarmType</span> <span class="pl-en">load_dotenv</span>() <span class="pl-c"># Get the OpenAI API key from the environment variable</span> <span class="pl-s1">api_key</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-c1">getenv</span>(<span class="pl-s">"GROQ_API_KEY"</span>) <span class="pl-c"># Model</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">OpenAIChat</span>( <span class="pl-s1">openai_api_base</span><span class="pl-c1">=</span><span class="pl-s">"https://api.groq.com/openai/v1"</span>, <span class="pl-s1">openai_api_key</span><span class="pl-c1">=</span><span class="pl-s1">api_key</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"llama-3.1-70b-versatile"</span>, <span class="pl-s1">temperature</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>, ) <span class="pl-c"># Define specialized system prompts for each agent</span> <span class="pl-c1">DATA_EXTRACTOR_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""You are a highly specialized private equity agent focused on data extraction from various documents. Your expertise includes:</span> <span class="pl-s">1. Extracting key financial metrics (revenue, EBITDA, growth rates, etc.) from financial statements and reports</span> <span class="pl-s">2. Identifying and extracting important contract terms from legal documents</span> <span class="pl-s">3. Pulling out relevant market data from industry reports and analyses</span> <span class="pl-s">4. Extracting operational KPIs from management presentations and internal reports</span> <span class="pl-s">5. Identifying and extracting key personnel information from organizational charts and bios</span> <span class="pl-s">Provide accurate, structured data extracted from various document types to support investment analysis."""</span> <span class="pl-c1">SUMMARIZER_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""You are an expert private equity agent specializing in summarizing complex documents. Your core competencies include:</span> <span class="pl-s">1. Distilling lengthy financial reports into concise executive summaries</span> <span class="pl-s">2. Summarizing legal documents, highlighting key terms and potential risks</span> <span class="pl-s">3. Condensing industry reports to capture essential market trends and competitive dynamics</span> <span class="pl-s">4. Summarizing management presentations to highlight key strategic initiatives and projections</span> <span class="pl-s">5. Creating brief overviews of technical documents, emphasizing critical points for non-technical stakeholders</span> <span class="pl-s">Deliver clear, concise summaries that capture the essence of various documents while highlighting information crucial for investment decisions."""</span> <span class="pl-c1">FINANCIAL_ANALYST_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""You are a specialized private equity agent focused on financial analysis. Your key responsibilities include:</span> <span class="pl-s">1. Analyzing historical financial statements to identify trends and potential issues</span> <span class="pl-s">2. Evaluating the quality of earnings and potential adjustments to EBITDA</span> <span class="pl-s">3. Assessing working capital requirements and cash flow dynamics</span> <span class="pl-s">4. Analyzing capital structure and debt capacity</span> <span class="pl-s">5. Evaluating financial projections and underlying assumptions</span> <span class="pl-s">Provide thorough, insightful financial analysis to inform investment decisions and valuation."""</span> <span class="pl-c1">MARKET_ANALYST_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""You are a highly skilled private equity agent specializing in market analysis. Your expertise covers:</span> <span class="pl-s">1. Analyzing industry trends, growth drivers, and potential disruptors</span> <span class="pl-s">2. Evaluating competitive landscape and market positioning</span> <span class="pl-s">3. Assessing market size, segmentation, and growth potential</span> <span class="pl-s">4. Analyzing customer dynamics, including concentration and loyalty</span> <span class="pl-s">5. Identifying potential regulatory or macroeconomic impacts on the market</span> <span class="pl-s">Deliver comprehensive market analysis to assess the attractiveness and risks of potential investments."""</span> <span class="pl-c1">OPERATIONAL_ANALYST_PROMPT</span> <span class="pl-c1">=</span> <span class="pl-s">"""You are an expert private equity agent focused on operational analysis. Your core competencies include:</span> <span class="pl-s">1. Evaluating operational efficiency and identifying improvement opportunities</span> <span class="pl-s">2. Analyzing supply chain and procurement processes</span> <span class="pl-s">3. Assessing sales and marketing effectiveness</span> <span class="pl-s">4. Evaluating IT systems and digital capabilities</span> <span class="pl-s">5. Identifying potential synergies in merger or add-on acquisition scenarios</span> <span class="pl-s">Provide detailed operational analysis to uncover value creation opportunities and potential risks."""</span> <span class="pl-c"># Initialize specialized agents</span> <span class="pl-s1">data_extractor_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Data-Extractor"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">DATA_EXTRACTOR_PROMPT</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"data_extractor_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"pe_firm"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-s1">summarizer_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Document-Summarizer"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">SUMMARIZER_PROMPT</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"summarizer_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"pe_firm"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-s1">financial_analyst_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial-Analyst"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">FINANCIAL_ANALYST_PROMPT</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"financial_analyst_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"pe_firm"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-s1">market_analyst_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Market-Analyst"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">MARKET_ANALYST_PROMPT</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"market_analyst_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"pe_firm"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-s1">operational_analyst_agent</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Operational-Analyst"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-c1">OPERATIONAL_ANALYST_PROMPT</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">saved_state_path</span><span class="pl-c1">=</span><span class="pl-s">"operational_analyst_agent.json"</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"pe_firm"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, ) <span class="pl-c"># Initialize the SwarmRouter</span> <span class="pl-s1">router</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRouter</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"pe-document-analysis-swarm"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Analyze documents for private equity due diligence and investment decision-making"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span>[ <span class="pl-s1">data_extractor_agent</span>, <span class="pl-s1">summarizer_agent</span>, <span class="pl-s1">financial_analyst_agent</span>, <span class="pl-s1">market_analyst_agent</span>, <span class="pl-s1">operational_analyst_agent</span>, ], <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-s">"ConcurrentWorkflow"</span>, <span class="pl-c"># or "SequentialWorkflow" or "ConcurrentWorkflow" or</span> ) <span class="pl-c"># Example usage</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-c"># Run a comprehensive private equity document analysis task</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">router</span>.<span class="pl-c1">run</span>( <span class="pl-s">"Where is the best place to find template term sheets for series A startups. Provide links and references"</span> ) <span class="pl-en">print</span>(<span class="pl-s1">result</span>) <span class="pl-c"># Retrieve and print logs</span> <span class="pl-k">for</span> <span class="pl-s1">log</span> <span class="pl-c1">in</span> <span class="pl-s1">router</span>.<span class="pl-c1">get_logs</span>(): <span class="pl-en">print</span>(<span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">log</span>.<span class="pl-c1">timestamp</span><span class="pl-kos">}</span></span> - <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">log</span>.<span class="pl-c1">level</span><span class="pl-kos">}</span></span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">log</span>.<span class="pl-c1">message</span><span class="pl-kos">}</span></span>"</span>)</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Changing Swarm Types</h3><a id="user-content-changing-swarm-types" class="anchor" aria-label="Permalink: Changing Swarm Types" href="#changing-swarm-types"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">You can create multiple SwarmRouter instances with different swarm types:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sequential_router = SwarmRouter( name=&quot;SequentialRouter&quot;, agents=[ data_extractor_agent, summarizer_agent, financial_analyst_agent, market_analyst_agent, operational_analyst_agent, ], swarm_type=SwarmType.SequentialWorkflow ) concurrent_router = SwarmRouter( name=&quot;ConcurrentRouter&quot;, agents=[ data_extractor_agent, summarizer_agent, financial_analyst_agent, market_analyst_agent, operational_analyst_agent, ], swarm_type=SwarmType.ConcurrentWorkflow )"><pre><span class="pl-s1">sequential_router</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRouter</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"SequentialRouter"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span>[ <span class="pl-s1">data_extractor_agent</span>, <span class="pl-s1">summarizer_agent</span>, <span class="pl-s1">financial_analyst_agent</span>, <span class="pl-s1">market_analyst_agent</span>, <span class="pl-s1">operational_analyst_agent</span>, ], <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-v">SwarmType</span>.<span class="pl-c1">SequentialWorkflow</span> ) <span class="pl-s1">concurrent_router</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRouter</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"ConcurrentRouter"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span>[ <span class="pl-s1">data_extractor_agent</span>, <span class="pl-s1">summarizer_agent</span>, <span class="pl-s1">financial_analyst_agent</span>, <span class="pl-s1">market_analyst_agent</span>, <span class="pl-s1">operational_analyst_agent</span>, ], <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-v">SwarmType</span>.<span class="pl-c1">ConcurrentWorkflow</span> )</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">AgentRearrange</h3><a id="user-content-agentrearrange-1" class="anchor" aria-label="Permalink: AgentRearrange" href="#agentrearrange-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Use Case: Optimizing agent order for complex multi-step tasks.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="rearrange_router = SwarmRouter( name=&quot;TaskOptimizer&quot;, description=&quot;Optimize agent order for multi-step tasks&quot;, max_loops=3, agents=[ data_extractor_agent, summarizer_agent, financial_analyst_agent, market_analyst_agent, operational_analyst_agent, ], swarm_type=SwarmType.AgentRearrange, flow = f&quot;{data_extractor.name} -&gt; {analyzer.name} -&gt; {summarizer.name}&quot; ) result = rearrange_router.run(&quot;Analyze and summarize the quarterly financial report&quot;)"><pre><span class="pl-s1">rearrange_router</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRouter</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"TaskOptimizer"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Optimize agent order for multi-step tasks"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span>[ <span class="pl-s1">data_extractor_agent</span>, <span class="pl-s1">summarizer_agent</span>, <span class="pl-s1">financial_analyst_agent</span>, <span class="pl-s1">market_analyst_agent</span>, <span class="pl-s1">operational_analyst_agent</span>, ], <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-v">SwarmType</span>.<span class="pl-c1">AgentRearrange</span>, <span class="pl-s1">flow</span> <span class="pl-c1">=</span> <span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">data_extractor</span>.<span class="pl-c1">name</span><span class="pl-kos">}</span></span> -&gt; <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">analyzer</span>.<span class="pl-c1">name</span><span class="pl-kos">}</span></span> -&gt; <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">summarizer</span>.<span class="pl-c1">name</span><span class="pl-kos">}</span></span>"</span> ) <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">rearrange_router</span>.<span class="pl-c1">run</span>(<span class="pl-s">"Analyze and summarize the quarterly financial report"</span>)</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">MixtureOfAgents</h3><a id="user-content-mixtureofagents-1" class="anchor" aria-label="Permalink: MixtureOfAgents" href="#mixtureofagents-1"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Use Case: Combining diverse expert agents for comprehensive analysis.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mixture_router = SwarmRouter( name=&quot;ExpertPanel&quot;, description=&quot;Combine insights from various expert agents&quot;, max_loops=1, agents=[ data_extractor_agent, summarizer_agent, financial_analyst_agent, market_analyst_agent, operational_analyst_agent, ], swarm_type=SwarmType.MixtureOfAgents ) result = mixture_router.run(&quot;Evaluate the potential acquisition of TechStartup Inc.&quot;)"><pre><span class="pl-s1">mixture_router</span> <span class="pl-c1">=</span> <span class="pl-en">SwarmRouter</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"ExpertPanel"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Combine insights from various expert agents"</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span>[ <span class="pl-s1">data_extractor_agent</span>, <span class="pl-s1">summarizer_agent</span>, <span class="pl-s1">financial_analyst_agent</span>, <span class="pl-s1">market_analyst_agent</span>, <span class="pl-s1">operational_analyst_agent</span>, ], <span class="pl-s1">swarm_type</span><span class="pl-c1">=</span><span class="pl-v">SwarmType</span>.<span class="pl-c1">MixtureOfAgents</span> ) <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">mixture_router</span>.<span class="pl-c1">run</span>(<span class="pl-s">"Evaluate the potential acquisition of TechStartup Inc."</span>)</pre></div> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">GroupChat</h2><a id="user-content-groupchat" class="anchor" aria-label="Permalink: GroupChat" href="#groupchat"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">A production-grade multi-agent system enabling sophisticated group conversations between AI agents with customizable speaking patterns, parallel processing capabilities, and comprehensive conversation tracking.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import os from dotenv import load_dotenv from swarm_models import OpenAIChat from swarms import Agent, GroupChat, expertise_based if __name__ == &quot;__main__&quot;: load_dotenv() # Get the OpenAI API key from the environment variable api_key = os.getenv(&quot;OPENAI_API_KEY&quot;) # Create an instance of the OpenAIChat class model = OpenAIChat( openai_api_key=api_key, model_name=&quot;gpt-4o-mini&quot;, temperature=0.1, ) # Example agents agent1 = Agent( agent_name=&quot;Financial-Analysis-Agent&quot;, system_prompt=&quot;You are a financial analyst specializing in investment strategies.&quot;, llm=model, max_loops=1, autosave=False, dashboard=False, verbose=True, dynamic_temperature_enabled=True, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, streaming_on=False, ) agent2 = Agent( agent_name=&quot;Tax-Adviser-Agent&quot;, system_prompt=&quot;You are a tax adviser who provides clear and concise guidance on tax-related queries.&quot;, llm=model, max_loops=1, autosave=False, dashboard=False, verbose=True, dynamic_temperature_enabled=True, user_name=&quot;swarms_corp&quot;, retry_attempts=1, context_length=200000, output_type=&quot;string&quot;, streaming_on=False, ) agents = [agent1, agent2] chat = GroupChat( name=&quot;Investment Advisory&quot;, description=&quot;Financial and tax analysis group&quot;, agents=agents, speaker_fn=expertise_based, ) history = chat.run( &quot;How to optimize tax strategy for investments?&quot; ) print(history.model_dump_json(indent=2)) "><pre><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">dotenv</span> <span class="pl-k">import</span> <span class="pl-s1">load_dotenv</span> <span class="pl-k">from</span> <span class="pl-s1">swarm_models</span> <span class="pl-k">import</span> <span class="pl-v">OpenAIChat</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span>, <span class="pl-v">GroupChat</span>, <span class="pl-s1">expertise_based</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-en">load_dotenv</span>() <span class="pl-c"># Get the OpenAI API key from the environment variable</span> <span class="pl-s1">api_key</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-c1">getenv</span>(<span class="pl-s">"OPENAI_API_KEY"</span>) <span class="pl-c"># Create an instance of the OpenAIChat class</span> <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-en">OpenAIChat</span>( <span class="pl-s1">openai_api_key</span><span class="pl-c1">=</span><span class="pl-s1">api_key</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"gpt-4o-mini"</span>, <span class="pl-s1">temperature</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>, ) <span class="pl-c"># Example agents</span> <span class="pl-s1">agent1</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Financial-Analysis-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a financial analyst specializing in investment strategies."</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-s1">agent2</span> <span class="pl-c1">=</span> <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"Tax-Adviser-Agent"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a tax adviser who provides clear and concise guidance on tax-related queries."</span>, <span class="pl-s1">llm</span><span class="pl-c1">=</span><span class="pl-s1">model</span>, <span class="pl-s1">max_loops</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">autosave</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">dashboard</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">verbose</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">dynamic_temperature_enabled</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">user_name</span><span class="pl-c1">=</span><span class="pl-s">"swarms_corp"</span>, <span class="pl-s1">retry_attempts</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">context_length</span><span class="pl-c1">=</span><span class="pl-c1">200000</span>, <span class="pl-s1">output_type</span><span class="pl-c1">=</span><span class="pl-s">"string"</span>, <span class="pl-s1">streaming_on</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, ) <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [<span class="pl-s1">agent1</span>, <span class="pl-s1">agent2</span>] <span class="pl-s1">chat</span> <span class="pl-c1">=</span> <span class="pl-en">GroupChat</span>( <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Investment Advisory"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Financial and tax analysis group"</span>, <span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, <span class="pl-s1">speaker_fn</span><span class="pl-c1">=</span><span class="pl-s1">expertise_based</span>, ) <span class="pl-s1">history</span> <span class="pl-c1">=</span> <span class="pl-s1">chat</span>.<span class="pl-c1">run</span>( <span class="pl-s">"How to optimize tax strategy for investments?"</span> ) <span class="pl-en">print</span>(<span class="pl-s1">history</span>.<span class="pl-c1">model_dump_json</span>(<span class="pl-s1">indent</span><span class="pl-c1">=</span><span class="pl-c1">2</span>))</pre></div> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">MultiAgentRouter</h2><a id="user-content-multiagentrouter" class="anchor" aria-label="Permalink: MultiAgentRouter" href="#multiagentrouter"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The MultiAgentRouter is a swarm architecture designed to dynamically assign tasks to the most suitable agent. It achieves this through a director or boss entity that utilizes function calls to identify and allocate tasks to the agent best equipped to handle them. <a href="https://docs.swarms.world/en/latest/swarms/structs/multi_agent_router/" rel="nofollow">Check out the documentation</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from swarms import Agent from swarms.structs.multi_agent_orchestrator import MultiAgentRouter # Example usage: if __name__ == &quot;__main__&quot;: # Define some example agents agents = [ Agent( agent_name=&quot;ResearchAgent&quot;, description=&quot;Specializes in researching topics and providing detailed, factual information&quot;, system_prompt=&quot;You are a research specialist. Provide detailed, well-researched information about any topic, citing sources when possible.&quot;, model_name=&quot;openai/gpt-4o&quot;, ), Agent( agent_name=&quot;CodeExpertAgent&quot;, description=&quot;Expert in writing, reviewing, and explaining code across multiple programming languages&quot;, system_prompt=&quot;You are a coding expert. Write, review, and explain code with a focus on best practices and clean code principles.&quot;, model_name=&quot;openai/gpt-4o&quot;, ), Agent( agent_name=&quot;WritingAgent&quot;, description=&quot;Skilled in creative and technical writing, content creation, and editing&quot;, system_prompt=&quot;You are a writing specialist. Create, edit, and improve written content while maintaining appropriate tone and style.&quot;, model_name=&quot;openai/gpt-4o&quot;, ), ] # Initialize routers with different configurations router_execute = MultiAgentRouter(agents=agents, execute_task=True) # Example task task = &quot;Write a Python function to calculate fibonacci numbers&quot; try: # Process the task with execution print(&quot;\nWith task execution:&quot;) result_execute = router_execute.route_task(task) print(result_execute) except Exception as e: print(f&quot;Error occurred: {str(e)}&quot;)"><pre><span class="pl-k">from</span> <span class="pl-s1">swarms</span> <span class="pl-k">import</span> <span class="pl-v">Agent</span> <span class="pl-k">from</span> <span class="pl-s1">swarms</span>.<span class="pl-s1">structs</span>.<span class="pl-s1">multi_agent_orchestrator</span> <span class="pl-k">import</span> <span class="pl-v">MultiAgentRouter</span> <span class="pl-c"># Example usage:</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-c"># Define some example agents</span> <span class="pl-s1">agents</span> <span class="pl-c1">=</span> [ <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"ResearchAgent"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Specializes in researching topics and providing detailed, factual information"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a research specialist. Provide detailed, well-researched information about any topic, citing sources when possible."</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"openai/gpt-4o"</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"CodeExpertAgent"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Expert in writing, reviewing, and explaining code across multiple programming languages"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a coding expert. Write, review, and explain code with a focus on best practices and clean code principles."</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"openai/gpt-4o"</span>, ), <span class="pl-en">Agent</span>( <span class="pl-s1">agent_name</span><span class="pl-c1">=</span><span class="pl-s">"WritingAgent"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"Skilled in creative and technical writing, content creation, and editing"</span>, <span class="pl-s1">system_prompt</span><span class="pl-c1">=</span><span class="pl-s">"You are a writing specialist. Create, edit, and improve written content while maintaining appropriate tone and style."</span>, <span class="pl-s1">model_name</span><span class="pl-c1">=</span><span class="pl-s">"openai/gpt-4o"</span>, ), ] <span class="pl-c"># Initialize routers with different configurations</span> <span class="pl-s1">router_execute</span> <span class="pl-c1">=</span> <span class="pl-en">MultiAgentRouter</span>(<span class="pl-s1">agents</span><span class="pl-c1">=</span><span class="pl-s1">agents</span>, <span class="pl-s1">execute_task</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># Example task</span> <span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-s">"Write a Python function to calculate fibonacci numbers"</span> <span class="pl-k">try</span>: <span class="pl-c"># Process the task with execution</span> <span class="pl-en">print</span>(<span class="pl-s">"<span class="pl-cce">\n</span>With task execution:"</span>) <span class="pl-s1">result_execute</span> <span class="pl-c1">=</span> <span class="pl-s1">router_execute</span>.<span class="pl-c1">route_task</span>(<span class="pl-s1">task</span>) <span class="pl-en">print</span>(<span class="pl-s1">result_execute</span>) <span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>: <span class="pl-en">print</span>(<span class="pl-s">f"Error occurred: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">str</span>(<span class="pl-s1">e</span>)<span class="pl-kos">}</span></span>"</span>)</pre></div> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Onboarding Session</h2><a id="user-content-onboarding-session" class="anchor" aria-label="Permalink: Onboarding Session" href="#onboarding-session"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Get onboarded now with the creator and lead maintainer of Swarms, Kye Gomez, who will show you how to get started with the installation, usage examples, and starting to build your custom use case! <a href="https://cal.com/swarms/swarms-onboarding-session" rel="nofollow">CLICK HERE</a></p> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Documentation</h2><a id="user-content-documentation" class="anchor" aria-label="Permalink: Documentation" href="#documentation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Documentation is located here at: <a href="https://docs.swarms.world" rel="nofollow">docs.swarms.world</a></p> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Folder Structure</h2><a id="user-content-folder-structure" class="anchor" aria-label="Permalink: Folder Structure" href="#folder-structure"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The swarms package has been meticlously crafted for extreme use-ability and understanding, the swarms package is split up into various modules such as <code>swarms.agents</code> that holds pre-built agents, <code>swarms.structs</code> that holds a vast array of structures like <code>Agent</code> and multi agent structures. The 3 most important are <code>structs</code>, <code>models</code>, and <code>agents</code>.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="├── __init__.py ├── agents ├── artifacts ├── memory ├── schemas ├── models -&gt; swarm_models ├── prompts ├── structs ├── telemetry ├── tools ├── utils └── workers"><pre>├── __init__.py ├── agents ├── artifacts ├── memory ├── schemas ├── models -<span class="pl-k">&gt;</span> swarm_models ├── prompts ├── structs ├── telemetry ├── tools ├── utils └── workers</pre></div> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">🫶 Contributions:</h2><a id="user-content--contributions" class="anchor" aria-label="Permalink: 🫶 Contributions:" href="#-contributions"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The easiest way to contribute is to pick any issue with the <code>good first issue</code> tag 💪. Read the Contributing guidelines <a href="/kyegomez/swarms/blob/master/CONTRIBUTING.md">here</a>. Bug Report? <a href="https://github.com/swarms/gateway/issues">File here</a> | Feature Request? <a href="https://github.com/swarms/gateway/issues">File here</a></p> <p dir="auto">Swarms is an open-source project, and contributions are VERY welcome. If you want to contribute, you can create new features, fix bugs, or improve the infrastructure. Please refer to the <a href="https://github.com/kyegomez/swarms/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a> and our <a href="https://github.com/users/kyegomez/projects/1">contributing board</a> to participate in Roadmap discussions!</p> <hr> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Accelerate Backlog</h2><a id="user-content-accelerate-backlog" class="anchor" aria-label="Permalink: Accelerate Backlog" href="#accelerate-backlog"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Accelerate Bugs, Features, and Demos to implement by supporting us here:</p> <p dir="auto"><a href="https://polar.sh/kyegomez" rel="nofollow"><img src="https://camo.githubusercontent.com/79ee063abf9e6ca23dd71865d4e2f29f4c3e35ef76d960b8d9b57570b75b7e49/68747470733a2f2f706f6c61722e73682f656d6265642f66756e642d6f75722d6261636b6c6f672e7376673f6f72673d6b7965676f6d657a" data-canonical-src="https://polar.sh/embed/fund-our-backlog.svg?org=kyegomez" style="max-width: 100%;"></a></p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Community</h2><a id="user-content-community" class="anchor" aria-label="Permalink: Community" href="#community"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Join our growing community around the world, for real-time support, ideas, and discussions on Swarms 😊</p> <ul dir="auto"> <li>View our official <a href="https://docs.swarms.world" rel="nofollow">Blog</a></li> <li>Chat live with us on <a href="https://discord.gg/jM3Z6M9uMq" rel="nofollow">Discord</a></li> <li>Follow us on <a href="https://twitter.com/kyegomez" rel="nofollow">Twitter</a></li> <li>Connect with us on <a href="https://www.linkedin.com/company/the-swarm-corporation" rel="nofollow">LinkedIn</a></li> <li>Visit us on <a href="https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ" rel="nofollow">YouTube</a></li> <li><a href="https://discord.gg/AJazBmhKnr" rel="nofollow">Join the Swarms community on Discord!</a></li> <li>Join our Swarms Community Gathering every Thursday at 1pm NYC Time to unlock the potential of autonomous agents in automating your daily tasks <a href="https://lu.ma/5p2jnc2v" rel="nofollow">Sign up here</a></li> </ul> <div class="markdown-heading" dir="auto"><h1 tabindex="-1" class="heading-element" dir="auto">License</h1><a id="user-content-license" class="anchor" aria-label="Permalink: License" href="#license"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">APACHE</p> </article></div></div></div></div></div> <!-- --> <!-- --> <script type="application/json" id="__PRIMER_DATA_:R0:__">{"resolvedServerColorMode":"day"}</script></div> </react-partial> <input type="hidden" data-csrf="true" value="AVnomZ/jTs/co0VHlvV11/3LJyXY1ap4H2sYRA3w1zpFeLDWNZfty7b7eB2tSnE/xBqvw1DnA2PXosgtbyx+YQ==" /> </div> <div data-view-component="true" class="Layout-sidebar"> <div class="BorderGrid about-margin" data-pjax> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <div class="hide-sm hide-md"> <h2 class="mb-3 h4">About</h2> <p class="f4 my-3"> The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: <a href="https://swarms.ai" class="Link--inTextBlock" rel="nofollow">https://swarms.ai</a> </p> <div class="my-3 d-flex flex-items-center"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link flex-shrink-0 mr-2"> <path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path> </svg> <span class="flex-auto min-width-0 css-truncate css-truncate-target width-fit"> <a title="https://docs.swarms.world" role="link" target="_blank" rel="noopener noreferrer nofollow" class="text-bold" href="https://docs.swarms.world">docs.swarms.world</a> </span> </div> <h3 class="sr-only">Topics</h3> <div class="my-3"> <div class="f6"> <a href="/topics/machine-learning" title="Topic: machine-learning" data-view-component="true" class="topic-tag topic-tag-link"> machine-learning </a> <a href="/topics/ai" title="Topic: ai" data-view-component="true" class="topic-tag topic-tag-link"> ai </a> <a href="/topics/artificial-intelligence" title="Topic: artificial-intelligence" data-view-component="true" class="topic-tag topic-tag-link"> artificial-intelligence </a> <a href="/topics/prompt-toolkit" title="Topic: prompt-toolkit" data-view-component="true" class="topic-tag topic-tag-link"> prompt-toolkit </a> <a href="/topics/swarms" title="Topic: swarms" data-view-component="true" class="topic-tag topic-tag-link"> swarms </a> <a href="/topics/attention-mechanism" title="Topic: attention-mechanism" data-view-component="true" class="topic-tag topic-tag-link"> attention-mechanism </a> <a href="/topics/agents" title="Topic: agents" data-view-component="true" class="topic-tag topic-tag-link"> agents </a> <a href="/topics/multimodal" title="Topic: multimodal" data-view-component="true" class="topic-tag topic-tag-link"> multimodal </a> <a href="/topics/multi-modality" title="Topic: multi-modality" data-view-component="true" class="topic-tag topic-tag-link"> multi-modality </a> <a href="/topics/multi-modal-imaging" title="Topic: multi-modal-imaging" data-view-component="true" class="topic-tag topic-tag-link"> multi-modal-imaging </a> <a href="/topics/huggingface" title="Topic: huggingface" data-view-component="true" class="topic-tag topic-tag-link"> huggingface </a> <a href="/topics/transformer-models" title="Topic: transformer-models" data-view-component="true" class="topic-tag topic-tag-link"> transformer-models </a> <a href="/topics/gpt4" title="Topic: gpt4" data-view-component="true" class="topic-tag topic-tag-link"> gpt4 </a> <a href="/topics/prompt-engineering" title="Topic: prompt-engineering" data-view-component="true" class="topic-tag topic-tag-link"> prompt-engineering </a> <a href="/topics/prompting" title="Topic: prompting" data-view-component="true" class="topic-tag topic-tag-link"> prompting </a> <a href="/topics/chatgpt" title="Topic: chatgpt" data-view-component="true" class="topic-tag topic-tag-link"> chatgpt </a> <a href="/topics/langchain" title="Topic: langchain" data-view-component="true" class="topic-tag topic-tag-link"> langchain </a> <a href="/topics/gpt4all" title="Topic: gpt4all" data-view-component="true" class="topic-tag topic-tag-link"> gpt4all </a> <a href="/topics/langchain-python" title="Topic: langchain-python" data-view-component="true" class="topic-tag topic-tag-link"> langchain-python </a> <a href="/topics/tree-of-thoughts" title="Topic: tree-of-thoughts" data-view-component="true" class="topic-tag topic-tag-link"> tree-of-thoughts </a> </div> </div> <h3 class="sr-only">Resources</h3> <div class="mt-2"> <a class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:readme&quot;}" href="#readme-ov-file"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book mr-2"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> Readme </a> </div> <h3 class="sr-only">License</h3> <div class="mt-2"> <a href="#Apache-2.0-1-ov-file" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:license&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> Apache-2.0 license </a> </div> <h3 class="sr-only">Code of conduct</h3> <div class="mt-2"> <a href="#coc-ov-file" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:code of conduct&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-of-conduct mr-2"> <path d="M8.048 2.241c.964-.709 2.079-1.238 3.325-1.241a4.616 4.616 0 0 1 3.282 1.355c.41.408.757.86.996 1.428.238.568.348 1.206.347 1.968 0 2.193-1.505 4.254-3.081 5.862-1.496 1.526-3.213 2.796-4.249 3.563l-.22.163a.749.749 0 0 1-.895 0l-.221-.163c-1.036-.767-2.753-2.037-4.249-3.563C1.51 10.008.007 7.952.002 5.762a4.614 4.614 0 0 1 1.353-3.407C3.123.585 6.223.537 8.048 2.24Zm-1.153.983c-1.25-1.033-3.321-.967-4.48.191a3.115 3.115 0 0 0-.913 2.335c0 1.556 1.109 3.24 2.652 4.813C5.463 11.898 6.96 13.032 8 13.805c.353-.262.758-.565 1.191-.905l-1.326-1.223a.75.75 0 0 1 1.018-1.102l1.48 1.366c.328-.281.659-.577.984-.887L9.99 9.802a.75.75 0 1 1 1.019-1.103l1.384 1.28c.295-.329.566-.661.81-.995L12.92 8.7l-1.167-1.168c-.674-.671-1.78-.664-2.474.03-.268.269-.538.537-.802.797-.893.882-2.319.843-3.185-.032-.346-.35-.693-.697-1.043-1.047a.75.75 0 0 1-.04-1.016c.162-.191.336-.401.52-.623.62-.748 1.356-1.637 2.166-2.417Zm7.112 4.442c.313-.65.491-1.293.491-1.916v-.001c0-.614-.088-1.045-.23-1.385-.143-.339-.357-.633-.673-.949a3.111 3.111 0 0 0-2.218-.915c-1.092.003-2.165.627-3.226 1.602-.823.755-1.554 1.637-2.228 2.45l-.127.154.562.566a.755.755 0 0 0 1.066.02l.794-.79c1.258-1.258 3.312-1.31 4.594-.032.396.394.792.791 1.173 1.173Z"></path> </svg> Code of conduct </a> </div> <h3 class="sr-only">Security policy</h3> <div class="mt-2"> <a href="#security-ov-file" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:security policy&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> Security policy </a> </div> <include-fragment src="/kyegomez/swarms/hovercards/citation/sidebar_partial?tree_name=master"> </include-fragment> <div class="mt-2"> <a href="/kyegomez/swarms/activity" data-view-component="true" class="Link Link--muted"><svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-2"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span class="color-fg-muted">Activity</span></a> </div> <h3 class="sr-only">Stars</h3> <div class="mt-2"> <a href="/kyegomez/swarms/stargazers" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <strong>4.8k</strong> stars</a> </div> <h3 class="sr-only">Watchers</h3> <div class="mt-2"> <a href="/kyegomez/swarms/watchers" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye mr-2"> <path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path> </svg> <strong>58</strong> watching</a> </div> <h3 class="sr-only">Forks</h3> <div class="mt-2"> <a href="/kyegomez/swarms/forks" data-view-component="true" class="Link Link--muted"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <strong>541</strong> forks</a> </div> <div class="mt-2"> <a class="Link--muted" href="/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&amp;report=kyegomez+%28user%29"> Report repository </a> </div> </div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame"> <a href="/kyegomez/swarms/releases" data-view-component="true" class="Link--primary no-underline Link">Releases <span title="140" data-view-component="true" class="Counter">140</span></a></h2> <a class="Link--primary d-flex no-underline" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/kyegomez/swarms/releases/tag/6.8.1"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tag flex-shrink-0 mt-1 color-fg-success"> <path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path> </svg> <div class="ml-2 min-width-0"> <div class="d-flex"> <span class="css-truncate css-truncate-target text-bold mr-2" style="max-width: none;">6.8.1</span> <span title="Label: Latest" data-view-component="true" class="Label Label--success flex-shrink-0"> Latest </span> </div> <div class="text-small color-fg-muted"><relative-time datetime="2024-12-27T20:30:59Z" class="no-wrap">Dec 27, 2024</relative-time></div> </div> </a> <div data-view-component="true" class="mt-3"> <a text="small" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/kyegomez/swarms/releases" data-view-component="true" class="Link">+ 139 releases</a></div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3">Sponsor this project</h2> <include-fragment src="/kyegomez/swarms/sponsors_list?block_button=true&amp;current_repository=swarms" aria-busy="true" aria-label="Loading sponsorable links"> <div class="d-flex mb-3"> <div class="Skeleton avatar avatar-user mr-2" style="width:32px;height:32px;"></div> <div class="Skeleton Skeleton--text flex-1 flex-self-center f4">&nbsp;</div> </div> <button type="button" disabled="disabled" data-view-component="true" class="btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heart icon-sponsor mr-1 color-fg-sponsors"> <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> </svg> Sponsor </button></include-fragment> <div class="text-small mt-3"> <a href="/sponsors">Learn more about GitHub Sponsors</a> </div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <include-fragment src="/kyegomez/swarms/packages_list?current_repository=swarms" aria-busy="true" aria-label="Loading latest packages"> <h2 class="h4 mb-3"> <a href="/users/kyegomez/packages?repo_name=swarms" data-view-component="true" class="Link--primary no-underline Link d-flex flex-items-center">Packages <span title="0" hidden="hidden" data-view-component="true" class="Counter ml-1">0</span></a></h2> <div class="mb-2 d-flex flex-items-center"> <div class="Skeleton mr-2" style="width:20px;height:20px;"></div> <div class="Skeleton Skeleton--text flex-auto">&nbsp;</div> </div> <div class="mb-2 d-flex flex-items-center"> <div class="Skeleton mr-2" style="width:20px;height:20px;"></div> <div class="Skeleton Skeleton--text flex-auto">&nbsp;</div> </div> <div class="mb-2 d-flex flex-items-center"> <div class="Skeleton mr-2" style="width:20px;height:20px;"></div> <div class="Skeleton Skeleton--text flex-auto">&nbsp;</div> </div> </include-fragment> </div> </div> <div class="BorderGrid-row" > <div class="BorderGrid-cell"> <h2 class="h4 mb-3"> <a href="/kyegomez/swarms/network/dependents" data-view-component="true" class="Link--primary no-underline Link">Used by <span title="359" data-view-component="true" class="Counter">359</span></a> </h2> <a class="d-flex flex-items-center" href="/kyegomez/swarms/network/dependents"> <ul class="hx_flex-avatar-stack list-style-none min-width-0"> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/11795141?s=64&amp;v=4" width="32" height="32" alt="@gmihalis" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/434149?s=64&amp;v=4" width="32" height="32" alt="@epappas" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/95491580?s=64&amp;v=4" width="32" height="32" alt="@cihanilkilic" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar" src="https://avatars.githubusercontent.com/u/167784574?s=64&amp;v=4" width="32" height="32" alt="@The-Swarm-Corporation" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/67237803?s=64&amp;v=4" width="32" height="32" alt="@0xPriyanshuJha" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/98760976?s=64&amp;v=4" width="32" height="32" alt="@kyegomez" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar" src="https://avatars.githubusercontent.com/u/167784574?s=64&amp;v=4" width="32" height="32" alt="@The-Swarm-Corporation" /> </li> <li class="hx_flex-avatar-stack-item"> <img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/70758257?s=64&amp;v=4" width="32" height="32" alt="@gutmmm" /> </li> </ul> <span class="px-2 text-bold text-small no-wrap"> + 351 </span> </a> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3"> <a href="/kyegomez/swarms/graphs/contributors" data-view-component="true" class="Link--primary no-underline Link d-flex flex-items-center">Contributors <span title="35" data-view-component="true" class="Counter ml-1">35</span></a></h2> <ul class="list-style-none d-flex flex-wrap mb-n2"> <li class="mb-2 mr-2" > <a href="https://github.com/kyegomez" class="" data-hovercard-type="user" data-hovercard-url="/users/kyegomez/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/98760976?s=64&amp;v=4" alt="@kyegomez" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/elder-plinius" class="" data-hovercard-type="user" data-hovercard-url="/users/elder-plinius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/133052465?s=64&amp;v=4" alt="@elder-plinius" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/apps/dependabot" class="" > <img src="https://avatars.githubusercontent.com/in/29110?s=64&amp;v=4" alt="@dependabot[bot]" size="32" height="32" width="32" data-view-component="true" class="avatar" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/evelynmitchell" class="" data-hovercard-type="user" data-hovercard-url="/users/evelynmitchell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/1007591?s=64&amp;v=4" alt="@evelynmitchell" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Wyatt-Stanke" class="" data-hovercard-type="user" data-hovercard-url="/users/Wyatt-Stanke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/47758296?s=64&amp;v=4" alt="@Wyatt-Stanke" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/sambhavnoobcoder" class="" data-hovercard-type="user" data-hovercard-url="/users/sambhavnoobcoder/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/94298612?s=64&amp;v=4" alt="@sambhavnoobcoder" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/ZackBradshaw" class="" data-hovercard-type="user" data-hovercard-url="/users/ZackBradshaw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/21285642?s=64&amp;v=4" alt="@ZackBradshaw" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Occupying-Mars" class="" data-hovercard-type="user" data-hovercard-url="/users/Occupying-Mars/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/72188133?s=64&amp;v=4" alt="@Occupying-Mars" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/GoldenWind8" class="" data-hovercard-type="user" data-hovercard-url="/users/GoldenWind8/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/101370324?s=64&amp;v=4" alt="@GoldenWind8" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/vyomakesh09" class="" data-hovercard-type="user" data-hovercard-url="/users/vyomakesh09/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/54256947?s=64&amp;v=4" alt="@vyomakesh09" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/www" class="" data-hovercard-type="user" data-hovercard-url="/users/www/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/15486?s=64&amp;v=4" alt="@www" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/patrickbdevaney" class="" data-hovercard-type="user" data-hovercard-url="/users/patrickbdevaney/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/79435941?s=64&amp;v=4" alt="@patrickbdevaney" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Fadope1" class="" data-hovercard-type="user" data-hovercard-url="/users/Fadope1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/68806729?s=64&amp;v=4" alt="@Fadope1" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/eltociear" class="" data-hovercard-type="user" data-hovercard-url="/users/eltociear/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/22633385?s=64&amp;v=4" alt="@eltociear" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> </ul> <div data-view-component="true" class="mt-3"> <a text="small" href="/kyegomez/swarms/graphs/contributors" data-view-component="true" class="Link--inTextBlock Link">+ 21 contributors</a></div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3">Languages</h2> <div class="mb-2"> <span data-view-component="true" class="Progress"> <span style="background-color:#3572A5 !important;;width: 99.9%;" itemprop="keywords" data-view-component="true" class="Progress-item color-bg-success-emphasis"></span> <span style="background-color:#384d54 !important;;width: 0.1%;" itemprop="keywords" data-view-component="true" class="Progress-item color-bg-success-emphasis"></span> </span></div> <ul class="list-style-none"> <li class="d-inline"> <a class="d-inline-flex flex-items-center flex-nowrap Link--secondary no-underline text-small mr-3" href="/kyegomez/swarms/search?l=python" data-ga-click="Repository, language stats search click, location:repo overview"> <svg style="color:#3572A5;" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill mr-2"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> <span class="color-fg-default text-bold mr-1">Python</span> <span>99.9%</span> </a> </li> <li class="d-inline"> <a class="d-inline-flex flex-items-center flex-nowrap Link--secondary no-underline text-small mr-3" href="/kyegomez/swarms/search?l=dockerfile" data-ga-click="Repository, language stats search click, location:repo overview"> <svg style="color:#384d54;" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill mr-2"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> <span class="color-fg-default text-bold mr-1">Dockerfile</span> <span>0.1%</span> </a> </li> </ul> </div> </div> </div> </div> </div></div> </div> </div> </turbo-frame> </main> </div> </div> <footer class="footer pt-8 pb-6 f6 color-fg-muted p-responsive" role="contentinfo" > <h2 class='sr-only'>Footer</h2> <div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap"> <div class="d-flex flex-items-center flex-shrink-0 mx-2"> <a aria-label="Homepage" title="GitHub" class="footer-octicon mr-2" href="https://github.com"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"></path> </svg> </a> <span> &copy; 2025 GitHub,&nbsp;Inc. </span> </div> <nav aria-label="Footer"> <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3> <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading"> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to Terms&quot;,&quot;label&quot;:&quot;text:terms&quot;}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to privacy&quot;,&quot;label&quot;:&quot;text:privacy&quot;}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to security&quot;,&quot;label&quot;:&quot;text:security&quot;}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to status&quot;,&quot;label&quot;:&quot;text:status&quot;}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to docs&quot;,&quot;label&quot;:&quot;text:docs&quot;}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to contact&quot;,&quot;label&quot;:&quot;text:contact&quot;}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a> </li> <li class="mx-2" > <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;cookies&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;cookies_link_subfooter_footer&quot;}" > Manage cookies </button> </cookie-consent-link> </li> <li class="mx-2"> <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;dont_share_info&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;dont_share_info_link_subfooter_footer&quot;}" > Do not share my personal information </button> </cookie-consent-link> </li> </ul> </nav> </div> </footer> <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999" data-initial-cookie-consent-allowed="" data-cookie-consent-required="false"></ghcc-consent> <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> You can’t perform that action at this time. </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details> </template> <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div> </div> <template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> <template id="snippet-clipboard-copy-button-unpositioned"> <div class="zeroclipboard-container"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> </div> <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div> <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10