DAO Proposals & Community

View active proposals, submit new ideas, and connect with the SWARMS community.

documentation
structs

Thank you for contributing to Swarms! - Description: This PR significantly enhances the `HierarchicalSwarm` structure to improve its reliability, performance, and manageability. The core changes focus on making multi-agent task execution more robust and efficient for production environments. Key improvements include: - **Enhanced Reliability:** Implemented agent health monitoring, automatic failure detection, configurable retry mechanisms with exponential backoff, and graceful degradation. - **Improved Performance:** Enabled concurrent task execution using `ThreadPoolExecutor`, intelligent load balancing, and priority-based scheduling. - **Robust Task Management:** Added per-task timeouts, retry counts, and dependency management for complex workflows. - **Better Observability:** Introduced real-time performance metrics and comprehensive logging for easier monitoring and troubleshooting. - **Graceful Shutdown:** Added context manager support for proper resource cleanup. - Issue: None - Dependencies: None - Tag maintainer: kye@apac.ai - Twitter handle: Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/kyegomez/swarms/blob/master/CONTRIBUTING.md If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. Maintainer responsibilities: - General / Misc / if you don't know who to tag: kye@apac.ai - DataLoaders / VectorStores / Retrievers: kye@apac.ai - swarms.models: kye@apac.ai - swarms.memory: kye@apac.ai - swarms.structures: kye@apac.ai If no one reviews your PR within a few days, feel free to email Kye at kye@apac.ai See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/kyegomez/swarms <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--950.org.readthedocs.build/en/950/ <!-- readthedocs-preview swarms end -->

kyegomezProposed by kyegomez
View on GitHub →
tests

This pull request adds a new GitHub Actions workflow to automate comprehensive testing for the `swarms` project. The workflow is designed to run on pushes and pull requests to the `master` branch, ensuring that proposed changes are thoroughly tested before merging. ### New GitHub Actions Workflow for Comprehensive Testing: * **Workflow Setup**: Added a new workflow file `.github/workflows/comprehensive_tests.yml` to define the "Swarms Comprehensive Tests" workflow, triggered by pushes and pull requests to the `master` branch. * **Environment Configuration**: - Configures the testing environment using `ubuntu-latest` and Python 3.10. - Sets up dependency management with Poetry, including caching of virtual environments for faster subsequent runs. * **Test Execution**: - Installs dependencies and the `swarms` package in editable mode from the pull request code. - Runs the comprehensive test suite using Poetry, with secure handling of secrets like `OPENAI_API_KEY`. * **Test Artifacts**: Uploads the generated test report as an artifact, even if tests fail, to facilitate debugging. * **Test Data Preparation**: Creates dummy image files required for multi-modal tests to ensure self

harshalmore31Proposed by harshalmore31
View on GitHub →
[TESTS]

- One file of tests no pytest or unitest at all - Agent - Tools - Vision - MCP - Test all multi-agent structures in docs multi-agent docs - see if works - Auto upload to github issues

kyegomezProposed by kyegomez
View on GitHub →

- It currently needs a @agent_name to run in the task - If random speaker function is selected then we should it run it with the task the mention is not needed,

kyegomezProposed by kyegomez
View on GitHub →

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--942.org.readthedocs.build/en/942/ <!-- readthedocs-preview swarms end -->

dependabot[bot]Proposed by dependabot[bot]
View on GitHub →

- Improve the auto swarm builder with an evaluator, critic/jude, or a eval dataset - Task -> build the agents -> run test/eval or judge agent -> next loop of built agents

kyegomezProposed by kyegomez
View on GitHub →

This pull request solves #936 #937 with enhancements to the agent's streaming and tool execution workflows, improves error handling for API responses, and adds thread safety for live rendering. The key changes focus on better coordination between streaming and tool calls, improved logging, and ensuring thread-safe operations for concurrent agents. ### Streaming and Tool Execution Enhancements: * Added flags `expecting_tool_call` and `tool_call_completed` to manage streaming behavior during tool calls. Streaming is temporarily disabled when a tool call is expected, ensuring reliable JSON parsing. After the first tool call, streaming is re-enabled for subsequent requests. (`swarms/structs/agent.py`, [[1]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR576-R582) [[2]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR1070-R1076) [[3]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR1138-R1146) [[4]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fL2536-R2561) * Updated the `execute_tools` method to support streaming summaries if the agent is configured for streaming. Added fallback handling for non-streaming responses. (`swarms/structs/agent.py`, [swarms/structs/agent.pyL3045-L3066](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fL3045-L3066)) * Modified the `temp_llm_instance_for_tool_summary` method to allow streaming for post-tool summaries if streaming is enabled. (`swarms/structs/agent.py`, [swarms/structs/agent.pyR3017-R3028](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR3017-R3028)) ### Error Handling Improvements: * Enhanced logging in `execute_function_calls_from_api_response` to clarify when API responses are plain text rather than JSON. Changed log levels from "error" or "warning" to "debug" for non-critical cases. (`swarms/tools/base_tool.py`, [swarms/tools/base_tool.pyL2265-R2274](diffhunk://#diff-be11f5878144c8444f5e043fa18e772b9cd427b075801d60f6f0aa0bd90d79f6L2265-R2274)) ### Thread Safety for Live Rendering: * Introduced a global lock (`live_render_lock`) to ensure thread-safe usage of Rich's Live rendering. This prevents runtime errors when multiple agents stream simultaneously in different threads. (`swarms/utils/formatter.py`, [[1]](diffhunk://#diff-d7876f0d5fc8653a453a12e8d3431d4e26f7953d75b5e012ae64af9b36578a39R12-R17) [[2]](diffhunk://#diff-d7876f0d5fc8653a453a12e8d3431d4e26f7953d75b5e012ae64af9b36578a39R218-R221)

