This project implements a Retrieval Augmented Generation (RAG) agent using Google Cloud Vertex AI and the Agent Development Kit (ADK). The agent can manage document corpora (create, list, delete) and answer questions based on the uploaded documents.
- Query Documents: Answer questions using information retrieved from document corpora.
- Manage Corpora: Create, list, and delete document corpora.
- Manage Documents: Add files (Google Drive, GCS) to corpora and delete specific documents.
- Vertex AI Integration: Built on top of Google's Gemini models and Vertex AI Vector Search.
- Python 3.10+
- Google Cloud Project with Vertex AI API enabled.
- Google Cloud Credentials configured (e.g., via
gcloud auth application-default login).
- Clone the repository (if applicable).
- Install dependencies:
pip install -r requirements.txt
- Configure Environment:
Ensure you have a
.envfile inrag_agent/.envor set the environment variables:GOOGLE_CLOUD_PROJECT: Your Google Cloud Project ID.GOOGLE_CLOUD_LOCATION: Your Google Cloud Region (e.g.,us-central1).
Due to permission issues with symbolic links on Windows, use the provided helper script:
.\.venv\Scripts\python run_agent.pyYou can run the agent directly using the ADK CLI:
adk run rag_agentTo run the agent with a web interface:
adk webThen open http://localhost:8000 in your browser.
If you encounter authentication errors, refresh your credentials:
gcloud auth application-default loginIf you see an OSError: [WinError 1314] A required privilege is not held by the client regarding os.symlink, please use the run_agent.py script as described in the "Running the Agent" section.