Skip to content

Conversation

@hughiwnl
Copy link
Contributor

@hughiwnl hughiwnl commented Nov 20, 2025

Update AgentRearrange Documentation

Summary

Updated the agent_rearrange2.md documentation file to include all missing features and methods from the AgentRearrange Python implementation. The documentation now accurately reflects all public methods, internal methods, and features available in the swarms/structs/agent_rearrange.py file.

Changes Made

Added Missing Methods

  1. reliability_check(self) - Public method documentation

    • Validates configuration parameters (agents, max_loops, flow, output_type)
    • Automatically called during initialization
    • Can be manually called to validate configuration after changes
    • Raises ValueError if validation fails
  2. track_history(self, agent_name: str, result: str) - Public method documentation

    • Tracks execution history for specific agents
    • Records results for analysis and debugging
    • Can be called manually or internally

Enhanced Existing Documentation

  1. __init__ method - Added note about automatic reliability_check() call during initialization

  2. set_custom_flow() method - Added note about flow validation on next execution

  3. Internal Methods section - Expanded with:

    • Detailed documentation of _run() method's custom_tasks parameter (Dict[str, str] for per-agent task customization)
    • Additional details on internal helper methods:
      • _serialize_callable() - Helper for serializing callable attributes
      • _serialize_attr() - Helper for serializing individual attributes with non-serializable object handling
    • Clarified purpose and usage of each internal method
  4. Updated examples -

  • Made the example simpler and easier to understand
  • Focuses on core AgentRearrange features
  • Avoids unnecessary complexity
  • Is more portable (doesn't require specific LLM setup)

📚 Documentation preview 📚: https://swarms--1219.org.readthedocs.build/en/1219/

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant