This page gets you from installation to a first successful MetaboT query as quickly as possible.
If you want to see the system before installing anything, use the public demonstrator:
https://metabot.holobiomicslab.eu
The demo is connected to the ENPKG knowledge graph built from an open dataset of 1,600 plant extracts.
After following the Installation Guide, a minimal .env file can be as small as:
OPENAI_API_KEY=your_api_key_hereIf you do not set KG_ENDPOINT_URL, MetaboT uses the public ENPKG endpoint by default.
MetaboT ships with predefined examples listed in app/data/standard_questions.txt.
Run the first one:
python -m app.core.main -q 1This command:
- loads the configured models
- connects to the default or configured SPARQL endpoint
- runs one of the bundled benchmark-style questions
- prints the result and, when relevant, the generated SPARQL and CSV path
python -m app.core.main -c "What are the SIRIUS structural annotations for Tabernaemontana coffeoides?"Another example from the manuscript:
python -m app.core.main -c "Which lab extracts have bioassay results with inhibition percentages above 50% against Leishmania donovani?"MetaboT is most useful for questions such as:
- taxon-centric annotation queries
- chemical class filtering
- cross-sample comparisons
- bioassay and target queries
- structure- or spectrum-linked lookups
Examples:
python -m app.core.main -c "Count the number of LCMS features in negative ionization mode"
python -m app.core.main -c "List the bioassay results at 10ug/mL against T.cruzi for lab extracts of Tabernaemontana coffeoides"
python -m app.core.main -c "Which extracts have features annotated as aspidosperma-type alkaloids by CANOPUS with a probability score above 0.5?"To query another knowledge graph endpoint for a single run:
python -m app.core.main -c "Which extracts contain flavonoids?" --endpoint https://your-endpoint.example/sparqlFor a persistent change, set KG_ENDPOINT_URL in .env.
The repository also contains a Streamlit interface:
export PYTHONPATH="$(pwd):${PYTHONPATH}"
pip install -r requirements.txt
streamlit run streamlit_webapp/streamlit_app.pyAfter the app starts, enter your OpenAI API key in the Streamlit sidebar under Set a OpenAI API Key.
This interface is useful when you want a chat-style workflow, file uploads, or interactive result exploration.
For a typical knowledge question, the workflow is:
Entry Agentclassifies the request.Validator Agentchecks whether the question is valid for the graph.Supervisor Agentdecides whether entity resolution is needed.ENPKG_agentresolves taxa, targets, or chemical entities when necessary.Sparql_query_runnergenerates and executes schema-aware SPARQL.Interpreter_agentsummarizes or visualizes the output if needed.
The results are written to temporary CSV files. When the results are small, they are also displayed inline; for large result sets, only the file path is provided to avoid exceeding the LLM context window.
- Confirm that your environment is activated.
- Make sure at least one required API key is set.
- Test with the default ENPKG endpoint before debugging a custom endpoint.
MetaboT validates questions against the knowledge graph schema. Try a simpler question first, then increase specificity.
Run Streamlit from the repository root and set:
export PYTHONPATH="$(pwd):${PYTHONPATH}"- Read the Overview for the architecture
- Update providers and endpoints in the Configuration Guide
- Browse additional examples