CoolFace
Apppublic

bhushanbhutada/multi-agent-workflow-app

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Multi-Agent AI Workflow App

Description

This project is a lightweight multi-agent question answering app that uses a retrieval agent and a response agent in sequence. The retrieval agent searches AI-related document chunks with FAISS semantic search, and the response agent generates a grounded answer with HuggingFace Transformers. The project uses all-MiniLM-L6-v2 for embeddings and google/flan-t5-small for generation so it stays small enough for local use and HuggingFace Spaces deployment.

Multi-Agent Workflow

text
User Query
	→ Retrieval Agent (FAISS semantic search)
	→ Response Agent (flan-t5-small generation)
	→ Formatted Output

Tech Stack

  • Python 3.10+
  • HuggingFace Transformers
  • Sentence Transformers
  • FAISS
  • Gradio

Folder Structure

  • app.py - Gradio entrypoint that wires the pipeline together.
  • agents.py - Retrieval and response agent classes.
  • vector_store.py - Sentence embedding and FAISS search logic.
  • utils.py - Logging, chunking, and response formatting helpers.
  • documents.txt - Source content used for retrieval.
  • requirements.txt - Exact package versions for local and Spaces compatibility.
  • README.md - Project overview, setup, and deployment instructions.

Local Setup

bash
python -m venv venv
source venv/bin/activate        # Mac/Linux
venv\Scripts\activate          # Windows

pip install -r requirements.txt

python app.py

HuggingFace Spaces Deployment

Use these exact commands:

bash
git init
git branch -M main

git remote add origin https://huggingface.co/spaces/bhushanbhutada/multi-agent-workflow-app

git add .
git commit -m "initial commit"

git push -u origin main

After pushing, HuggingFace Spaces will auto-install requirements.txt and run app.py. Live URL: https://huggingface.co/spaces/bhushanbhutada/multi-agent-workflow-app

Example Questions

  • What is machine learning?
  • How do transformers work in NLP?
  • What is generative AI?
  • How does FAISS perform similarity search?
  • What are neural networks?

Design Decisions

Two agents keep the workflow easy to understand and extend. The retrieval agent isolates document search, while the response agent focuses only on generation. flan-t5-small is a practical choice because it is much lighter than large LLMs and works well for short grounded answers. FAISS was chosen instead of a full vector database because the assignment needs a simple, fast, local solution without persistence or deployment overhead.