DAO Proposals & Community

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

- Description: Added serialization/deserialization methods for logger handlers and updated save/load methods to properly handle logger serialization. - Issue: Resolves 640 (logger handler component) - Dependencies: None - Tag maintainer: @kyegomez <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--838.org.readthedocs.build/en/838/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub β†’
documentation
tests
prompts
structs
telemetry
tools
utils

## Pull Request Description: **Description**: This PR finalizes and stabilizes full **MCP (Model Context Protocol) integration** into the Swarms multi-agent architecture. It includes the following major improvements: - **MCP Server Enhancements**: - Refactored `mcp_client.py` and `mcp_server.py` to use `FastMCP` with correct async and port configurations - Fixed server binding, FastMCP initialization, and tool routing - **Agent & Client Improvements**: - Updated `agent.py` to support parallel task execution and prevent duplicate tool calls - Corrected `MCPServerSseParams` initialization and agent response formatting - Enhanced client handling with better natural language input parsing and tool schema discovery - **Testing & Workflow**: - Added new Replit workflows and refined existing ones to test interactive multi-agent MCP flows using `pytest` - Rewrote integration tests for parallel agent behavior and server communication consistency - **Output & Logging**: - Cleaned up console outputs and added visual separators in multi-agent replies - Implemented timestamped logging across all components for better observability - **Documentation**: - Expanded README and added structured markdown summaries - Provided usage examples and configuration guidelines **Issue**: N/A β€” this is the initial stable release of full MCP multi-agent integration. **Dependencies**: `fastmcp`, `langchain-openai`, `LiteLLM`, `anyio` **Tag maintainer**: @kyegomez **Twitter handle**: https://twitter.com/the_complex_one

ascender1729Proposed by ascender1729
View on GitHub β†’
26 days ago0 comments
documentation
structs
utils

Thank you for contributing to Swarms! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! 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--818.org.readthedocs.build/en/818/ <!-- readthedocs-preview swarms end -->

MohammadAminDHMProposed by MohammadAminDHM
View on GitHub β†’
about 1 month ago0 comments
documentation

This PR supports Swarms to build an agent that can be run inside Phala's TEE cloud. It includes: - [x] Docker compose file to launch the swarms agent - [x] Instructions to deploy the agent to Phala Cloud

0xshawnProposed by 0xshawn
View on GitHub β†’

