Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive UI for Swarms Framework #709

Closed
wants to merge 26 commits into from

Conversation

harshalmore31
Copy link
Collaborator

@harshalmore31 harshalmore31 commented Dec 31, 2024

Interactive UI for Swarms Framework: Swarm-Specific Parsing, Agent Management, and LLM Integration with Hugging Face Deployment & Local Deployment

Description:

  • Developed a robust and feature-rich UI for the Swarms framework using Gradio, focused on enhancing usability, modularity, and interactive capabilities. Key additions include:
    • Swarm-Specific Parsing:
      • Implemented parsers for all swarm types, including SequentialWorkflow, ConcurrentWorkflow, AgentRearrange, MixtureOfAgents, SpreadSheetSwarm, and auto.
      • Ensures consistent formatting of output data and detailed feedback for each workflow type.
    • Dynamic Prompt Loading:
      • Integrated functionality to load agent prompts dynamically from a JSON file.
      • Default prompts are used if the file is absent or improperly formatted.
    • Agent Management in UI:
      • Enabled creation of new agent prompts directly via the UI.
      • Supports editing and validation of custom prompts with seamless integration into the workflow configuration.
    • UI Framework Enhancements:
      • Introduced a dedicated UI class for streamlined Gradio component management, improving scalability and readability of the codebase.
      • Added modular components like dropdowns, sliders, and conditional inputs for an intuitive user experience.
    • LLM Integration:
      • Using LiteLLM, integrated the following models and providers:
        • OpenAI
        • Anthropic
        • Cohere
        • Gemini
        • Mistral
        • Groq
        • Perplexity

Key Features:

  • Interactive Swarm Configuration: Supports flexible configuration for workflows, including custom execution flows for AgentRearrange and advanced features like agent flow validation.
  • Agent-Centric Design: Facilitates agent selection, prompt management, and dynamic updates for added flexibility.
  • User Feedback and Debugging: Incorporates detailed logging, error handling, and status displays for enhanced user experience.

Issue:

  • Not linked to any specific issue. This PR focuses on establishing a functional and scalable UI layer for the Swarms framework.

Dependencies:

  • Gradio: Core framework for building the modular UI.
  • dotenv: Securely manages API keys and configurations.
  • litellm: Enables seamless integration with multiple language model providers and their respective models.

Deployment:

Tag Maintainer:

@kyegomez

Twitter Handle:

@harshalmore31


Additional Changes:

  • Removed several example scripts from the new_features_examples directory due to long-path issues and invalid characters (:) in JSON filenames for Windows OS. These deletions include below files and some other files too:
    • new_features_examples/agent_showcase_example.py: Showcased initialization and usage of various agents for medical insurance claims processing.
    • new_features_examples/async_agent.py: Demonstrated the initialization and async execution of a financial analysis agent.
    • new_features_examples/async_agents.py: Initialized a financial analysis agent and executed it using a high-speed executor.
    • new_features_examples/async_executor.py: Contained the high-speed executor class managing concurrent task execution using asyncio and multiprocessing.
    • new_features_examples/async_workflow_example.py: Created and executed a specialized workflow for financial analysis using multiple agents.
    • new_features_examples/auto_agent.py: Defined an autonomous agent capable of executing various commands dynamically.


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

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap.

@github-actions github-actions bot added documentation Improvements or additions to documentation tests artifacts utils labels Jan 2, 2025
remove duplicate OPENAI_API_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifacts documentation Improvements or additions to documentation structs tests utils
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants