https://github.com/poran-dip/filo
Conversational AI agent for searching and discovering files in Google Drive, built with FastAPI, LangGraph, and Streamlit.
https://github.com/poran-dip/filo
ai-agent fastapi google-drive-api groq langchain langgraph llm python streamlit
Last synced: 3 days ago
JSON representation
Conversational AI agent for searching and discovering files in Google Drive, built with FastAPI, LangGraph, and Streamlit.
- Host: GitHub
- URL: https://github.com/poran-dip/filo
- Owner: poran-dip
- Created: 2026-05-11T18:17:08.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-12T11:30:12.000Z (about 2 months ago)
- Last Synced: 2026-05-12T12:35:03.598Z (about 2 months ago)
- Topics: ai-agent, fastapi, google-drive-api, groq, langchain, langgraph, llm, python, streamlit
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Filo AI
Filo AI is a conversational Drive assistant that finds your files through natural chat. Search by name, type, content, or date — Filo translates your intent into precise Drive API queries and stays focused on your files.
Check it out on [filo-ai.streamlit.app](https://filo-ai.streamlit.app/).
**Note:** The live deployment only has access to a test Drive folder. To use Filo with your own Drive, clone the repo, set up a service account, and configure the `.env` as described below.
## Stack
- **Backend** — Python, FastAPI, LangGraph, LangChain, Groq (Llama 3.3 70B)
- **Frontend** — Streamlit
- **Integration** — Google Drive API v3 via Service Account
## Features
- Natural language search across a designated Google Drive folder (and all subfolders)
- Searches by file name, MIME type, full-text content, and date filters
- Multi-turn conversation — follow-up and refine searches naturally across the session
- File results rendered as a table with direct Drive links
- Powered by LangGraph tool-calling — the LLM constructs valid Drive `q` parameter strings
- Stays focused — politely redirects off-topic questions back to file search
- Smart no-results handling — suggests broader queries instead of dead ends
```bash
filo/
├── server/
│ ├── main.py # FastAPI app
│ ├── agent.py # LangGraph agent + system prompt
│ ├── tools.py # drive_search LangChain tool
│ ├── drive.py # Google Drive API client
│ └── config.py # Server configuration
├── client/
│ ├── app.py # Streamlit chat interface
│ └── config.py # Client configuration
├── render.yaml # Render deployment config
├── requirements.txt
├── runtime.txt
└── .env.example
```
## Local Setup
### Prerequisites
- Python 3.12+
- A Google Cloud Service Account with Drive API enabled
- The service account shared on your target Drive folder
### Steps
1. Clone the repo and create a virtual environment:
```bash
git clone https://github.com/poran-dip/filo.git
cd drive-chat-agent
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
```
2. Copy `.env.example` to `.env` and fill in your values:
```bash
cp .env.example .env
```
3. Run the backend:
```bash
uvicorn server.main:app --reload
```
4. In a separate terminal, run the frontend:
```bash
streamlit run client/app.py
```
## Environment Variables
| Variable | Description |
| ----------------------------- | ------------------------------------------------------------- |
| `GROQ_API_KEY` | Your Groq API key |
| `DRIVE_FOLDER_ID` | Root Google Drive folder ID to search within |
| `GOOGLE_SERVICE_ACCOUNT_JSON` | Full contents of the service account JSON file (single line) |
See `.env.example` for reference.
## Deployment
- **Backend** — Render (configured via `render.yaml`). Set the three env vars in the Render dashboard.
- **Frontend** — Streamlit Community Cloud. Connect the GitHub repo, set main file to `client/app.py`, and add `BACKEND_URL` pointing to your Render service URL in the app secrets.