This project is a multi-agent system designed to assist with HR-related tasks and employee management. It leverages the Google Agent Development Kit (ADK) to create a network of specialized agents that work together to provide information and perform actions.
The system is designed to be a helpful assistant for HR and employee-related queries. It can answer questions about employees, provide HR insights, and perform general web searches for information that it cannot find in its internal knowledge bases.
The system is built around a root_agent that acts as a dispatcher, routing
user queries to the appropriate specialized agent.
The root_agent is the main entry point for all queries. It is responsible for:
- Understanding the user's intent.
- Deferring to the
employees_agentfor any questions about employees. - Deferring to the
insights_agentfor any questions about HR insights. - Using the
google_search_agentas a fallback for any other questions.
The employees_agent is responsible for all employee-related tasks. It has the
following capabilities:
- Querying Employee Data: It can query a BigQuery database to retrieve employee information. It can perform fuzzy searches and handle variations in names.
- Clocking In/Out: It can clock employees in and out.
The google_search_agent is a simple agent that can perform a Google search. It
is used as a fallback by the root_agent when a query cannot be answered by any
of the other agents.
The insights_agent is responsible for providing HR insights. It uses Vertex AI
Search to search a data store of HR-related documents and information.
- Python 3.7+
- Google Cloud SDK
- Access to a Google Cloud project with the following APIs enabled:
- BigQuery API
- Vertex AI API
-
Clone the repository:
git clone https://github.com/NucleusEngineering/hr-agent.git
-
Install the dependencies:
pip install -r requirements.txt
-
Configure the environment variables:
Create a
.envfile (from thedotenvfile) and add the following variables:GOOGLE_CLOUD_PROJECT="your-gcp-project-id" BIGQUERY_DATASET="your-bigquery-dataset" BIGQUERY_TABLE="your-bigquery-table" VERTEX_AI_SEARCH_DATA_STORE_ID="your-vertex-ai-search-data-store-id"
To run the application, you can use the mystery-runner/main.py script. This
will start a local server that you can interact with.
-
Navigate to the
mystery-runnerdirectory:cd mystery-runner -
Run the application:
python main.py
You should see output indicating that the runner has started and a session has been created. You can then start chatting with the agent in your terminal.