Skip to content

[WIP] Biothings tools#277

Draft
ahueb wants to merge 7 commits intosnap-stanford:mainfrom
andrewsu:biothings_tools
Draft

[WIP] Biothings tools#277
ahueb wants to merge 7 commits intosnap-stanford:mainfrom
andrewsu:biothings_tools

Conversation

@ahueb
Copy link

@ahueb ahueb commented Jan 27, 2026

Note: updating branch with overlapping sources, work in progress

Summary

Biothings is an ecosystem of FAIR APIs containing gene, variant, chemical, disease, and taxon data (https://biothings.io/). This PR adds a tool wrapping the existing biothings-client Python library https://pypi.org/project/biothings-client/

Changes Made

Added a new tool, query_biothings, in tools/database.py and description in tool_description/database.py

Future improvements

I noticed other database tools have internal prompt structures to build API requests, I didn't include internal prompting as we aren't fetching directly from a REST API but rather using the existing biothings-client package. I'm unsure if internal prompting may be beneficial so this is a possible future improvement.

Testing

import sys

sys.path.append("../")

from biomni.agent import A1

agent = A1(path="<your_path>", llm="gpt-5.2")

log = agent.go("""please locate gene information for gene ID 1017 using the query_biothings tool""")
log = agent.go("""please locate disease information for alzheimer's disease using the query_biothings tool""")
log = agent.go("""please locate chemical information for dexamethasone using the query_biothings tool""")
log = agent.go("""please locate taxon information for Saccharomyces cerevisiae using the query_biothings tool""")
log = agent.go("""please create a temporary tab separated vcf file with the following contents then use that file to get all variant information from biothings:
##fileformat=VCFv4.2
#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO
7\t140453136\t.\tA\tT\t.\tPASS\t.”""")

✅ all were sucessful

andrewsu and others added 7 commits January 23, 2026 11:15
Add new tool to query the MyGene.info database using the biothings-client
package. Supports querying by Entrez gene IDs to get annotations, or by
gene symbols to find gene IDs. Includes support for efficient batch queries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ahueb ahueb marked this pull request as draft February 18, 2026 17:41
@ahueb ahueb changed the title Biothings tools [WIP] Biothings tools Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments