This project implements a combination of SequentialAgent and LlmAgent ADK agents, as following:
- Retriever Agent -
LlmAgent- calls Vertex AI RAG to fetch contextually relevant passages from a structured corpus. - Analyzer Agent -
LlmAgent- interprets and summarizes retrieved text, highlighting key points, conflicts, and evidence. - Final Answer Agent -
LlmAgent- constructs a human-readable response with inline citations ([P1], [P2]), grounding every claim in the retrieved evidence. - root_agent -
SequentialAgent- orchestrate the 3LlmAgentagents.
Follow the steps:
- Copy your data files in a GCP storage bucket, identified in the
.envfile asGCS_URI. - Set your
GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATIONparameters in your.envfile. - Set also
GOOGLE_GENAI_USE_VERTEXAItoTrue. - Run:
This will initialize the Vertex AI client, will create the corpus, download and upload to corpus the data.
python adk-rag-agent/create_database/create_corpus_and_vector_database.py
You can run the agent using the ADK command in your terminal. from the root project directory:
-
Run agent in CLI:
adk run adk-rag-agent
-
Run agent with ADK Web UI:
adk web
Select the
adk-rag-agentfrom the dropdown and start interogating the agents.