Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0574e5a
Merge pull request #166 from HolobiomicsLab/main
lfnothias Apr 23, 2026
90d2a01
Update litellm version to 1.83.0 in environment.yml and requirements.txt
lfnothias Apr 23, 2026
1a46419
Update dependencies in environment.yml and requirements.txt for langc…
lfnothias Apr 23, 2026
10e9a55
Update python-dotenv, requests, streamlit, and tqdm versions in envir…
lfnothias Apr 23, 2026
f9bf608
Add big_benchmark.csv for automated evaluation
madina1203 Apr 23, 2026
69ec4a5
Fix deprecated pydantic imports and update requirements
madina1203 Apr 23, 2026
2dd5135
Update the order of questions to be consistent with automated evaluation
madina1203 Apr 23, 2026
3aa9458
Update installation_test
madina1203 Apr 24, 2026
5384796
Clean the evaluation dateset (remove redundant column)
madina1203 Apr 24, 2026
085c973
Merge pull request #169 from HolobiomicsLab/dev_madina
lfnothias Apr 24, 2026
8adb7a3
Replace codeinterpreterapi with PythonREPL and update models to gpt-5.4
lfnothias Apr 24, 2026
7227872
Fix node name mismatch
madina1203 Apr 24, 2026
09b836c
Merge pull request #171 from HolobiomicsLab/dev_madina
lfnothias Apr 24, 2026
b41b611
add CLI file input support for FILE_ANALYZER tool
madina1203 Apr 24, 2026
6e65f99
feat: Implement Interpreter Agent with sandbox execution and trusted …
lfnothias Apr 24, 2026
115678a
Harden interpreter file handling and output tracking
lfnothias Apr 24, 2026
1515fec
Add session file preparation error handling and corresponding tests
lfnothias Apr 24, 2026
524c2b1
Harden interpreter sandbox error handling and upload safety
lfnothias Apr 24, 2026
6a32a28
Merge pull request #172 from HolobiomicsLab/dev_madina
lfnothias Apr 24, 2026
c72de39
feat: Add OpenAI key support to agent creation and enhance tool funct…
lfnothias Apr 24, 2026
94c7840
feat: Update README for v1.1.0 highlights and improve Streamlit app l…
lfnothias Apr 24, 2026
492636b
Merge branch 'main' into dev
lfnothias Apr 24, 2026
84892c8
Tighten Streamlit startup and test isolation
lfnothias Apr 25, 2026
4bd7a17
Update pr_agent.yml
lfnothias Apr 25, 2026
10af7b6
fix: Add timeout handling for subprocess in test_execute_user_code
lfnothias Apr 25, 2026
b708280
Add how to run evaluation.py (LangSmith api key is needed)
madina1203 Apr 26, 2026
a1feb1b
Merge pull request #173 from HolobiomicsLab/dev_madina
lfnothias May 5, 2026
b3e04dd
Merge branch 'main' into dev
lfnothias May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/pr_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
branches:
- main
- dev
- dev_lfx
- dev_madina
- dev_Mkdocs
workflow_dispatch:
inputs:
branch:
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@

---

## v1.1.0 Highlights

- Hardened the interpreter path by isolating LLM-generated Python behind trusted-mode controls and a subprocess runner instead of in-process execution.
- Improved CLI safety with better file staging validation, collision handling, session-scoped logging, and consistent `--api-key` propagation through fallback SPARQL paths.
- Made the Streamlit app easier to launch locally by stabilizing its import path handling and aligning the recommended startup command with the tested repo-root workflow.

=======
Comment thread
coderabbitai[bot] marked this conversation as resolved.
## Demo

