AutoGen Studio, powered by the AutoGen framework, is a revolutionary platform for developing AI agents that seamlessly collaborate to accomplish tasks. In this blog post, we will explore the capabilities of AutoGen Studio and integrate it with free alternatives of OpenAI like Text Generation Web UI and LM Studio. By the end of this guide, you’ll have a comprehensive understanding of how to locally use AutoGen Studio with alternative language model tools.
This article was published as a part of the Data Science Blogathon.
AutoGen is a framework designed for developing applications that utilize Language Model (LLM) agents capable of collaborating to solve tasks. These agents, which are both customizable and conversational, seamlessly integrate human participation and operate in various modes, employing combinations of LLMs, human inputs, and tools.
AutoGen Studio serves as an AI application, featuring a user interface powered by the AutoGen framework. Its primary objective is to streamline the prototyping process of AI agents, empowering users to augment these agents with various skills, structure them into coherent workflows, and engage in interactive task completion.
Enhancing User Interaction
AutoGen Studio’s intuitive interface enables users to declaratively define and modify agents and multi-agent workflows effortlessly. The need to delve into complex code or intricate configurations is eliminated. Instead, users can leverage a point-and-click, drag-and-drop interface to specify the parameters of agents and their interactions. It’s akin to providing a digital canvas where users design the choreography, and AutoGen Studio ensures that the agents seamlessly follow their instructions.
Realizing Agent Potential: Adding Skills with Ease
Consider a scenario where a virtual team needs to acquire new skills to address evolving tasks. In a traditional setting, integrating these skills might involve navigating through intricate lines of code. However, AutoGen Studio simplifies the process of explicitly adding skills to agents. The interface provides a clear view of existing skills and offers an accessible platform for incorporating new ones. It’s like empowering a team with new tools, achieved with just a few clicks.
Making Collaboration Tangible: The Playground Section
Moving beyond the theoretical setup, AutoGen Studio introduces a Playground section where users can interact with the agent workflows defined earlier. This virtual space is where the magic happens – a digital environment where users engage in sessions, observe chat interactions, and witness the results of their orchestrated collaboration. It’s like having a virtual rehearsal room where users fine-tune the performance of their digital ensemble.
Sharing Success: The Gallery Section
Once users have perfected their agent choreography and witnessed successful sessions, AutoGen Studio provides a platform to share achievements through the Gallery section. This section serves as a repository of successful agent collaborations, similar to showcasing a digital masterpiece to a wider audience. It fosters collaboration and inspiration within the AutoGen community.
To learn more about Autogen Studio refer this blog
Text Generation Web UI is a user-friendly web-based interface designed for creating text using various large language models, including transformers, GPTQ, llama.cpp, and others. It offers an array of features, such as model switching, notebook mode, chat mode, and more, making it versatile for applications like creative writing and chatbot development.
To run a large language model locally on your computer, follow these steps:
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
Example: If your using Windows OS, run the following command:
.\\start_windows.bat --api --listen-port 7822 --extensions openai
Press enter. This will automatically download and install the required packages for text generation web UI. The installation might take around a minute.
Copy the generated OpenAI-compatible URL. You will need this in a later step.
Monitor the terminal to confirm the successful download of the model. It may take a minute to complete.
Open new terminal and execute following commands
The next step is to install AutoGen Studio. For a smooth experience, I recommend using a virtual environment (e.g., conda) to avoid conflicts with existing Python packages. With Python 3.10 or newer active in your virtual environment, use the following pip command:
pip install autogenstudio
autogenstudio ui --port 8080
output server_autogenstudio.log
INFO: Started server process [11050]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
Configure an agent workflow that can be used to handle tasks.
Click playground section and create new section by clicking the “new” button
Choose the general agent workflow and press Create button
When the session is successfully created. Now execute the query and press the send btton
Now consider this query: List out the top 5 rivers in Africa and their length and return that as a markdown table. Do not try to write any code, just write the table.
Text generation web UI Log
To verify LLM starts generating output, After a few minutes you will be able to see the log in Text-generation-webui that the tokens are getting generated. This proves that autogen UI is using LLM through Text-generation-webui.
Autogen Studio Log in Terminal
Result
LM Studio, a groundbreaking project, stands at the forefront of enabling users to interact with open-source LLMs seamlessly. Developed around the llama.cpp library, this tool facilitates the installation, management, and utilization of various LLMs on desktop environments.
Navigate to the official LM Studio website (https://lmstudio.ai/) and choose the version compatible with your operating system (Windows or Mac or Linux).Click on the download link to initiate the download process.
In the middle of the main screen, locate the search bar. Enter keywords or a specific model name to explore available options. Choose a model that aligns with your exploration goals.
Local Server – Locate the double-arrow icon on the left, click it, and start the local server.
Copy the base url and paste it in autogen studio.
The next step is to install AutoGen Studio. For a smooth experience, I recommend using a virtual environment (e.g., conda) to avoid conflicts with existing Python packages. With Python 3.10 or newer active in your virtual environment, use the following pip command:
pip install autogenstudio
autogenstudio ui --port 8080
output server_autogenstudio.log
INFO: Started server process [11050]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
Configure an agent workflow that can be used to handle tasks.
Important Tip: Also Set Human Input Mode as “ALWAYS”( otherwise you won’t get an output in autogen studio)
Now consider this query: List out the top 5 rivers in Africa and their length and return that as a markdown table. Do not try to write any code, just write the table.
Click playground section and create new section by clicking the “new” button
Choose the general agent workflow and press Create button
When the session is successfully created. Now execute the query and press the send button.
Important: Once you give any task in autogen studio in playground section, go to the autogen studio terminal and there you will see this “Provide feedback to userproxy. Press enter to skip and use auto-reply, or type ‘exit’ to end the conversation:”. now press “Enter”.
To verify LLM starts generating output, you will be able to see the log in LM studio that the tokens are getting generated. This proves that autogen UI is using LLM through LM Studio.
In conclusion, AutoGen Studio emerges as a powerful tool for developing and interacting with AI agents. By combining it with free alternatives like Text Generation Web UI and LM Studio, users can extend the functionalities and explore various language models locally. This guide equips you with the knowledge to harness the potential of AutoGen Studio alongside alternative tools, opening doors to innovative AI applications.
A. AutoGen Studio stands out for its user-friendly interface, allowing you to effortlessly prototype and improve AI agents. Its intuitive design eliminates the need for complex coding, making it accessible for both beginners and seasoned developers.
A. Installing AutoGen Studio is a breeze. Simply use the recommended pip command within a virtual environment, ensuring a smooth experience. The process is well-documented, making it accessible for users with varying levels of technical expertise.
A. Absolutely! By following the outlined steps, you can seamlessly integrate Text Generation Web UI with AutoGen Studio. This combination opens up a world of possibilities for tasks ranging from creative writing to chatbot development.
A. LM Studio is a project that simplifies the interaction with open-source language models. When integrated with AutoGen Studio.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.