harshalmore31Proposed by harshalmore31
View on GitHub →

- When agent's parameter streaming are turned on the concurrent workflow does not stream it correctly - We should see all of the agents streaming in a table or panel view perhaps with rich ```python from swarms import Agent, ConcurrentWorkflow, SwarmRouter # Initialize market research agent market_researcher = Agent( agent_name="Market-Researcher", system_prompt="""You are a market research specialist. Your tasks include: 1. Analyzing market trends and patterns 2. Identifying market opportunities and threats 3. Evaluating competitor strategies 4. Assessing customer needs and preferences 5. Providing actionable market insights""", model_name="claude-3-5-sonnet-20240620", max_loops=1, streaming_on=True, ) # Initialize financial analyst agent financial_analyst = Agent( agent_name="Financial-Analyst", system_prompt="""You are a financial analysis expert. Your responsibilities include: 1. Analyzing financial statements 2. Evaluating investment opportunities 3. Assessing risk factors 4. Providing financial forecasts 5. Recommending financial strategies""", model_name="claude-3-5-sonnet-20240620", max_loops=1, streaming_on=True, ) # Initialize technical analyst agent technical_analyst = Agent( agent_name="Technical-Analyst", system_prompt="""You are a technical analysis specialist. Your focus areas include: 1. Analyzing price patterns and trends 2. Evaluating technical indicators 3. Identifying support and resistance levels 4. Assessing market momentum 5. Providing trading recommendations""", model_name="claude-3-5-sonnet-20240620", max_loops=1, streaming_on=True, ) # Create list of agents agents = [market_researcher, financial_analyst, technical_analyst] # Initialize the concurrent workflow workflow = ConcurrentWorkflow( name="market-analysis-workflow", agents=agents, max_loops=1, ) # Run the workflow result = workflow.run( "Analyze Tesla (TSLA) stock from market, financial, and technical perspectives" ) ```

kyegomezProposed by kyegomez
View on GitHub →

- Agent tool usage callable doesnot work with streaming enabled for some reason. - Works without streaming well, - Also need to add tool execution logging because it dissapeared ```python from typing import List import http.client import json from swarms import Agent import os def get_realtor_data_from_one_source(location: str): """ Fetch rental property data from the Realtor API for a specified location. Args: location (str): The location to search for rental properties (e.g., "Menlo Park, CA") Returns: str: JSON-formatted string containing rental property data Raises: http.client.HTTPException: If the API request fails json.JSONDecodeError: If the response cannot be parsed as JSON """ conn = http.client.HTTPSConnection( "realtor-search.p.rapidapi.com" ) headers = { "x-rapidapi-key": os.getenv("RAPIDAPI_KEY"), "x-rapidapi-host": "realtor-search.p.rapidapi.com", } # URL encode the location parameter encoded_location = location.replace(" ", "%20").replace( ",", "%2C" ) endpoint = f"/properties/search-rent?location=city%3A{encoded_location}&sortBy=best_match" conn.request( "GET", endpoint, headers=headers, ) res = conn.getresponse() data = res.read() return json.dumps(json.loads(data.decode("utf-8")), indent=2) def get_realtor_data_from_multiple_sources(locations: List[str]): """ Fetch rental property data from multiple sources for a specified location. Args: location (List[str]): List of locations to search for rental properties (e.g., ["Menlo Park, CA", "Palo Alto, CA"]) """ output = [] for location in locations: data = get_realtor_data_from_one_source(location) output.append(data) return output agent = Agent( agent_name="Rental-Property-Specialist", system_prompt=""" You are an expert rental property specialist with deep expertise in real estate analysis and tenant matching. Your core responsibilities include: 1. Property Analysis & Evaluation - Analyze rental property features and amenities - Evaluate location benefits and drawbacks - Assess property condition and maintenance needs - Compare rental rates with market standards - Review lease terms and conditions - Identify potential red flags or issues 2. Location Assessment - Analyze neighborhood safety and demographics - Evaluate proximity to amenities (schools, shopping, transit) - Research local market trends and development plans - Consider noise levels and traffic patterns - Assess parking availability and restrictions - Review zoning regulations and restrictions 3. Financial Analysis - Calculate price-to-rent ratios - Analyze utility costs and included services - Evaluate security deposit requirements - Consider additional fees (pet rent, parking, etc.) - Compare with similar properties in the area - Assess potential for rent increases 4. Tenant Matching - Match properties to tenant requirements - Consider commute distances - Evaluate pet policies and restrictions - Assess lease term flexibility - Review application requirements - Consider special accommodations needed 5. Documentation & Compliance - Review lease agreement terms - Verify property certifications - Check compliance with local regulations - Assess insurance requirements - Review maintenance responsibilities - Document property condition When analyzing properties, always consider: - Value for money - Location quality - Property condition - Lease terms fairness - Safety and security - Maintenance and management quality - Future market potential - Tenant satisfaction factors Provide clear, objective analysis while maintaining professional standards and ethical considerations.""", model_name="claude-3-sonnet-20240229", max_loops=1, verbose=True, # tools=[get_realtor_data], streaming_on=True, print_on=True, tools=[get_realtor_data_from_multiple_sources], ) print( agent.run( "What are the best properties in Menlo park and palo alto for rent under 3,000$" ) # Provide their name, address, and price, and any other link to the property. \n\n Data: {get_realtor_data_from_multiple_sources(['Menlo Park, CA', 'Palo Alto, CA'])}") ) ```