Updates the requirements on [transformers](https://github.com/huggingface/transformers) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/huggingface/transformers/releases">transformers's releases</a>.</em></p> <blockquote> <h2>v4.51.0: Llama 4, Phi4-Multimodal, DeepSeek-v3, Qwen3</h2> <h2>New Model Additions</h2> <h3>Llama 4</h3> <p><img src="https://github.com/user-attachments/assets/d613b292-94b0-4902-9dc7-2d00693222e4" alt="image" /></p> <p>Llama 4, developed by Meta, introduces a new auto-regressive Mixture-of-Experts (MoE) architecture.This generation includes two models:</p> <ul> <li>The highly capable Llama 4 Maverick with 17B active parameters out of ~400B total, with 128 experts.</li> <li>The efficient Llama 4 Scout also has 17B active parameters out of ~109B total, using just 16 experts.</li> </ul> <p>Both models leverage early fusion for native multimodality, enabling them to process text and image inputs. Maverick and Scout are both trained on up to 40 trillion tokens on data encompassing 200 languages (with specific fine-tuning support for 12 languages including Arabic, Spanish, German, and Hindi).</p> <p>For deployment, Llama 4 Scout is designed for accessibility, fitting on a single server-grade GPU via on-the-fly 4-bit or 8-bit quantization, while Maverick is available in BF16 and FP8 formats. These models are released under the custom Llama 4 Community License Agreement, available on the model repositories</p> <p>Getting started with Llama 4 using transformers is straightforward. Make sure you have transformers v4.51.0 or later installed:</p> <pre><code>pip install -U transformers[hf_xet] </code></pre> <p>Here's a quick example using the instruction-tuned Maverick model responding about two images, using tensor parallel for maximum speed. You need to run this script on an instance with 8 GPUs, using a command like:</p> <pre><code>torchrun –nproc-per-instance=8 script.py </code></pre> <pre lang="py"><code>from transformers import AutoProcessor, Llama4ForConditionalGeneration import torch <p>model_id = &quot;meta-llama/Llama-4-Maverick-17B-128E-Instruct&quot;</p> <p>processor = AutoProcessor.from_pretrained(model_id) model = Llama4ForConditionalGeneration.from_pretrained( model_id, attn_implementation=&quot;flex_attention&quot;, device_map=&quot;auto&quot;, torch_dtype=torch.bfloat16, )</p> <p>url1 = &quot;<a href="https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg">https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg</a>&quot; url2 = &quot;<a href="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/cat_style_layout.png">https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/cat_style_layout.png</a>&quot; messages = [ { &quot;role&quot;: &quot;user&quot;, &quot;content&quot;: [ {&quot;type&quot;: &quot;image&quot;, &quot;url&quot;: url1}, {&quot;type&quot;: &quot;image&quot;, &quot;url&quot;: url2}, {&quot;type&quot;: &quot;text&quot;, &quot;text&quot;: &quot;Can you describe how these two images are similar, and how they differ?&quot;}, ] }, &lt;/tr&gt;&lt;/table&gt; </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76"><code>0720e20</code></a> Release: v4.51.0</li> <li><a href="https://github.com/huggingface/transformers/commit/25b7f272347a93d6fb73cad126f6f6dc88e8ce89"><code>25b7f27</code></a> Add llama4 (<a href="https://redirect.github.com/huggingface/transformers/issues/37307">#37307</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/aa40fda346b497435923ee1ac2120900653f5ab5"><code>aa40fda</code></a> Hf Xet extra (<a href="https://redirect.github.com/huggingface/transformers/issues/37305">#37305</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/e94571580ba9d0c71feaf489520383c83e167d40"><code>e945715</code></a> Fix deepspeed loading (part 2) (<a href="https://redirect.github.com/huggingface/transformers/issues/37306">#37306</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/84aa13dd85ce5ec2023561ca304c5b41343dd347"><code>84aa13d</code></a> Fix deepspeed loading (<a href="https://redirect.github.com/huggingface/transformers/issues/37281">#37281</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/0ef339ff1b63bb03a388c79bfbebec9085e10564"><code>0ef339f</code></a> Update OpenAI GPT model card (<a href="https://redirect.github.com/huggingface/transformers/issues/37255">#37255</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/46d73910d5922c154967309c26fe8460a505eb3f"><code>46d7391</code></a> Updated T5 model card with standardized format (<a href="https://redirect.github.com/huggingface/transformers/issues/37261">#37261</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/579135a2f64be5b0727ceba696e5642ba3612779"><code>579135a</code></a> Updated model card for distilbert (<a href="https://redirect.github.com/huggingface/transformers/issues/37157">#37157</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/8cd57eb73107de0353d1fe94cfe99484b738172a"><code>8cd57eb</code></a> mobilebert model card update (<a href="https://redirect.github.com/huggingface/transformers/issues/37256">#37256</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/ebe47ce3e901c0a7213dc89f9ed662ed7be64738"><code>ebe47ce</code></a> Fix: Unexpected Keys, Improve <code>run_compressed</code>, Rename Test Folder (<a href="https://redirect.github.com/huggingface/transformers/issues/37077">#37077</a>)</li> <li>Additional commits viewable in <a href="https://github.com/huggingface/transformers/compare/v4.39.0...v4.51.0">compare view</a></li> </ul> </details> <br /> You can trigger a rebase of this PR 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--812.org.readthedocs.build/en/812/ <!-- readthedocs-preview swarms end --> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

dependabot[bot]Proposed by dependabot[bot]
View on GitHub β†’
about 1 month ago0 comments
tests
utils
agents

# Add Comprehensive Test Suite for SwarmRearrange Class ## Description This PR adds a comprehensive test suite for the `SwarmRearrange` class, improving the project's test coverage and ensuring reliability. ### Features - Complete test coverage for all public methods - Thread safety verification - Error handling validation - Context manager testing - Mock-based testing for isolation ### Test Categories 1. **Basic Functionality** - Initialization tests - Reliability checks - Swarm management (add/remove) - History tracking - Flow management 2. **Error Handling** - Input validation - Edge cases - Exception handling 3. **Thread Safety** - Concurrent operations - Data integrity 4. **Resource Management** - Context manager functionality - Cleanup verification ### Testing All tests can be run using: ```bash pytest tests/structs/test_swarm_rearrange.py -v ``` ### Impact - Improved code reliability - Better error detection - Enhanced maintainability - Thread safety verification ## Related Issues - Part of the project's testing infrastructure improvement - Addresses the need for comprehensive test coverage ## Dependencies - pytest - unittest.mock <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--804.org.readthedocs.build/en/804/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub β†’
about 1 month ago0 comments
tests
utils
agents

# Add TypeDB Integration ## Description This PR adds TypeDB integration to the Swarms project, providing a robust graph database wrapper for knowledge representation and relationship modeling. The implementation includes: 1. TypeDBWrapper Class: - Connection management with configurable settings - Schema definition and management - CRUD operations (Create, Read, Update, Delete) - Transaction handling - Error handling and logging - Context manager support 2. Features: - Type-safe schema definitions - Efficient query execution - Automatic connection management - Comprehensive error handling - Detailed logging - Example usage 3. Example Implementation: - Knowledge graph schema - Data insertion and querying - Relationship modeling - Data deletion and verification ## Issue Fixes #794 (Integration with the TypeDB graph database) ## Dependencies Added to requirements.txt: - typedb-client>=2.25.0 - typedb-protocol>=2.25.0 - typedb-driver>=2.25.0 ## Testing Added comprehensive test suite in `tests/utils/test_typedb_wrapper.py`: - Connection management tests - Schema definition tests - CRUD operation tests - Error handling tests - Context manager tests All tests can be run using: ```bash pytest tests/utils/test_typedb_wrapper.py -v ``` ## Tag Maintainer @kyegomez (General / Misc) ## Twitter Handle @the_complex_one ## Example Usage ```python from swarms.utils.typedb_wrapper import TypeDBWrapper, TypeDBConfig # Initialize wrapper config = TypeDBConfig( uri="localhost:1729", database="swarms_example" ) # Use context manager for automatic cleanup with TypeDBWrapper(config) as db: # Define schema schema = """ define person sub entity, owns name: string, owns age: long; """ db.define_schema(schema) # Insert data query = """ insert $p isa person, has name "John Doe", has age 30; """ db.insert_data(query) # Query data results = db.query_data("match $p isa person; get;") print(results) ``` ## Benefits 1. Enhanced knowledge representation 2. Efficient relationship modeling 3. Type-safe schema definitions 4. Robust error handling 5. Easy integration with existing code 6. Comprehensive documentation and examples <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--803.org.readthedocs.build/en/803/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub β†’
about 1 month ago0 comments
tests
utils
agents

# Add Python Best Practices with Flake8 and Pyupgrade ## Description This PR enhances code quality by adding comprehensive Python best practices through flake8 and pyupgrade integration. The changes include: 1. Configuration Files: - `.flake8`: Flake8 configuration with best practices - `pyupgrade.ini`: Python upgrade settings for Python 3.9+ - Added code quality check script 2. Code Quality Tools: - flake8: For style guide enforcement - flake8-bugbear: For additional bug checks - flake8-comprehensions: For list/dict/set comprehension checks - flake8-simplify: For code simplification suggestions - flake8-unused-arguments: For unused parameter detection - pyupgrade: For Python syntax modernization 3. Quality Check Script: - Unified script to run all checks - Configurable options - Clear error reporting - Exit codes for CI/CD integration ## Issue Fixes #734 (Adding Py best practices flakes and pyupgrade) ## Dependencies Added to requirements.txt: - flake8>=6.1.0 - flake8-bugbear>=23.3.12 - flake8-comprehensions>=3.12.0 - flake8-simplify>=0.19.3 - flake8-unused-arguments>=0.0.4 - pyupgrade>=3.15.0 ## Tag Maintainer @kyegomez (General / Misc) ## Twitter Handle @the_complex_one ## Testing The code quality script (`scripts/check_code_quality.py`) can be run with: ```bash python scripts/check_code_quality.py ``` This will check: 1. flake8 compliance 2. pyupgrade suggestions 3. black formatting 4. ruff checks <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--802.org.readthedocs.build/en/802/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub β†’
about 1 month ago0 comments
tests
utils
agents

# Improve Tool Agent Error Handling ## Description This PR significantly improves error handling in the tool agent by implementing a robust exception system with retry mechanisms and detailed error reporting. The changes include: 1. Custom Exception Classes: - `ToolAgentError`: Base exception class for all tool agent errors - `ToolExecutionError`: For tool execution failures - `ToolValidationError`: For parameter validation failures - `ToolNotFoundError`: For missing tools - `ToolParameterError`: For invalid parameter configurations 2. Enhanced Error Handling Features: - Configurable retry mechanism with customizable attempts and intervals - Detailed error messages with context and debugging information - Structured error details for better error tracking - Graceful fallback mechanisms in batch operations 3. Validation Improvements: - Parameter validation before tool execution - Tool existence verification - Required parameter checks - Type validation for parameters ## Issue Fixes #744 (Improve tool agent exceptions) ## Dependencies No new dependencies required. Uses existing: - loguru (for logging) - pytest (for testing) ## Testing Added comprehensive test suite in `tests/agents/test_tool_agent.py`: - Tool initialization tests - Parameter validation tests - Retry mechanism tests - Batch execution error handling tests - Error message format tests - Edge case handling tests All tests can be run using: ```bash pytest tests/agents/test_tool_agent.py -v ``` ## Tag Maintainer @kyegomez (General / Misc) ## Implementation Details 1. Exception Hierarchy: ```python ToolAgentError β”œβ”€β”€ ToolExecutionError β”œβ”€β”€ ToolValidationError β”œβ”€β”€ ToolNotFoundError └── ToolParameterError ``` 2. Retry Mechanism: ```python retry_attempts: int = 3 retry_interval: float = 1.0 ``` 3. Error Context: - Each error includes: - Descriptive message - Error context/details - Stack trace when relevant - Debugging information 4. Batch Processing: - Continues processing on individual failures - Collects and reports errors without stopping batch - Returns partial results with error indicators ## Example Usage ```python try: agent = ToolAgent(model_name="test-model") result = agent.run("test task") except ToolExecutionError as e: print(f"Error: {e.message}") print(f"Details: {e.details}") ``` <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--801.org.readthedocs.build/en/801/ <!-- readthedocs-preview swarms end -->

ascender1729Proposed by ascender1729
View on GitHub β†’
about 2 months ago1 comments
dependencies
python

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 5.1.0 to 5.4.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.4.0, 2025-03-16</h2> <h2>What's new</h2> <h3>New Features (ENH)</h3> <ul> <li>Add support for <code>IndirectObject.__contains__</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3155">#3155</a>) by <a href="https://github.com/noamkush"><code>@​noamkush</code></a></li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Fix detection of inline images followed by names or numbers (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3173">#3173</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Consider root objects without catalog type as fallback (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3175">#3175</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Raise proper error on infinite loop when reading objects (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3169">#3169</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>Mention memory consumption of text extraction (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3168">#3168</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Upgrade to ruff 0.10.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3191">#3191</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.3.1...5.4.0">Full Changelog</a></p> <h2>Version 5.3.1, 2025-03-02</h2> <h2>What's new</h2> <h3>Bug Fixes (BUG)</h3> <ul> <li>Use the correct name StandardEncoding for the predefined cmap (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3156">#3156</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Handle inline images containing <code>EI </code> sequences (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3152">#3152</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Fix check box value which should be name object (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3124">#3124</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Fix stream position on inline image fallback extraction (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3120">#3120</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Fix object count for incremental writer (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3117">#3117</a>) by <a href="https://github.com/m32"><code>@​m32</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Avoid index errors on empty lines in xref table (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3162">#3162</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Improve handling of LZW decoder table overflow (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3159">#3159</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Ignore non-numbers for width when building font width map (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3158">#3158</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> <li>Avoid negative seek values when reading partially broken files (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3157">#3157</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>Fixed PageObject.images example usage for replacing image (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3149">#3149</a>) by <a href="https://github.com/jutoth"><code>@​jutoth</code></a></li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.3.0...5.3.1">Full Changelog</a></p> <h2>Version 5.3.0, 2025-02-09</h2> <h2>What's new</h2> <h3>New Features (ENH)</h3> <ul> <li>Handle attachments in /Kids and provide object-oriented API (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3108">#3108</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle annotations being None on merging (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3111">#3111</a>) by <a href="https://github.com/stefan6419846"><code>@​stefan6419846</code></a></li> </ul> <!-- 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.4.0, 2025-03-16</h2> <h3>New Features (ENH)</h3> <ul> <li>Add support for <code>IndirectObject.__contains__</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3155">#3155</a>)</li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Fix detection of inline images followed by names or numbers (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3173">#3173</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Consider root objects without catalog type as fallback (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3175">#3175</a>)</li> <li>Raise proper error on infinite loop when reading objects (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3169">#3169</a>)</li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>Mention memory consumption of text extraction (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3168">#3168</a>)</li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Upgrade to ruff 0.10.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3191">#3191</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.3.1...5.4.0">Full Changelog</a></p> <h2>Version 5.3.1, 2025-03-02</h2> <h3>Bug Fixes (BUG)</h3> <ul> <li>Use the correct name StandardEncoding for the predefined cmap (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3156">#3156</a>)</li> <li>Handle inline images containing <code>EI </code> sequences (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3152">#3152</a>)</li> <li>Fix check box value which should be name object (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3124">#3124</a>)</li> <li>Fix stream position on inline image fallback extraction (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3120">#3120</a>)</li> <li>Fix object count for incremental writer (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3117">#3117</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Avoid index errors on empty lines in xref table (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3162">#3162</a>)</li> <li>Improve handling of LZW decoder table overflow (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3159">#3159</a>)</li> <li>Ignore non-numbers for width when building font width map (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3158">#3158</a>)</li> <li>Avoid negative seek values when reading partially broken files (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3157">#3157</a>)</li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>Fixed PageObject.images example usage for replacing image (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3149">#3149</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.3.0...5.3.1">Full Changelog</a></p> <h2>Version 5.3.0, 2025-02-09</h2> <h3>New Features (ENH)</h3> <ul> <li>Handle attachments in /Kids and provide object-oriented API (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3108">#3108</a>)</li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle annotations being None on merging (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3111">#3111</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Prevent excessive layout mode text output from Type3 fonts (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3082">#3082</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/f20954f2241640feb484800e191373f8fbdfa44b"><code>f20954f</code></a> REL: 5.4.0</li> <li><a href="https://github.com/py-pdf/pypdf/commit/e066ed52f8bdbdf70b3759d3de1ce52a45ba7688"><code>e066ed5</code></a> DEV: Update pyupgrade to version 3.19.1</li> <li><a href="https://github.com/py-pdf/pypdf/commit/24a6db18f14383d752c00624b20fb7e0b649f7c0"><code>24a6db1</code></a> DEV: Sync pre-commit configuration with requirements (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3192">#3192</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/d9660800cf08b74ec759d2c5f87584edd93ec09f"><code>d966080</code></a> DEV: Upgrade to ruff 0.10.0 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3191">#3191</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/493cb6b4f9d3641fd0079720bc96753375cdee66"><code>493cb6b</code></a> DEV: Remove excluding Ruff rule RET507 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3190">#3190</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/15a01ff34b9051593accf6cb7f454d82f42b53ba"><code>15a01ff</code></a> STY: Remove unnecessary assignment before return (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3184">#3184</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/16f584fbb4b5db8965e271a4f1e376fbb550440b"><code>16f584f</code></a> DEV: Move Ruff rule PLW0603 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3189">#3189</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/4470beffa9a6e07a63fa44a6431ec8ce7d9def5e"><code>4470bef</code></a> DEV: Remove excluded Ruff rule RET508 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3188">#3188</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/23eee1fe6825116e51c7ff43c7ece1e64aa80036"><code>23eee1f</code></a> STY: Increase readability slightly (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3178">#3178</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/016fef2ff14b5e1b6fadf7b382b0cb87f0c1509a"><code>016fef2</code></a> STY: Remove an unnecessary else (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3179">#3179</a>)</li> <li>Additional commits viewable in <a href="https://github.com/py-pdf/pypdf/compare/5.1.0...5.4.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.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR 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--796.org.readthedocs.build/en/796/ <!-- readthedocs-preview swarms end --> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

dependabot[bot]Proposed by dependabot[bot]
View on GitHub β†’

**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.

anivartoolsProposed by anivartools
View on GitHub β†’

**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.

anivartoolsProposed by anivartools
View on GitHub β†’

This PR introduces the `AIScientistFramework`, a multi-agent system designed to function as an AI co-scientist. It is based on the research paper "Towards an AI co-scientist" and implements a complete workflow for scientific hypothesis generation, review, ranking, and evolutionary refinement. **Detailed Description** The `AIScientistFramework` leverages a tournament-style approach to evolve and improve research hypotheses. It incorporates several specialized agents, each with a distinct role in the scientific process: - **Hypothesis Generation Agent:** Creates initial research hypotheses based on a given research goal. - **Reflection Agent (Reviewer):** Critically reviews hypotheses for scientific soundness, novelty, relevance, and other criteria. - **Ranking Agent:** Ranks hypotheses based on review scores and other relevant factors. - **Evolution Agent (Refiner):** Refines and improves top-ranked hypotheses based on review feedback and meta-review insights. - **Meta-Review Agent:** Synthesizes insights from multiple reviews to guide hypothesis evolution and overall process improvement. - **Proximity Agent (Similarity Analyzer):** Identifies semantically similar hypotheses to ensure diversity and cluster related ideas. - **Tournament Agent (Judge):** Compares pairs of hypotheses in a tournament setting to determine superiority and update Elo ratings. - **Supervisor Agent:** Orchestrates the entire workflow, manages agent tasks, and ensures quality control. **Key Features and Benefits** - **Multi-Agent System:** Employs a collaborative approach with specialized agents to mimic a scientific team. - **Tournament-Based Evolution:** Utilizes a dynamic tournament system and Elo ratings to rank and evolve hypotheses over iterations. - **Comprehensive Workflow:** Covers the entire hypothesis lifecycle from generation to refinement through review and ranking. - **Configurable and Extensible:** Allows customization of model names, iteration counts, agent prompts, and other parameters. - **Persistence:** Includes functionality to save and load agent states, enabling workflow interruption and resumption. - **Based on Research:** Grounded in the "Towards an AI co-scientist" paper, providing a theoretically sound framework. This framework provides a robust foundation for exploring AI-driven scientific discovery and hypothesis development. <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--791.org.readthedocs.build/en/791/ <!-- readthedocs-preview swarms end -->

harshalmore31Proposed by harshalmore31
View on GitHub β†’

Hi there, I'm interested in understanding if `swarms` depends on any graph algorithms from its usage of NetworkX? If so, - What algorithms are used for what purpose? - What graph sizes are they being used with? - Have users experienced any slowdowns or issues with algorithms provided by NetworkX? (Speed, algorithm availability, etc) Furthermore, would users be interested in accelerated nx algorithms via a GPU backend? This would involve zero code change. Any insight into this topic would be greatly appreciated! Thank you.

nv-rliuProposed by nv-rliu
View on GitHub β†’

- Talk Structurally, Act Hierarchically: A Collaborative Framework for LLM Multi-Agent Systems https://huggingface.co/papers/2502.11098 - paper https://arxiv.org/pdf/2502.11098

kyegomezProposed by kyegomez
View on GitHub β†’

- implement the following; https://research.google/blog/accelerating-scientific-breakthroughs-with-an-ai-co-scientist/ - https://storage.googleapis.com/coscientist_paper/ai_coscientist.pdf multi-agent paper

kyegomezProposed by kyegomez
View on GitHub β†’

**To Reproduce** Steps to reproduce the behavior: 1. Go to 'https://github.com/kyegomez/swarms/blob/fb494267ebb4a0af95b3b0683a89f3fd4ca80320/examples/ollama_demo.py' 2. Modify starting code (which doesn't originally work), to: from dotenv import load_dotenv import os import sys load_dotenv() if not os.getenv("OPENAI_API_KEY"): sys.exit("Error: OPENAI_API_KEY not found in environment variables") from swarms import Agent from swarm_models import OllamaModel model = OllamaModel(model_name="llama3.1:8b") from datetime import datetime from swarms import Agent, AgentRearrange, create_file_in_folder 3. Run model **Expected behavior** Output with Response only, not other details. Expected identical output to OpenAI 4o / 4o-mini model output. **Screenshots** Agent Name: Chief Medical Officer Output: model='llama3.1:8b' created_at='2025-02-08T13:52:57.1776161Z' done=True done_reason='stop' total_duration=8675541900 load_duration=21295700 prompt_eval_count=261 prompt_eval_duration=305000000 eval_count=563 eval_duration=8347000000 response="**Initial Assessment ( Timestamp: 2025-02-09 00:52:48.499230)**\n\n* Patient Information: 45-year-old White Male\n* Lab Results:\n\t+ eGFR (estimated Glomerular Filtration Rate): 59 mL/min/1.73m^2 (mildly reduced)\n\t+ Non-African American ethnicity (no specific lab values provided)\n\n**Initial ICD-10 Codes for Symptoms:**\n\n* R31.9: Other specified renal symptoms\n* Z91.19: Other specified risk factors\n\nPreliminary Assessment:\n\nBased on the patient's age, sex, and mildly reduced eGFR, potential differential diagnoses may include chronic kidney disease (CKD), mild renal impairment, or early stages of diabetic nephropathy. However, without additional lab results, further investigation is necessary.\n\n**Differential Diagnoses:**\n\n1. **Chronic Kidney Disease (CKD) (N18.4)**\n\t* eGFR 60-89 mL/min/1.73m^2\n\t* Additional lab values to consider:\n\t\t+ Serum creatinine\n\t\t+ Urine protein-to-creatinine ratio (UPCR)\n2. **Diabetic Nephropathy (E11.9)**\n\t* HbA1c levels, urine albumin-to-creatinine ratio (UACR), and eGFR can help support this diagnosis\n3. **Mild Renal Impairment (R31.9)**\n\t* May be indicated by a mildly reduced eGFR (59 mL/min/1.73m^2)\n4. **Other specified renal symptoms (R31.9)**\n\t* Could include conditions like hydronephrosis, pyelonephritis, or interstitial nephritis\n\n**Specialist Consultations Needed:**\n\n* Nephrologist for further evaluation and management of CKD\n* Endocrinologist for assessment of diabetic nephropathy\n* Urologist for investigation of potential urinary tract issues (e.g., hydronephrosis)\n\n**Recommended Next Steps:**\n\n1. Request additional lab results, including serum creatinine, HbA1c levels, urine protein-to-creatinine ratio (UPCR), and urine albumin-to-creatinine ratio (UACR).\n2. Consult the nephrologist for further evaluation and management of CKD.\n3. Schedule an appointment with the endocrinologist to assess diabetic nephropathy.\n4. Consider referring the patient to a urologist for investigation of potential urinary tract issues.\n\nPlease let me know if you'd like to proceed with these recommendations or if you have any questions." context=[128006, 882, 128007, 271, 2374, 25, ............................... THIS CONTEXT GOES ON TO BE A 12MB file Separate minor related issues: Bug within the demo code. When setting the model to a local one, the Agent still requires OPENAI_API_KEY

avetiseProposed by avetise
View on GitHub β†’

This pull request introduces significant enhancements to the `swarms` module by adding new classes and methods for better handling of token counting, agent configuration, and output formatting. The most important changes include the addition of token counting capabilities, the introduction of new schemas for agent input and swarm configuration, and the creation of a unified output schema. ### Token Counting Enhancements: * [`swarms/schemas/base_schemas.py`](diffhunk://#diff-5ba920eec50b780e102b3054f083c9c071aefcf3884545bccd996cadc78a8df0R53-R64): Added `count_tokens` method to `ChatMessageInput` class to count tokens in message content. * [`swarms/schemas/base_schemas.py`](diffhunk://#diff-5ba920eec50b780e102b3054f083c9c071aefcf3884545bccd996cadc78a8df0R108-R123): Added `calculate_usage` class method to `UsageInfo` class to calculate token usage for messages and completion. ### New Schemas for Agent and Swarm Configuration: * [`swarms/schemas/base_swarm_schemas.py`](diffhunk://#diff-516077153de212a874039bbe592eb520ae74e7e0c9a411f18ca8d9a03832fbf0R1-R152): Introduced `AgentInputConfig` class for agent configuration and `BaseSwarmSchema` class for swarm configuration with detailed validation methods. ### Unified Output Schema: * [`swarms/schemas/output_schemas.py`](diffhunk://#diff-a79fd1ec67f8489440807e645b589f2c107ee967b64b1e8e8687cf7a899a5733R1-R90): Added `Step`, `AgentTaskOutput`, and `OutputSchema` classes for representing and formatting the output of agent tasks and swarm executions. These changes collectively enhance the functionality and robustness of the `swarms` module, enabling more detailed tracking and configuration of agents and swarms. <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--770.org.readthedocs.build/en/770/ <!-- readthedocs-preview swarms end -->

harshalmore31Proposed by harshalmore31
View on GitHub β†’

Vulnerable File: agent_registry.py Vulnerable Function: https://github.com/kyegomez/swarms/blob/master/swarms/structs/agent_registry.py def add(self, agent: Agent) -> None: """ Adds a new agent to the registry. Args: agent (Agent): The agent to add. Raises: ValueError: If the agent_name already exists in the registry. ValidationError: If the input data is invalid. """ name = agent.agent_name # No validation for agent_name self.agent_to_py_model(agent) with self.lock: if name in self.agents: logger.error( f"Agent with name {name} already exists." ) raise ValueError( f"Agent with name {name} already exists." ) try: self.agents[name] = agent logger.info(f"Agent {name} added successfully.") except ValidationError as e: logger.error(f"Validation error: {e}") raise Description: The add function in agent_registry.py lacks proper input validation for the agent_name. The function assumes that agent_name is valid and does not check for conditions such as being None, empty, or non-string. This oversight can lead to unexpected behavior, data corruption, and potential security vulnerabilities. Impact: Unexpected Behavior: Without validation, the system may accept invalid agent names, leading to errors when attempting to retrieve, update, or delete agents. Data Corruption: Invalid entries could corrupt the registry, affecting other operations and leading to inconsistent states. Security Risks: If the system is exposed to user inputs, attackers might exploit this lack of validation to inject harmful data or cause denial of service. Severity: high-medium it can cause significant operational issues. Proof of Concept (PoC): Mock Agent class for demonstration class Agent: def __init__(self, agent_name, description=None): self.agent_name = agent_name self.description = description def to_dict(self): return {"agent_name": self.agent_name, "description": self.description} Initialize the registry registry = AgentRegistry() Malicious or malformed input malformed_agent_name = None # Invalid agent name malformed_agent = Agent(agent_name=malformed_agent_name) Attempt to add the malformed agent try: registry.add(malformed_agent) except ValueError as e: print(f"Caught ValueError: {e}") except Exception as e: print(f"Caught unexpected exception: {e}") Steps to Reproduce: Create an instance of the AgentRegistry class. Define an agent with a malformed agent_name (e.g., None). Attempt to add the agent to the registry using the add function. Observe the lack of validation leading to unexpected behavior or errors. Recommended Fix: Implement input validation in the add function to ensure that agent_name is a valid, non-empty string before proceeding with the addition. Fixed Code: def add(self, agent: Agent) -> None: """ Adds a new agent to the registry. Args: agent (Agent): The agent to add. Raises: ValueError: If the agent_name already exists in the registry or is invalid. ValidationError: If the input data is invalid. """ name = agent.agent_name # Input validation for agent_name if not name or not isinstance(name, str): logger.error("Invalid agent name provided.") raise ValueError("Invalid agent name provided.") self.agent_to_py_model(agent) with self.lock: if name in self.agents: logger.error( f"Agent with name{name} already exists." ) raise ValueError( f"Agent with name {name} already exists." ) try: self.agents[name] = agent logger.info(f"Agent {name} added successfully.") except ValidationError as e: logger.error(f"Validation error: {e}") raise Explanation of Fix: Input Validation: Added a check to ensure that agent_name is a non-empty string. This prevents invalid names from being processed, reducing the risk of unexpected behavior or data corruption. <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--766.org.readthedocs.build/en/766/ <!-- readthedocs-preview swarms end -->

nathanogaga118Proposed by nathanogaga118
View on GitHub β†’
documentation

Replace this comment with: - Description: add swarms-rust implementation and declare as experiment, - Issue: not a issue but add new knowledge by introducing rust to swarms, - Dependencies: no impact to python and js implementation so far, - Tag maintainer: kye@apac.ai - Twitter handle: georgemindnet <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--754.org.readthedocs.build/en/754/ <!-- readthedocs-preview swarms end -->

georgeshethProposed by georgesheth
View on GitHub β†’

<img width="699" alt="Image" src="https://github.com/user-attachments/assets/f212ac32-fe02-46ae-a85d-ce41d5bf1259" /> Figure 1 illustrates the method for defining tools within swarms(line 47), utilizing an 'array' to dynamically load functions, such as fetch_current_weather. Below is a pseudocode example demonstrating a function with input parameters: ``` def fetch_current_weather(city: str) -> str: """ Fetches the current weather for a given city from the OpenWeatherMap API. Args: city (str): The name of the city to fetch the weather for. Returns: str: A formatted string of the current weather in the specified city. Raises: ValueError: If the API response is invalid or the city is not found. """ try: temperature = random.uniform(0.0, 1.0) return f"The current weather in {city} with a temperature of {temperature}Β°C." except ValueError as e: print(f"Value Error: {e}") raise ``` The tools function by sending prompts, generated based on the annotations in the function above, to the agent to determine if the conversation between the LLM and the user includes a query about the weather. For instance, consider the query, "How’s the weather in London today?" The program is expected to have "London" as the input and process it based on the LLM's response. ``` { "type": "function", "function": { "name": "fetch_current_weather", "parameters": { "city": "London" } } } ``` <img width="699" alt="Image" src="https://github.com/user-attachments/assets/f1424a1c-70b0-4525-b433-423a825efba4" /> When implementing plugins in practice, it is essential to execute them with context-specific inputs, as demonstrated below. Ideally, we aim for the fetch_current_weather function to operate with a payload that accommodates variations. ``` def fetch_current_weather(payload: any, city: str) -> str: ... ... ... ``` https://github.com/spore-swarm/autonomous-spores/blob/main/spores/core/runtime.py#L46 In the spores-swarm repository(we are building runtime module right now), we want it to be as shown in this link rather than as written at line 47. **kindly ask any ideas for this feature? or is there any alternative ways to get there, or will be featured in future?**

autonomous-sporesProposed by autonomous-spores
View on GitHub β†’
4 months ago2 comments
tests
agents

Thank you for contributing to Swarms! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! 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--744.org.readthedocs.build/en/744/ <!-- readthedocs-preview swarms end -->

chethanukProposed by chethanuk
View on GitHub β†’

Added two key methods to AgentRearrange class in swarms/structs/rearrange.py: generate_flow(task_type, agent_groups): Generates flow patterns based on three types: Sequential: "a -> b -> c" Parallel: "a, b, c" Hybrid: "(a, b) -> (c, d) -> e" set_flow_from_task(task): Automatically analyzes task descriptions to determine appropriate flow patterns using keyword detection: Parallel keywords: "compare", "analyze multiple", "parallel", "simultaneously" Sequential keywords: "step by step", "in sequence", "following", "then" Updated example code in new_features_examples/swarmarrange/swarm_arange_demo.py to demonstrate usage: Sequential flow example for acquisition analysis Parallel flow example for market research Hybrid flow example with agent groupings for investment strategy <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--743.org.readthedocs.build/en/743/ <!-- readthedocs-preview swarms end -->

Occupying-MarsProposed by Occupying-Mars
View on GitHub β†’

# Unified Swarm Output Schema for harshals ui ## Changes Made 1. Created a new unified schema system in `swarms/schemas/swarm_output_schemas.py` that standardizes output across all swarm types: - Base `SwarmOutput` schema for common fields - Specialized schemas for each swarm type (MixtureOfAgents, SpreadsheetSwarm, AgentRearrange, etc.) - Each schema includes type-safe Pydantic models with proper field validation 2. Added specialized output classes for different swarm types: - `AgentRearrangeOutput`: For agent rearrangement workflows - `ConcurrentWorkflowOutput`: For parallel execution stats - `SequentialWorkflowOutput`: For workflow chain tracking - `AutoSwarmOutput`: For auto-selected strategy details - `MixtureOfAgentsOutput`: For aggregated agent summaries - `SpreadsheetSwarmOutput`: For CSV data handling 3. Enhanced the Agent class with a unified `create_swarm_output` method that: - Creates standardized output for all swarm types - Handles metadata appropriately for each type - Provides consistent formatting ## Benefits - Consistent output structure across all swarm types - Type safety through Pydantic models - Simplified UI parsing with built-in formatting methods - Easier maintenance and extensibility - Reduced code duplication - Better error handling and validation ## Breaking Changes None. This is a new feature that enhances existing functionality without breaking existing implementations. <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--742.org.readthedocs.build/en/742/ <!-- readthedocs-preview swarms end -->

Occupying-MarsProposed by Occupying-Mars
View on GitHub β†’
4 months ago1 comments
structs

Thank you for contributing to Swarms! changed agent.py so it loads new executatbles like threadpoolexecuter <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--741.org.readthedocs.build/en/741/ <!-- readthedocs-preview swarms end -->

Occupying-MarsProposed by Occupying-Mars
View on GitHub β†’
documentation

Comment: Description: Let Docs support multi-language switching, currently added Chinese, the navigation directory to do the conversion Issue: None, Dependencies: mkdocs-static-i18n Tag maintainer: [kye@apac.ai](mailto:kye@apac.ai) Twitter handle: @sigeshuo <!-- readthedocs-preview swarms start --> ---- πŸ“š Documentation preview πŸ“š: https://swarms--740.org.readthedocs.build/en/740/ <!-- readthedocs-preview swarms end -->

sigeshuoProposed by sigeshuo
View on GitHub β†’