|
|
||
|---|---|---|
| .roo | ||
| .vscode | ||
| config | ||
| docs | ||
| mnt/shared | ||
| src/dave_agent | ||
| tools | ||
| .dockerignore | ||
| .env.sample | ||
| .env.test | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| .roomodes | ||
| Dockerfile | ||
| FUNDING.md | ||
| Jenkinsfile.build | ||
| Jenkinsfile.provisioning | ||
| LICENSE.md | ||
| README.md | ||
| compose.yaml | ||
| debug.yaml | ||
| freeze.txt | ||
| pyproject.toml | ||
| requirements-dev.txt | ||
| requirements.txt | ||
README.md
DAVE - D4Science AI Virtual Assistant
DAVE is an AI agent designed to act as a knowledgeable and helpful assistant for researchers using the D4Science platform. It helps users find information, understand services, and navigate the D4Science ecosystem by leveraging a long-term memory system powered by a vector database.
This project is built using the Google Agent Development Kit (ADK).
Project Structure
/
├── src/
│ └── dave_agent/ # Main agent source code
├── d4science_lib/ # Local library for D4Science APIs
├── config/ # D4Science configuration files
├── mnt/ # Mount points for persistent data (e.g., vector store)
├── Dockerfile # Defines the container images
├── compose.yaml # Docker Compose for production
├── debug.yaml # Docker Compose for development/debugging
├── pyproject.toml # Project dependencies
└── .env.sample # Sample environment variables
Documentation
For more detailed information, please refer to the documentation in the docs/ directory:
- Development Setup: A comprehensive guide for setting up the local development environment.
- Deployment Guide: Instructions for deploying the application to Docker Swarm.
- Environments: An overview of the DEV and PROD deployment environments.
- Architecture: An overview of the agent's architecture.
Getting Started (Docker Recommended)
This guide will walk you through setting up and running the project using Docker, which is the recommended method for consistency.
Prerequisites
- Docker and Docker Compose are installed and running on your machine.
1. Environment Configuration (.env)
The application uses an .env file to manage environment-specific variables, such as ports and container names.
- Create an
.envfile: In the project root, copy the sample environment file.cp .env.sample .env - Edit the
.envfile: Review the variables in the.envfile and adjust them if necessary.
2. D4Science Configuration (config/)
The agent requires specific configuration and credential files to interact with D4Science services.
- Copy the Sample Files:
cd config cp d4s_config.sample.json d4s_config.json cp d4s_credentials.json.sample d4s_credentials.json cp dave_config.sample.json dave_config.json cd .. - Edit the JSON Files:
- Fill in the required values in
d4s_config.jsonandd4s_credentials.jsonwith your D4Science credentials. - Review and update
dave_config.jsonto configure the agent's behavior.
- Fill in the required values in
Running the Application with Docker
Development Mode (with Debugging and Hot-Reload)
This mode is for active development. It mounts the local source code into the container, enabling hot-reloading, and exposes a debug port.
-
Build and Run the Containers:
docker compose -f debug.yaml up --build -
Access the Web UI: The web interface will be available at
http://127.0.0.1:8000(or theDAVE_AGENT_PORT). -
Attach the VS Code Debugger:
- Open the "Run and Debug" panel in VS Code (Ctrl+Shift+D).
- Select the "Python: Attach to Docker" configuration and press F5.
Efficient Development Workflow
For a faster development loop, you can run the long-term-memory service in the background and only restart the dave-agent service when you make changes.
-
Start the Memory Service in Detached Mode: This command starts only the Qdrant database container and leaves it running in the background.
docker compose -f debug.yaml up -d long-term-memory -
Start and Stop the Agent Service: Run this command to start the agent. It will connect to the already running memory service.
docker compose -f debug.yaml up dave-agentWhen you are ready to stop, press
Ctrl+Cin this terminal. This will only stop thedave-agentcontainer, leaving the database running and ready for your next session.