kyegomezProposed by kyegomez
View on GitHub →
bug
documentation

- Make the examples on the github readme.md much easier and simpler and formatted

kyegomezProposed by kyegomez
View on GitHub →

- Improve the layout of the docs -- basic concepts and advanced concepts [multi agent collaboration is more advanced] - Add Reference page for the modules, just reference, types, and parameters, and more

kyegomezProposed by kyegomez
View on GitHub →
10 days ago1 comments
dependencies
python

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 5.1.0 to 5.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/py-pdf/pypdf/releases">pypdf's releases</a>.</em></p> <blockquote> <h2>Version 5.7.0, 2025-06-29</h2> <h2>What's new</h2> <h3>Performance Improvements (PI)</h3> <ul> <li>Performance optimization for LZW decoding (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3329">#3329</a>) by <a href="https://github.com/henningkoertelgmg"><code>@​henningkoertelgmg</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Flate decoding for streams with faulty tail bytes (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3332">#3332</a>) by <a href="https://github.com/henningkoertelgmg"><code>@​henningkoertelgmg</code></a></li> <li>dc_creator could be a Bag as well (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3333">#3333</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Handle tree being NullObject when retrieving named destinations (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3331">#3331</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Maintenance (MAINT)</h3> <ul> <li>Move inline-image mappings to constants (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3328">#3328</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.6.1...5.7.0">Full Changelog</a></p> <h2>Version 5.6.1, 2025-06-22</h2> <h2>What's new</h2> <h3>New Features (ENH)</h3> <ul> <li>Add PDF/A XMP metadata support (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3314">#3314</a>) by <a href="https://github.com/Arya-A-Nair"><code>@​Arya-A-Nair</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Deal with annotations not being lists on merge (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3321">#3321</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Handle NullObject for cmap encoding Differences entry (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3317">#3317</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Update ruff to 0.12.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3316">#3316</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.6.0...5.6.1">Full Changelog</a></p> <h2>Version 5.6.0, 2025-06-01</h2> <h2>What's new</h2> <h3>New Features (ENH)</h3> <ul> <li>Add basic support for JBIG2 by using jbig2dec (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3163">#3163</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Fix crashes by removing unnecessary line (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3293">#3293</a>) by <a href="https://github.com/larsga"><code>@​larsga</code></a></li> <li>Add delimiters to NameObject.renumber_table (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3286">#3286</a>) by <a href="https://github.com/ztravis"><code>@​ztravis</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Handle DecodeParms being a NullObject (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3285">#3285</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Code Style (STY)</h3> <ul> <li>Update to mypy 1.16.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3300">#3300</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.5.0...5.6.0">Full Changelog</a></p> <h2>Version 5.5.0, 2025-05-11</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md">pypdf's changelog</a>.</em></p> <blockquote> <h2>Version 5.7.0, 2025-06-29</h2> <h3>Performance Improvements (PI)</h3> <ul> <li>Performance optimization for LZW decoding (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3329">#3329</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Flate decoding for streams with faulty tail bytes (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3332">#3332</a>)</li> <li>dc_creator could be a Bag as well (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3333">#3333</a>)</li> <li>Handle tree being NullObject when retrieving named destinations (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3331">#3331</a>)</li> </ul> <h3>Maintenance (MAINT)</h3> <ul> <li>Move inline-image mappings to constants (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3328">#3328</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.6.1...5.7.0">Full Changelog</a></p> <h2>Version 5.6.1, 2025-06-22</h2> <h3>New Features (ENH)</h3> <ul> <li>Add PDF/A XMP metadata support (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3314">#3314</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Deal with annotations not being lists on merge (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3321">#3321</a>)</li> <li>Handle NullObject for cmap encoding Differences entry (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3317">#3317</a>)</li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Update ruff to 0.12.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3316">#3316</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.6.0...5.6.1">Full Changelog</a></p> <h2>Version 5.6.0, 2025-06-01</h2> <h3>New Features (ENH)</h3> <ul> <li>Add basic support for JBIG2 by using jbig2dec (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3163">#3163</a>)</li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Fix crashes by removing unnecessary line (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3293">#3293</a>)</li> <li>Add delimiters to NameObject.renumber_table (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3286">#3286</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Handle DecodeParms being a NullObject (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3285">#3285</a>)</li> </ul> <h3>Code Style (STY)</h3> <ul> <li>Update to mypy 1.16.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3300">#3300</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.5.0...5.6.0">Full Changelog</a></p> <h2>Version 5.5.0, 2025-05-11</h2> <h3>New Features (ENH)</h3> <ul> <li>Add support for IndirectObject.<strong>iter</strong> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3228">#3228</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/py-pdf/pypdf/commit/323e64993cad74870aca7635e869925ed1656712"><code>323e649</code></a> REL: 5.7.0</li> <li><a href="https://github.com/py-pdf/pypdf/commit/ed645ca0a6b336c99dfac0c1c7b1d46abfc21f47"><code>ed645ca</code></a> ROB: Flate decoding for streams with faulty tail bytes (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3332">#3332</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/7c3db03e6dfc3e452e117259a06b45c8beb852d4"><code>7c3db03</code></a> TST: Fix typo</li> <li><a href="https://github.com/py-pdf/pypdf/commit/fd3e3c17f0d04c04b13faff1cd335489f3b28081"><code>fd3e3c1</code></a> TST: Add missing socket marker</li> <li><a href="https://github.com/py-pdf/pypdf/commit/bf49545c8507f2a392c8717ea8f5e31a4a44f561"><code>bf49545</code></a> STY: Remove an immediate update when creating a DictionaryObject (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3334">#3334</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/0c4e3d874253960968990e4cd7769787b79542d7"><code>0c4e3d8</code></a> ROB: dc_creator could be a Bag as well (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3333">#3333</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/245058006d42ecc940b9e6615b4960550fd43061"><code>2450580</code></a> PI: Performance optimization for LZW decoding (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3329">#3329</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/61d04c4eec98e50fbbdd185b476253c856b20af6"><code>61d04c4</code></a> ROB: Handle tree being NullObject when retrieving named destinations (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3331">#3331</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/1c03a5da83f3143b4c161321b1ead06de52a0424"><code>1c03a5d</code></a> MAINT: Move inline-image mappings to constants (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3328">#3328</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/80ace507a8a0955f7095c2f0db8475d96f3741fb"><code>80ace50</code></a> DOC: Add comments to page module (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3319">#3319</a>)</li> <li>Additional commits viewable in <a href="https://github.com/py-pdf/pypdf/compare/5.1.0...5.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pypdf&package-manager=pip&previous-version=5.1.0&new-version=5.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--930.org.readthedocs.build/en/930/ <!-- readthedocs-preview swarms end -->

