This project was built for the AI Agent Prototype Assignment.
It is a simple chatbot-style product finder that lets users search using normal language instead of selecting filters manually. For example, a user can type:
Show me clothing products under $50
The agent understands the request, identifies the category and price condition, calls the correct Python filtering function, and displays the matching products as cards.
The application uses Google ADK with Gemini to understand the user’s message.
Gemini is only used to interpret the request and decide which tool to call. The actual product filtering is done using regular Python code and the provided JSON dataset.
The application follows this flow:
User message → Google ADK agent → Python filtering tool → products.json → Streamlit product cards
The agent has access to two tools:
filter_by_categoryfor category-based searchesfilter_by_pricefor maximum, minimum, exact-price, and combined category-price searches
The project uses one agent and does not use embeddings, RAG, multiple agents, or ADK’s built-in web interface.
User enters a product request ↓ Streamlit sends it to the AI agent ↓ Gemini understands the category and price ↓ ADK connects Gemini to the correct Python filtering tool ↓ Python searches the product data ↓ Matching products are returned ↓ Streamlit displays them as product cards
- Search products using natural language
- Filter products by category
- Filter products below a given price
- Filter products above a given price
- Find products with an exact price
- Combine category and price filters
- Display results with an image, name, description, category, and price
- Simple chatbot-style interface built with Streamlit
- API key stored securely using a
.envfile
- Python
- Google Agent Development Kit
- Gemini
- Streamlit
- JSON
- python-dotenv
- Git and GitHub
app.pyruns the Streamlit interface and communicates with the ADK agentagent.pydefines the Product Finder agent, its instructions, and its toolsproduct_filter.pycontains the deterministic category and price filtering functionsproducts.jsoncontains the product dataset provided in the assignmentrequirements.txtcontains the packages required to run the project.envstores the Gemini API key locally
-
Make sure Python and Git are installed.
-
Clone the repository:
git clone https://github.com/Sneegha1511/Product_Finder_AI_Agent.git -
Open the project folder:
cd Product_Finder_AI_Agent -
Create a virtual environment:
python -m venv .venv -
Activate the virtual environment:
.venv\Scripts\Activate.ps1 -
Install the required packages:
python -m pip install -r requirements.txt -
Create a Gemini API key from Google AI Studio:
https://aistudio.google.com/apikey -
Create a
.envfile in the project folder and add:GOOGLE_GENAI_API_KEY=your_key_here -
Run the application:
python -m streamlit run app.py -
Open the app in your browser:
-
Press
Ctrl + Cin the terminal to stop it.
- Show me all clothing products
- Show electronics under 200
- Show groceries over 30
- Find products that cost exactly 49
- Add more product categories and larger dataset
- Implement more complex filtering options such as adding brand, colors, ratings, price ranges, product name searches
- implement advanced filters with tick boxes
- Add user authentication and personalized recommendations.