Try the public MetaboT demonstrator at [metabot.holobiomicslab.eu](https://metabot.holobiomicslab.eu). It is connected to the Experimental Natural Products Knowledge Graph (ENPKG), an open metabolomics knowledge graph built from a chemodiverse collection of [1,600 plant extracts](https://doi.org/10.1093/gigascience/giac124).
Expand Down Expand Up @@ -99,6 +106,14 @@ conda env create -f environment.yml
conda activate metabot
```

To launch the application through Streamlit, install the dependencies and run the app from the repository root. In your terminal, execute:

```bash
pip install -r requirements.txt
python -m streamlit run streamlit_webapp/streamlit_app.py
```

This repo-root launch path is the recommended setup for local development and matches the Streamlit smoke-tested workflow used in `v1.1.0`. You can provide your OpenAI key in the sidebar once the app starts, or preconfigure contributor/admin keys through environment variables if you use those deployment paths.
If you prefer a plain virtual environment instead of Conda:

```bash
Expand Down
7 changes: 2 additions & 5 deletions app/config/langgraph.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
{"name": "Entry_Agent", "path": "app.core.agents.entry.agent", "llm_choice": "llm_o"},
{"name": "ENPKG_agent", "path": "app.core.agents.enpkg.agent", "llm_choice": "llm_o"},
{"name": "Sparql_query_runner", "path": "app.core.agents.sparql.agent", "llm_choice": "llm_o"},
{"name": "Interpreter_agent", "path": "app.core.agents.interpreter.agent", "llm_choice": "llm_o"},
{"name": "supervisor", "path": "app.core.agents.supervisor.agent", "llm_choice": "llm_o"},
{"name": "Validator", "path": "app.core.agents.validator.agent", "llm_choice": "llm_o"}
],
"edges": [
{"source": "ENPKG_agent", "target": "supervisor"},
{"source": "Sparql_query_runner", "target": "supervisor"},
{"source": "Interpreter_agent", "target": "supervisor"}
{"source": "Sparql_query_runner", "target": "supervisor"}
],
"conditional_edges": [
{
Expand All @@ -19,7 +17,6 @@
"targets": [
{"condition_value": "ENPKG_agent", "target": "ENPKG_agent"},
{"condition_value": "Sparql_query_runner", "target": "Sparql_query_runner"},
{"condition_value": "Interpreter_agent", "target": "Interpreter_agent"},
{"condition_value": "FINISH", "target": "__end__"}
]
},
Expand All @@ -41,6 +38,6 @@
"entry_point": "Entry_Agent",
"supervisor": {
"name": "supervisor",
"members": ["ENPKG_agent", "Sparql_query_runner", "Interpreter_agent"]
"members": ["ENPKG_agent", "Sparql_query_runner"]
}
}
8 changes: 4 additions & 4 deletions app/config/params.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[llm_preview]
id = gpt-4o
id = gpt-5.4
temperature = 0.3
max_retries = 3

[llm_o]
id = gpt-4o
id = gpt-5.4
temperature = 0
max_retries = 3


[llm_mini]
id = gpt-4o-mini
id = gpt-5.4-mini
temperature = 0
max_retries = 3

Expand Down Expand Up @@ -48,7 +48,7 @@ max_retries = 3
base_url = https://llama-3-1-70b-instruct.endpoints.kepler.ai.cloud.ovh.net/api/openai_compat/v1

[llm_litellm_openai]
id = gpt-4o
id = gpt-5.4
temperature = 0


Expand Down
3 changes: 1 addition & 2 deletions app/core/agents/agents_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

logger = setup_logger(__name__)

config = load_config()


def create_all_agents(llms, graph, openai_key=None, session_id=None):
"""
Expand All @@ -27,6 +25,7 @@ def create_all_agents(llms, graph, openai_key=None, session_id=None):
dict: A dictionary mapping agent names to their created executor instances.
"""

config = load_config()
agents = config["agents"]
executors = {}

Expand Down
4 changes: 2 additions & 2 deletions app/core/agents/enpkg/tool_chemicals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from langchain_openai import OpenAIEmbeddings


from langchain.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
from langchain.tools import BaseTool
from typing import Optional

