This guide installs the current repository version of MetaboT for local development or research use.
You will need:
- Python 3.11
condaorminicondarecommendedgit- An API key for at least one supported LLM provider
Optional but useful:
dockeranddocker-composefor containerized runs- A LangSmith key for tracing and evaluation logs
- WSL if you want to run MetaboT on Windows
git clone https://github.com/HolobiomicsLab/MetaboT.git
cd MetaboTThe default branch is main.
conda env create -f environment.yml
conda activate metabotpython -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn Debian or Ubuntu, install compiler headers first if needed:
sudo apt-get update
sudo apt-get install -y python3-dev build-essentialMetaboT is best run through WSL on Windows:
wsl --installInside WSL, follow the Linux installation steps above.
Create a .env file in the project root.
OPENAI_API_KEY=your_api_key_hereIf KG_ENDPOINT_URL is not set, MetaboT defaults to:
https://enpkg.commons-lab.org/graphdb/repositories/ENPKG
# LLM providers
OPENAI_API_KEY=
DEEPSEEK_API_KEY=
ANTHROPIC_API_KEY=
GEMINI_API_KEY=
MISTRAL_API_KEY=
OVHCLOUD_API_KEY=
HUGGINGFACE_API_KEY=
# Optional custom endpoint
KG_ENDPOINT_URL=https://enpkg.commons-lab.org/graphdb/repositories/ENPKG
SPARQL_USERNAME=
SPARQL_PASSWORD=
# Optional tracing
LANGCHAIN_API_KEY=
LANGCHAIN_PROJECT=MetaboT
LANGCHAIN_ENDPOINT=https://api.smith.langchain.comMetaboT reads provider-specific keys based on the model configuration in app/config/params.ini.
The fastest smoke test is to run one of the bundled standard questions:
python -m app.core.main -q 1You can also run the installation test script:
python app/tests/installation_test.pySuccessful execution confirms that MetaboT can initialize the workflow, connect to the knowledge graph, and execute a query.
docker-compose build
docker-compose run --rm metabot python -m app.core.main -q 1To use a custom SPARQL endpoint, either:
- set
KG_ENDPOINT_URLin.env, or - pass
--endpointat runtime
Example:
python -m app.core.main -c "Which extracts contain flavonoids?" --endpoint https://your-endpoint.example/sparqlIf the endpoint requires authentication, add:
SPARQL_USERNAME=your_username
SPARQL_PASSWORD=your_passwordMetaboT currently ships example model configurations for:
- OpenAI
- DeepSeek
- Anthropic via LiteLLM
- Gemini via LiteLLM
- Mistral via LiteLLM
- OVH-hosted Llama
To switch providers, update the relevant section in app/config/params.ini and ensure the matching API key is present in .env.
- Check that
KG_ENDPOINT_URLpoints to a live endpoint. - Confirm credentials if your endpoint requires authentication.
- Test against the default ENPKG endpoint first to isolate endpoint-specific issues.
If Python cannot find the app package during ad hoc runs, make sure you are executing commands from the repository root and that your environment is activated.
If psycopg2 or other compiled packages fail during setup, use the Conda environment from environment.yml, which is the most reproducible path for this repository.
- Continue with the Quick Start
- Review the Overview
- Customize providers and endpoints in the Configuration Guide