Build AI scientist systems using ToolUniverse Python SDK for scientific research. Use when users need to access 1000++ scientific tools through Python code, create scientific workflows, perform drug discovery, protein analysis, genomics analysis, literature research, or any computational biology task. Triggers include requests to use scientific tools programmatically, build research pipelines, analyze biological data, search literature, predict drug properties, or create AI-powered scientific workflows.
3 calling patterns -- start with pattern 1:
tu.run({"name": ..., "arguments": ...}) -- single tool call, dict API (most portable)tu.tools.ToolName(param=value) -- function API (recommended for interactive use)pip install tooluniverse # Standard
pip install tooluniverse[embedding] # Embedding search (GPU)
pip install tooluniverse[all] # All features
export OPENAI_API_KEY="sk-..." # Required for LLM tool search
export NCBI_API_KEY="..." # Optional
from tooluniverse import ToolUniverse
tu = ToolUniverse()
tu.load_tools() # REQUIRED before any tool call
# Find tools
tools = tu.run({"name": "Tool_Finder_Keyword", "arguments": {"description": "protein structure", "limit": 10}})
# Execute (dict API)
result = tu.run({"name": "UniProt_get_entry_by_accession", "arguments": {"accession": "P05067"}})
# Execute (function API)
result = tu.tools.UniProt_get_entry_by_accession(accession="P05067")
calls = [
{"name": "UniProt_get_entry_by_accession", "arguments": {"accession": "P05067"}},
{"name": "UniProt_get_entry_by_accession", "arguments": {"accession": "P12345"}},
]
results = tu.run_batch(calls)
def drug_discovery_pipeline(disease_id):
tu = ToolUniverse(use_cache=True)
tu.load_tools()
try:
targets = tu.tools.OpenTargets_get_associated_targets_by_disease_efoId(efoId=disease_id)
compound_calls = [
{"name": "ChEMBL_search_molecule_by_target",
"arguments": {"target_id": t['id'], "limit": 10}}
for t in targets['data'][:5]
]
compounds = tu.run_batch(compound_calls)
return {"targets": targets, "compounds": compounds}
finally:
tu.close()
# Caching
tu = ToolUniverse(use_cache=True)
stats = tu.get_cache_stats()
tu.clear_cache()
# Hooks (auto-summarization of large outputs)
tu = ToolUniverse(hooks_enabled=True)
# Load specific categories
tu.load_tools(categories=["proteins", "drugs"])
load_tools() before using any toolstools['tools'] after isinstance(tools, dict) checkUniProt_get_entry_by_accession not uniprot_get_...tu.all_tool_dict["ToolName"]['parameter'].get('required', [])from tooluniverse.exceptions import ToolError, ToolUnavailableError, ToolValidationError