Expand Down Expand Up @@ -47,7 +47,7 @@ class ChemicalResolver(BaseTool):
Dict[str, str]: a dictionary that contains the output chemical name and corresponding NPC Class URI.
"""

args_schema = ChemicalInput
args_schema: type[BaseModel] = ChemicalInput
csv_data: List[Document] = None
retriever: Any = None
openai_key: str = None
Expand Down
4 changes: 2 additions & 2 deletions app/core/agents/enpkg/tool_smiles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import requests

from langchain.tools import BaseTool
from langchain.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field

from typing import Optional

Expand Down Expand Up @@ -36,7 +36,7 @@ class SMILESResolver(BaseTool):
smiles_string = "CCC12CCCN3C1C4(CC3)C(CC2)NC5=CC=CC=C45"
inchikey = _run(smiles_string)
"""
args_schema = SMILESInput
args_schema: type[BaseModel] = SMILESInput
openai_key: str = None

def __init__(self, openai_key: str = None):
Expand Down
4 changes: 2 additions & 2 deletions app/core/agents/enpkg/tool_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



from langchain.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field

from typing import Optional

Expand Down Expand Up @@ -38,7 +38,7 @@ class TargetResolver(BaseTool):
str: A string containing the ChEMBLTarget notation.
"""

args_schema = TargetInput
args_schema: type[BaseModel] = TargetInput
openai_key: str = None

def __init__(self, openai_key: str = None):
Expand Down
12 changes: 5 additions & 7 deletions app/core/agents/enpkg/tool_taxon.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from typing import Optional
from typing import ClassVar, Optional

from SPARQLWrapper import JSON, SPARQLWrapper


from langchain.pydantic_v1 import BaseModel, Field

from typing import Optional
from pydantic import BaseModel, Field

from langchain.callbacks.manager import (
CallbackManagerForToolRun,
Expand Down Expand Up @@ -34,10 +32,10 @@ class TaxonResolver(BaseTool):
Returns:
str: A string that contains the Wikidata IRI if found, otherwise `None`.
"""
args_schema = TaxonInput
args_schema: type[BaseModel] = TaxonInput

ENDPOINT_URL = "https://query.wikidata.org/sparql"
PREFIXES = """
ENDPOINT_URL: ClassVar[str] = "https://query.wikidata.org/sparql"
PREFIXES: ClassVar[str] = """
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
Expand Down
8 changes: 6 additions & 2 deletions app/core/agents/entry/tool_filesparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
import pandas as pd
from datetime import datetime
from langchain.tools import BaseTool
from langchain.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
from pathlib import Path
from app.core.session import setup_logger, create_user_session

logger = setup_logger(__name__)

class FileAnalyzerInput(BaseModel):
"""Input schema for FileAnalyzer - no input fields required."""
pass

class FileAnalyzer(BaseTool):
name: str = "FILE_ANALYZER"
description: str = """
Analyzes files in a specified directory and provides a summary of their content.
"""
args_schema = BaseModel # Using BaseModel directly since no specific input fields are necessary
args_schema: type[BaseModel] = FileAnalyzerInput
folder_path: Path = None
openai_key: str = None
session_id: str = None
Expand Down
1 change: 1 addition & 0 deletions app/core/agents/interpreter/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def create_agent(llms, graph, openai_key, session_id) -> AgentExecutor:
tool_parameters = {
"openai_key": openai_key,
"session_id": session_id,
"llm_instance": llms.get(MODEL_CHOICE),
}

tools = import_tools(directory, module_prefix, **tool_parameters)
Expand Down
3 changes: 2 additions & 1 deletion app/core/agents/interpreter/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@

For using INTERPRETER_TOOL tool, you have to provide all the information needed for the interpretation of the question.This allows INTERPRETER_TOOL to analyze the information thoroughly and provide a clear, concise answer to the initial question.
Your input for the tool should be a dictionary with one key, __arg1, and the value of this key should be a string contain at least all relevant complete filepaths, the user question and your demands for the tool. You should include, if any, the generated SPARQL query or other relevant information.
Wrap every filepath in quotes. This is mandatory for any filepath containing spaces and preferred for all filepaths.
Your demand should explicitly say what you want from the tool. Please include
Example:
Filepath: Filepath provided by SPARQL_QUERY_RUNNER
Filepath: "Filepath provided by SPARQL_QUERY_RUNNER"
User question: User question
Demand: Interpret the file to give x and y information and provide a chart
Other relevant information: Other information here
Expand Down
Loading