This project demonstrates the development of an advanced multi-agent AI application using LangFlow, Streamlit, and retrieval-augmented generation (RAG). It integrates modern MLOps techniques, efficient use of multiple language models (LLMs), and an intuitive front-end interface.
- Multi-Agent AI:
- Combines multiple LLMs for complex task routing.
- Includes context-specific tools for mathematical and logical reasoning.
- Modular Design:
- Uses LangFlow's low-code visual editor for modular AI flow construction.
- Implements RAG to retrieve relevant notes or context dynamically.
- Interactive UI:
- Built with Streamlit for a seamless and intuitive user experience.
- Scalable Backend:
- AstraDB vector database integration for efficient vector operations.
- Programming Language: Python
- Backend: LangFlow, AstraDB
- Frontend: Streamlit
- AI Models: OpenAI GPT and custom tool-integrated models
- Database: AstraDB with vectorization capabilities
├── ai.py
├── db.py
├── form_submit.py
├── profiles.py
├── main.py
├── requirements.txt
├── workflow.json
└── README.md
- Python 3.8+
- Environment Setup:
- Install Python packages using
pip install -r requirements.txt
. - Create a
.env
file and configure the following: -
LANGFLOW_TOKEN=<your_langflow_api_token> ASTRA_DB_APPLICATION_TOKEN=<your_astra_db_token> ASTRA_ENDPOINT=<your_astra_endpoint_url> OPENAI_API_KEY=<your_openai_api_key>
- Install Python packages using
-
Clone the repository:
git clone https://github.com/yourusername/advanced-ai-multi-agent.git cd advanced-ai-multi-agent
-
Install dependencies:
pip install -r requirements.txt
-
Set up the LangFlow environment:
- Export the LangFlow workflow JSON (
workflow.json
) via LangFlow UI.
- Export the LangFlow workflow JSON (
-
Run the application:
streamlit run main.py
-
User Inputs:
- Collect user profiles, goals, and activity levels through Streamlit forms.
- Retrieve or dynamically store contextual notes using AstraDB.
-
AI Routing:
- Dynamically routes questions to specialized agents using LangFlow.
- Incorporates retrieval-augmented generation for contextual responses.
-
Mathematical Operations:
- Integrated calculator tool for advanced calculations.
- Logical separation ensures error-free computations.
-
UI/UX:
- Interactive inputs and results visualization through Streamlit.
-
Start the LangFlow backend:
- Host the API locally or remotely.
-
Run the main Streamlit app:
streamlit run main.py
-
Interact:
- Provide your personal information.
- Retrieve or save notes.
- Ask complex questions and observe dynamic AI task routing.
- Add multi-language support for global use.
- Enhance the UI with modern frameworks.
- Introduce additional tools for broader AI capabilities.
We welcome contributions to enhance this project! Feel free to fork the repository, add features, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.