dependabot[bot]Proposed by dependabot[bot]
View on GitHub →
14 days ago0 comments

**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here.

probatasProposed by probatas
View on GitHub →

**Description:** This PR implements lazy loading for the VLLM wrapper class, significantly improving initialization performance by deferring the creation of the underlying LLM and sampling parameters until they're actually needed. The implementation adds a private `_ensure_initialized()` method that creates these resources on first use, rather than at object creation time. **Key Changes:** - Modified `VLLMWrapper` to defer LLM and sampling parameters creation until first use - Created a new `_ensure_initialized()` method that loads resources on demand - Updated the `run()` and `batched_run()` methods to call `_ensure_initialized()` - Updated documentation and examples to clearly indicate the new lazy loading behavior - Fixed related code comments across the codebase for consistency **Benefits:** - Improved performance for applications that create VLLM wrappers but don't immediately use them - Reduced memory usage until the model is actually needed - Faster application startup time when working with multiple potential models **Issue:** #924 **Dependencies:** None <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--925.org.readthedocs.build/en/925/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

ascender1729Proposed by ascender1729
View on GitHub →
documentation
dependencies
python

Updates the requirements on [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/facelessuser/pymdown-extensions/releases">pymdown-extensions's releases</a>.</em></p> <blockquote> <h2>10.16</h2> <ul> <li><strong>NEW</strong>: Add early support for Python 3.14.</li> <li><strong>NEW</strong>: Drop support for Python 3.8.</li> <li><strong>NEW</strong>: Snippets: Added <code>max_retries</code> and <code>backoff_retries</code> options to configure new retry logic for HTTP 429 errors (Too Many Requests client error).</li> <li><strong>NEW</strong>: Caption: Prefix templates are now preserved exactly as specified allowing the insertion of HTML tags if desired.</li> <li><strong>FIX</strong>: Caption: Fix issue where manual numbers in auto were not respected appropriately.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/7d3d4f990463e50b1ba1e20830832285d92990c7"><code>7d3d4f9</code></a> Add early support for Python 3.14 (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2697">#2697</a>)</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/beb841e6f968b81403166d685b083fe2bde84bbc"><code>beb841e</code></a> Docs: Update JS deps</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/620d7fded457a0b5317019fa461a27f484a0d3d4"><code>620d7fd</code></a> Docs: update JS deps</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/a49f32aa4ac91d97c7c10c9abe7f654b5ec802e5"><code>a49f32a</code></a> Refactor for mypy issue</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/52a481b5591879f49baffecf4275f351d27a3759"><code>52a481b</code></a> Docs: update JS dependencies</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/2a1828accdc2371d97610fbbb574dd878e090b54"><code>2a1828a</code></a> Allow raw HTML in caption prefix (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2679">#2679</a>)</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/fbf4bf22da3bc864f24b4ee6a2c05b145fb6c304"><code>fbf4bf2</code></a> Fix issue where manual captions in auto were not respected properly (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2678">#2678</a>)</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/70cf820aae36d57cf493ca9c8c2e24ab11c6c445"><code>70cf820</code></a> Fix spelling of marketplace for GitHub (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2674">#2674</a>)</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/553251d5a68999a95b71bd155fa83b3f9a4f7997"><code>553251d</code></a> Add retry logic for rate limited HTTP errors (429) (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2669">#2669</a>)</li> <li><a href="https://github.com/facelessuser/pymdown-extensions/commit/bd2f267557e27d1482db5ad7c0a9db4c619a6004"><code>bd2f267</code></a> Drop Python 3.8 (<a href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2654">#2654</a>)</li> <li>Additional commits viewable in <a href="https://github.com/facelessuser/pymdown-extensions/compare/10.15...10.16">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--917.org.readthedocs.build/en/917/ <!-- readthedocs-preview swarms end -->

dependabot[bot]Proposed by dependabot[bot]
View on GitHub →
utils

#912 Description This PR adds support for multiple images in the agent by enhancing the img parameter in the LiteLLM class to accept both a single image path (string) or multiple image paths (list of strings). The implementation maintains backward compatibility while adding new functionality. Changes Enhanced the img parameter in run(), arun(), and related methods to accept Union[str, List[str]] type Modified _prepare_messages() method to handle both single image (string) and multiple images (list) Updated vision processing methods to process lists of images Added appropriate type hints and updated docstrings Ensured backward compatibility with existing code Implementation Details The implementation takes a simple yet effective approach by modifying the existing img parameter to accept either a single string or a list of strings. When a string is provided, it's converted to a single-item list internally for uniform processing. This approach avoids adding a new parameter and keeps the API clean while extending functionality. Single image input (backward compatibility) Multiple image inputs with both OpenAI and Anthropic models Various image formats through URLs and local files User Impact Users can now pass multiple images to the LiteLLM Wrapper in one of two ways: Previous usage (still supported) agent.run(task, img='path/to/img') New usage with multiple images agent.run(task, img=['img1', 'img2', 'img3']) No changes are required for existing code as backward compatibility is maintained. <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--916.org.readthedocs.build/en/916/ <!-- readthedocs-preview swarms end -->

WxysnxProposed by Wxysnx
View on GitHub →

- Add multiple images into the agent.run(imgs = [url_1, etc]) - Add the logic into litellm_wrapper.py

kyegomezProposed by kyegomez
View on GitHub →

- Making Products weekly - Accountant Tax Agent - Products from the Implementation of Papers -

harshalmore31Proposed by harshalmore31
View on GitHub →

[TUTORIAL][Idea] Make full stack apps with swarms and v0.dev [maybe video or blog] - Make a video on how to build a full stack application with the swarms api - Make a blog and tutorial on how to build a full stack application with the swarms api - Create back office swarm app for tax and or accounting - Cursor/personal hedge fund for stock analysis - Mini app for tree of thoughts where you can see agents reasoning in trees - Deep research app in the swarms app store styled it like: https://x.com/BrettFromDJ/status/1935776171288875214 - Use swarms app as the main account to sign in with swarms, deduct credits, create a monopoly

kyegomezProposed by kyegomez
View on GitHub →

[BLOG][Make a blog for InteractiveGroupChatSwarm] - Make a blog and post it to medium

kyegomezProposed by kyegomez
View on GitHub →

- Create an interactive groupchat video

kyegomezProposed by kyegomez
View on GitHub →
21 days ago0 comments
structs

![微信图片_20250620145403](https://github.com/user-attachments/assets/6845dc38-669b-4085-a647-3ec0db33b154) If we just want to fix the current bug, we don’t need to change a lot of code. We just need to replace “response = self.parse_llm_output(response)” with the part in the red box in the screenshot. fix #897 I've reproduced and analyzed this bug. The issue occurs in the _run method of agent.py when dealing with multi-modal requests without images. Root Cause Analysis: The main problem is that in your example code, you commented out the image upload line: python img=factory_image This causes the LLM call to receive no image input while in multi-modal mode. In agent.py, when self.call_llm(...) is executed without proper image data, it returns an empty response. This empty response is then passed to self.parse_llm_output(response), which tries to standardize the LLM output but fails because there's nothing to parse. The error becomes visible when executing: python self.short_memory.add( role=self.agent_name, content=format_dict_to_string(response), ) The format_dict_to_string() method (defined in swarms\utils\index.py) fails because it's trying to format an empty dictionary into a string. Additional Finding: I also noticed a potential circular dependency issue in the agent.py file with this function calling pattern: call_llm → run → _run → call_llm While this isn't causing the current error (as the dependency between _run → call_llm isn't fully formed), it creates a risky architecture that could lead to infinite recursion and stack overflow errors in future development. <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--906.org.readthedocs.build/en/906/ <!-- readthedocs-preview swarms end -->

WxysnxProposed by Wxysnx
View on GitHub →

This pull request introduces a comprehensive integration of Retrieval-Augmented Generation (RAG) functionality into the Swarms framework. It includes a new example script (`simple_rag_example.py`), updates to the `Agent` class to support RAG operations, and enhancements to the `AgentRAGHandler`. These changes aim to improve the framework's ability to retrieve and utilize external knowledge dynamically. ### RAG Integration Enhancements: * **New Example Script**: Added `simple_rag_example.py`, demonstrating the usage of RAG with a simple memory store and Swarms Agent. The example includes memory querying, manual saves, and integration of RAG into agent workflows. * **Agent Class Updates**: Extended the `Agent` class with methods for enabling, disabling, and managing RAG functionality, including memory queries, saving to memory, and retrieving statistics. Legacy methods were replaced with new RAG-specific handlers. [[1]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR281-R292) [[2]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR605-R627) [[3]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR2908-R2989) * **RAG Handler Enhancements**: Improved the `AgentRAGHandler` to ensure default relevance keywords are used when none are provided in the RAG configuration. ### Code Refactoring: * **Initialization Improvements**: Refactored `Agent` initialization to support RAG configuration directly and ensure proper setup of the RAG handler. Legacy methods for memory querying and handling were deprecated. [[1]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR605-R627) [[2]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fL2020-R2110) * **Memory and Tool Handling**: Updated `_run` and related methods in `Agent` to incorporate RAG operations seamlessly during task execution and final memory consolidation. [[1]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fL974-R1007) [[2]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR1191-R1199) ### Framework Updates: * **Structs Module**: Added `RAGConfig` to the Swarms `structs` module to facilitate RAG configuration management. [[1]](diffhunk://#diff-a17ecbb7ffeb5a1dd98bcbe4d602fd32d73f6826ee8747b9dfc1ef74a8b748a5R3) [[2]](diffhunk://#diff-a17ecbb7ffeb5a1dd98bcbe4d602fd32d73f6826ee8747b9dfc1ef74a8b748a5R162) * **Agent Persistence**: Enhanced `_save_additional_components` and `_reinitialize_after_load` methods to support saving and reinitializing RAG handler statistics. [[1]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR1614-R1631) [[2]](diffhunk://#diff-76dda3e4659d2af1a87d31ef5b71580793ac95d3a00e2a0aeffb288e15f5a44fR1759-R1772) #880 <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--903.org.readthedocs.build/en/903/ <!-- readthedocs-preview swarms end -->

harshalmore31Proposed by harshalmore31
View on GitHub →

**Description:** This PR introduces a concise example demonstrating how to configure and apply custom stopping conditions to a running swarm. The new example shows how to halt a swarm’s execution when a user-defined function evaluates to `True`, improving control over swarm lifecycle management. The example is linked in the documentation for swarm lifecycle control and referenced in the relevant API docs. **Key Changes:** - Added swarm_stopping_condition.py to demonstrate stopping conditions in a round-robin swarm. - Created swarm_stopping_condition.md with a code snippet and explanation. - Linked the new example in abstractswarm.md under the “Stopping Conditions” section. - Updated mkdocs.yml to include the example in the navigation. **Issue:** N/A **Dependencies:** N/A **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--899.org.readthedocs.build/en/899/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

- update the api docs with the latest changes

kyegomezProposed by kyegomez
View on GitHub →

- Add more examples about templates from the swarms organization github - add in docs/examples - Add file path in mkdocs

kyegomezProposed by kyegomez
View on GitHub →

**Description:** This PR enhances Swarms agents by enabling connectivity to multiple MCP (Modular Command Protocol) servers simultaneously, allowing tools to be executed across different microservices. The implementation supports both configuring MCP URLs directly through the agent constructor and via environment variables. **Key Features:** - Support for multiple MCP servers through `mcp_urls` parameter or `MCP_URLS` environment variable - New `handle_multiple_mcp_tools` method for executing tools across different servers - Added `execute_mcp_call` function for direct server-specific tool execution - Enhanced error handling with retry logic for reliable tool execution - Robust JSON payload extraction from model responses - Complete documentation of the multi-MCP workflow and payload format - Example servers (`weather_server.py` and `news_server.py`) for testing **Impact:** - Enables distributed tool execution across specialized microservices - Improves system architecture by separating tool concerns - Provides fault tolerance through connection to multiple servers - Maintains backward compatibility with existing single-server implementations **Issue:** Closes #881 **Testing:** - Added unit tests in `test_multi_mcp.py` - Created end-to-end examples with local MCP servers - Manual verification with demo servers **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--891.org.readthedocs.build/en/891/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →
dependencies
python

Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.11.4 to 2.11.7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/releases">pydantic's releases</a>.</em></p> <blockquote> <h2>v2.11.7 2025-06-14</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Fixes</h3> <ul> <li>Copy <code>FieldInfo</code> instance if necessary during <code>FieldInfo</code> build by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11980">pydantic/pydantic#11980</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.11.6...v2.11.7">https://github.com/pydantic/pydantic/compare/v2.11.6...v2.11.7</a></p> <h2>v2.11.6 2025-06-13</h2> <h2>v2.11.6 (2025-06-13)</h2> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Rebuild dataclass fields before schema generation by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11949">#11949</a></li> <li>Always store the original field assignment on <code>FieldInfo</code> by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11946">#11946</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.11.5...v2.11.6">https://github.com/pydantic/pydantic/compare/v2.11.5...v2.11.6</a></p> <h2>v2.11.5 2025-05-22</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Fixes</h3> <ul> <li>Check if <code>FieldInfo</code> is complete after applying type variable map by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11855">#11855</a></li> <li>Do not delete mock validator/serializer in <code>model_rebuild()</code> by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11890">#11890</a></li> <li>Do not duplicate metadata on model rebuild by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11902">#11902</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.11.4...v2.11.5">https://github.com/pydantic/pydantic/compare/v2.11.4...v2.11.5</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's changelog</a>.</em></p> <blockquote> <h2>v2.11.7 (2025-06-14)</h2> <p><a href="https://github.com/pydantic/pydantic/releases/tag/v2.11.7">GitHub release</a></p> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Copy <code>FieldInfo</code> instance if necessary during <code>FieldInfo</code> build by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11898">#11898</a></li> </ul> <h2>v2.11.6 (2025-06-13)</h2> <p><a href="https://github.com/pydantic/pydantic/releases/tag/v2.11.6">GitHub release</a></p> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Rebuild dataclass fields before schema generation by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11949">#11949</a></li> <li>Always store the original field assignment on <code>FieldInfo</code> by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11946">#11946</a></li> </ul> <h2>v2.11.5 (2025-05-22)</h2> <p><a href="https://github.com/pydantic/pydantic/releases/tag/v2.11.5">GitHub release</a></p> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Check if <code>FieldInfo</code> is complete after applying type variable map by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11855">#11855</a></li> <li>Do not delete mock validator/serializer in <code>model_rebuild()</code> by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11890">#11890</a></li> <li>Do not duplicate metadata on model rebuild by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11902">#11902</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pydantic/pydantic/commit/5f033e46c54fea1b59b6894d6527daf49475e690"><code>5f033e4</code></a> Prepare release v2.11.7</li> <li><a href="https://github.com/pydantic/pydantic/commit/c3368b83c411f421a7322959bc29f3bea4bd252a"><code>c3368b8</code></a> Copy <code>FieldInfo</code> instance if necessary during <code>FieldInfo</code> build (<a href="https://redirect.github.com/pydantic/pydantic/issues/11980">#11980</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/3987b23db4b31ff35e9fa15c21c0c1d1c9808838"><code>3987b23</code></a> Prepare release v2.11.6</li> <li><a href="https://github.com/pydantic/pydantic/commit/dc7a9d20bee55a3a6e7397ee46abfcd9057b627b"><code>dc7a9d2</code></a> Always store the original field assignment on <code>FieldInfo</code></li> <li><a href="https://github.com/pydantic/pydantic/commit/c284c279a5b8c95d32ab5ec31d2511b3b27bfa87"><code>c284c27</code></a> Rebuild dataclass fields before schema generation</li> <li><a href="https://github.com/pydantic/pydantic/commit/5e6d1dc71fe9bd832635cb2e9b4af92286fd00b8"><code>5e6d1dc</code></a> Prepare release v2.11.5</li> <li><a href="https://github.com/pydantic/pydantic/commit/1b63218c42b515bd1f6b0dd323190236ead14bdb"><code>1b63218</code></a> Do not duplicate metadata on model rebuild (<a href="https://redirect.github.com/pydantic/pydantic/issues/11902">#11902</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/5aefad873b3dfd60c419bd081ffaf0ac197c7b60"><code>5aefad8</code></a> Do not delete mock validator/serializer in <code>model_rebuild()</code></li> <li><a href="https://github.com/pydantic/pydantic/commit/8fbe6585f4d6179e5234ab61de00059c52e57975"><code>8fbe658</code></a> Check if <code>FieldInfo</code> is complete after applying type variable map</li> <li><a href="https://github.com/pydantic/pydantic/commit/12b371a0f7f800bf65daa3eaada1b4348348d9c4"><code>12b371a</code></a> Update documentation about <code>@dataclass_transform</code> support</li> <li>Additional commits viewable in <a href="https://github.com/pydantic/pydantic/compare/v2.11.4...v2.11.7">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydantic&package-manager=pip&previous-version=2.11.4&new-version=2.11.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--889.org.readthedocs.build/en/889/ <!-- readthedocs-preview swarms end -->

dependabot[bot]Proposed by dependabot[bot]
View on GitHub →

**Description:** This PR enhances the `data_to_text` utility to properly handle binary files. Previously, binary files would cause errors when the function attempted to read them as text. With this improvement, binary files are now detected by their extensions and automatically handled appropriately: 1. Added recognition for common binary file extensions (.png, .jpg, .jpeg, .gif, .bmp, .wav, .mp3, .mp4) 2. Implemented base64 encoding for binary files, allowing them to be properly represented as strings 3. Improved error handling with more descriptive messages for different file types **Technical Details:** - Created `BINARY_EXTENSIONS` set containing common binary file extensions - Modified `data_to_text()` to check file extensions and use binary mode when appropriate - Added base64 encoding for binary content to ensure proper string representation - Improved error handling with more specific exception messages **Testing:** - Added dedicated test file with tests for both binary and text file handling - Verified with `pytest tests/utils/test_data_to_text.py -q` **Impact:** - Significantly improves robustness when processing mixed file types - Enables applications to handle binary files without separate code paths - Prevents cryptic encoding errors when processing directories with mixed content **Dependencies:** None **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--885.org.readthedocs.build/en/885/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

**Description:** This PR fixes a common Python anti-pattern by replacing mutable default parameters (empty lists) with `None` across multiple swarm structure classes. This prevents the well-known issue where mutable defaults are instantiated once at definition time rather than per function call, which can lead to unexpected behavior and hard-to-debug issues. **Technical Details:** - Changed default parameters from `[]` to `None` in 11 structure classes - Added the pattern `self.agents = agents or []` inside each constructor - Classes updated include: `ConcurrentWorkflow`, `DynamicConversationalSwarm`, `GroupChat`, `InteractiveGroupChat`, `MajorityVoting`, `MALT`, `MixtureOfAgents`, `MultiAgentRouter`, `SequentialWorkflow`, `SpreadsheetSwarm`, and `SwarmRouter` - This follows the Python best practice for handling mutable default arguments **Impact:** - Prevents potential bugs where agent lists could be unexpectedly shared between instances - Makes the code more robust and follows Python best practices - Maintains backward compatibility with all existing code **Issue:** N/A **Dependencies:** None **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--884.org.readthedocs.build/en/884/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →
enhancement
FEAT
structs

- Add Multiple MCP execution to the agents by fetching a list of mcp urls - Then the agent outputs a function call - Then the function data is parsed, name is found on which server url, and then the tool is executed with the execute_mcp_call function. - then add to agent.md and agent_mcp.md docs - Create examples in the examples docs/examples folder

kyegomezProposed by kyegomez
View on GitHub →
enhancement
FEAT
structs

- Signifcantly improve RAG through a flexible and fluid system - Integrate llama index or pinecone or chromadb and create examples and docs for this - Make it easy to change embedding models and more

kyegomezProposed by kyegomez
View on GitHub →

{'status': 'ok'} {'detail': '500: An unexpected error occurred: Failed to execute MCP tools sync: This event loop is already running'} ## Problematic code is here - problematic code is here: https://github.com/kyegomez/swarms/blob/master/swarms/tools/mcp_client_call.py ```python import os import requests from dotenv import load_dotenv import json from swarms.utils.formatter import formatter load_dotenv() API_KEY = os.getenv("SWARMS_API_KEY") BASE_URL = "https://swarms-api-285321057562.us-east1.run.app" # BASE_URL = "http://localhost:8080" headers = {"x-api-key": API_KEY, "Content-Type": "application/json"} def run_health_check(): """Check if the API is healthy""" response = requests.get(f"{BASE_URL}/health", headers=headers) return response.json() def run_single_agent(): """Run a single agent with the new AgentCompletion format""" payload = { "agent_config": { "agent_name": "Research Analyst", "description": "An expert in analyzing and synthesizing research data", "system_prompt": ( "You are a Research Analyst with expertise in data analysis and synthesis. " "Your role is to analyze provided information, identify key insights, " "and present findings in a clear, structured format. " "Focus on accuracy, clarity, and actionable recommendations." ), "model_name": "claude-3-5-sonnet-20240620", "role": "worker", "max_loops": 1, "max_tokens": 8192, "temperature": 1, "auto_generate_prompt": False, "tools_list_dictionary": None, "mcp_url": "http://localhost:11434/sse", }, "task": "What are the best ways to find samples of diabetes from blood samples?", # "history": [ # { # "role": "user", # "content": "What are the best ways to find samples of diabetes from blood samples?", # } # ], } response = requests.post( f"{BASE_URL}/v1/agent/completions", headers=headers, json=payload ) return response.json() if __name__ == "__main__": # Check API health health = run_health_check() print(health) # Run single agent agent_result = run_single_agent() print(agent_result) ```

kyegomezProposed by kyegomez
View on GitHub →

**Description:** This PR adds a new `list-agents` command to the Swarms CLI that displays all agents registered in a YAML configuration file. The command loads agents from the specified YAML file, registers them, and displays their names in a formatted table. Example usage: ```bash python swarms/cli/main.py list-agents --yaml-file examples/cli_examples/agents.yaml ``` Expected output with the provided test file: ``` Registered Agents ┏━━━━━━━━━━━━━━┓ ┃ Agent Name ┃ ┡━━━━━━━━━━━━━━┩ │ Test-Agent-1 │ │ Test-Agent-2 │ └──────────────┘ ``` **Implementation Details:** - Added `list_registered_agents()` function in main.py - Added CLI argument handling for the new command - Added "list-agents" to the commands list - Added comprehensive test coverage in test_list_agents.py - Included example YAML file in examples/cli_examples/agents.yaml - Uses the `rich` library for formatted table output **Issue:** NA **Dependencies:** NA [DEMO VIDEO](https://drive.google.com/file/d/1ACVM7qUlH1NJ1YNGZLbmblRWnk4jzeWO/view?usp=sharing) **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--876.org.readthedocs.build/en/876/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

**Description:** This PR adds and improves documentation for telemetry configuration in Swarms. It explains the bootup routine, how to enable or disable telemetry via the `USE_TELEMETRY` environment variable, and details the environment variables set during initialization. The documentation helps users understand how telemetry and logging are managed, and how to control them for their use case. **Issue:** N/A **Dependencies:** N/A **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--874.org.readthedocs.build/en/874/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

**Description:** This PR optimizes the agent inference time by improving the conversation history caching mechanism in the `Conversation` class. The new implementation ensures that repeated stringification of conversation history is cached and reused, significantly reducing redundant computation during agent inference. **Key Changes:** - Refactored `Conversation` to cache the stringified conversation history. - Added a performance benchmark example (conversation_cache_example.py) demonstrating >2x speedup. - Added unit and performance tests: - test_conversation_cache_simple.py (correctness) - test_conversation_cache_perf.py (asserts at least 2x speedup) - Updated internal usage to leverage the new cache for all agent operations. **How the 2x speedup was achieved:** Previously, every call to `get_str()` rebuilt the conversation string from scratch. Now, the string is cached and only rebuilt when the conversation changes. This reduces the time spent in agent `_run` (which calls `get_str()`), resulting in a measured speedup of 2x–3x in both tests and manual benchmarks. **Files Changed:** - conversation.py (core cache logic) - agent.py (internal usage) - conversation_cache_example.py (demo/benchmark) - test_conversation_cache_simple.py (unit test) - test_conversation_cache_perf.py (performance test) [**Demo Video** ](https://drive.google.com/file/d/1MWTorBB1pbIA48DMxiw1mgKJl9PQb--z/view?usp=sharing) **Issue:** Closes #848 **Dependencies:** N/A **Tag maintainer:** @kyegomez <!-- readthedocs-preview swarms start --> ---- 📚 Documentation preview 📚: https://swarms--864.org.readthedocs.build/en/864/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub →

**Describe the bug** We need to enable the llm to output multiple function calls and execute multiple mcp tools all at once **To Reproduce** ```python from swarms import Agent from swarms.schemas.mcp_schemas import MCPConnection mcp_config = MCPConnection( url="http://0.0.0.0:8000/sse", # headers={"Authorization": "Bearer 1234567890"}, timeout=5, ) mcp_url = "http://0.0.0.0:8000/sse" # Initialize the agent agent = Agent( agent_name="Financial-Analysis-Agent", agent_description="Personal finance advisor agent", # system_prompt=FINANCIAL_AGENT_SYS_PROMPT, max_loops=1, mcp_url=mcp_url, # mcp_config=mcp_config, output_type="all", ) # Create a markdown file with initial content out = agent.run( "Fetch the price for bitcoin on both functions get_htx_crypto_price and get_crypto_price", ) print(out) ```

kyegomezProposed by kyegomez
View on GitHub →