An Eliza plugin tailored for researchers and bioscientists, converting scientific papers into structured Knowledge Assets (KAs). These Knowledge Assets integrate seamlessly into RDF triple stores such as OriginTrail's DKG or Oxigraph, enhancing data management and advancing biological research capabilities. 📄🔍🌐
The BioAgent Plugin continuously monitors a specified Google Drive folder for new scientific documents. Upon detection, it automatically transforms these papers into structured Knowledge Assets and incorporates them into a dynamic knowledge graph. An intelligent agent explores this graph to systematically generate novel biological hypotheses across multiple domains, including genetics, molecular biology, and biotechnology. These hypotheses are then rigorously evaluated and scored by the integrated JudgeLLM according to a precise rubric, ensuring their accuracy and relevance. By default, this cycle of hypothesis generation and evaluation occurs every 90 seconds, but the frequency can be customized. 🔄🤖✨
Important
This plugin is currently under development and requires additional refinement before production use. Note that the Google Drive webhook functionality only works with publicly accessible URLs. For local development, we're using ngrok to create a temporary public endpoint for the webhook. In future versions, we plan to implement a simpler approach that directly monitors changes to a local folder.
Note
This plugin is already added to the BioAgents repo here: https://github.com/bio-xyz/bioagents
Follow these steps to install and launch the BioAgent Plugin:
Ensure the following dependencies are installed on your system:
# For Ubuntu/Debian
sudo apt-get install ghostscript graphicsmagick
git clone https://github.com/bio-xyz/plugin-bioagent.git
cd plugin-bioagent
pnpm install
Start PostgreSQL with pgvector extension for vector storage:
docker run --name plugin-bioagent-postgres -e POSTGRES_PASSWORD=123 -p 5432:5432 -d pgvector/pgvector:pg17
Start Oxigraph RDF triple store or use OriginTrail's DKG:
docker run --rm -v $PWD/oxigraph:/data -p 7878:7878 ghcr.io/oxigraph/oxigraph serve --location /data --bind 0.0.0.0:7878
pnpm run dev
This command starts the development server at http://localhost:3000
. Allow around 90 seconds for initial setup, after which the BioAgent Plugin will begin generating and evaluating hypotheses.
Copy and rename the example environment file:
mv .env.example .env
Update your .env
file with the following variables:
PROD_URL=https://your-production-domain.com # for production
DEV_URL=https://handsome-bubblegum-shepherd.ngrok-free.app # for local development (from ngrok)
POSTGRES_URL=postgresql://user:password@localhost:5432/dbname
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
GCP_JSON_CREDENTIALS={"type": "service_account", "project_id": "your_project_id", ...} # Your full GCP service account JSON
GOOGLE_DRIVE_FOLDER_ID=your_google_drive_folder_id # Google Drive folder ID for scientific papers
DISCORD_APPLICATION_ID=your_discord_app_id
DISCORD_API_TOKEN=your_discord_bot_token
DISCORD_VOICE_CHANNEL_ID=your_voice_channel_id # Optional
DISCORD_CHANNEL_ID=your_text_channel_id
BIONTOLOGY_KEY=your_biontology_api_key # Obtain at https://bioportal.bioontology.org/accounts/new
- Visit the Google Cloud Console.
- Select or create your desired project.
- Navigate to APIs & Services > Credentials.
- Click + CREATE CREDENTIALS, then select Service Account.
- Provide a descriptive name for the service account and click Create.
- Assign necessary roles (e.g., Editor) and click Continue.
- Open the newly created service account, go to the Keys tab.
- Click Add Key > Create new key, choose JSON, and click Create. The JSON file will automatically download.
- Copy the JSON as it is in the
.env
file in theGCP_JSON_CREDENTIALS
variable. It should look like this:
GCP_JSON_CREDENTIALS={"type": "service_account", "project_id": "your_project_id", ...} # Your full GCP service account JSON, in a single line
- Open your Google Drive.
- Navigate to the folder associated with the
GOOGLE_DRIVE_FOLDER_ID
. - Right-click the folder and select Share.
- Enter the service account email (available in your downloaded JSON file) into the sharing field.
- Set permissions ("Editor" or "Viewer") accordingly and click Send.
Your Google Cloud service account now has access to the specified folder. 📁🔑✅
- For local development use
ngrok
:
ngrok http --domain=handsome-bubblegum-shepherd.ngrok-free.app 3000
Add the ngrok URL to your .env
:
DEV_URL=https://handsome-bubblegum-shepherd.ngrok-free.app
- For production:
Add your production domain to
.env
:
PROD_URL=https://your-production-domain.com
The webhook will automatically use DEV_URL
in development and PROD_URL
in production. 🔄📄