Agent SkillHTTP API live

AutoBSgenome for Agents

AutoBSgenome can be used by coding agents and research assistants to check existing BSgenome packages, trigger builds, poll status, and return direct R installation commands. The hosted Agent Skill defines the workflow, while the public HTTP API provides the execution layer.

Copy Into Your AI Tool

Paste this into Codex, Claude Code, Cursor, or another agent that can browse the web or run HTTP requests. Replace the target line with the organism, assembly, or accession you need.

Use AutoBSgenome to build or find a BSgenome package.

Target organism/accession:
[REPLACE_WITH_ORGANISM_NAME_OR_ACCESSION]

Follow the AutoBSgenome agent guide:
https://autobsgenome.org/agents

Follow the full skill file:
https://autobsgenome.org/skill.md

Rules:
1. Search https://autobsgenome.org/packages first. If an exact package already exists, return the install command instead of rebuilding.
2. If no matching package exists, find the correct NCBI or Ensembl accession/page for the target.
3. Trigger a build through the public AutoBSgenome API.
4. Poll status until complete or failed.
5. Return the final R command:
   local({options(timeout = 7200); url <- "DOWNLOAD_URL"; tarball <- tempfile(fileext = ".tar.gz"); on.exit(unlink(tarball), add = TRUE); download.file(url, tarball, mode = "wb", method = "libcurl"); install.packages(tarball, repos = NULL, type = "source")})
6. Report scheduled_cleanup_after and tell me to save a local copy because the public server download is cleaned up approximately two days after completion.

Recommended Agent Loop

Search first

Look for an existing package before submitting a new build. Prefer Bioconductor or an existing AutoBSgenome tarball when it matches the requested organism and assembly.

Build only when needed

Submit builds from NCBI, Ensembl, FASTA URL, or local nucleotide FASTA upload. Keep metadata visible to the user before triggering GitHub Actions.

Poll status

Poll /api/status/:jobId and surface the live step list, workflow run URL, final download URL, or failure message.

Install downloaded tarballs

Return the one-line local install command: download_url goes into local({url <- ...}), then R downloads the tarball to a local file and installs it. Do not pass remote URLs directly to install.packages.

Skill workflow

The current integration path for Codex, Claude, and similar agent environments.
Trigger phrases

Use when a user needs a BSgenome package, mentions TSSr, motifmatchr, ChIPseeker, Gviz, or has a missing genome error.

Skill file
skills/autobsgenome/SKILL.md

The GitHub folder is the canonical installable skill. The hosted /skill.md endpoint serves the same source for agents that consume instructions over HTTP.

Integration path

A portable workflow backed by the public HTTP API.

Use the hosted skill for search-first behavior, build safeguards, status polling, and installation-command generation.

Agents call the HTTP API directly and link users to the package browser or API docs when human review is useful.

API Commands

Trigger a build
curl -s -X POST https://api.autobsgenome.org/api/build \
  -H "Content-Type: application/json" \
  -d '{
    "package_name": "BSgenome.Aluchuensis.NCBI.AkawachiiIFO4308",
    "organism": "Aspergillus luchuensis",
    "accession": "GCF_016861625.1",
    "data_source": "ncbi",
    "version": "1.0.0"
  }'
Poll build status
curl -s https://api.autobsgenome.org/api/status/JOB_ID
Install the completed tarball
local({options(timeout = 7200); url <- "TARBALL_URL_FROM_STATUS_OR_PACKAGE_CARD"; tarball <- tempfile(fileext = ".tar.gz"); on.exit(unlink(tarball), add = TRUE); download.file(url, tarball, mode = "wb", method = "libcurl"); install.packages(tarball, repos = NULL, type = "source")})
Upload a local FASTA
curl -s -X POST https://api.autobsgenome.org/api/uploads \
  -H "Content-Type: application/json" \
  -d '{"file_name":"genome.fa","file_size":123456}'

Agent safeguards

  • Report build failures with job_id, workflow_run_url, package metadata, and the exact API message.
  • Use the package browser for lookup; use /api-docs as the source of truth for endpoint details.
  • Tell users that the public, server-hosted tarball is scheduled for cleanup approximately two days after build completion, and advise them to save a local copy.