s2f-agent is a skill-routing agent for computational genomics. It turns open-ended research questions into deterministic, runnable analysis plans across 11 model families — covering variant-effect prediction, sequence embedding, track prediction, fine-tuning, and environment setup.
Fresh-machine bootstrap (recommended):
./scripts/bootstrap.sh
# or
make bootstrapOne-time persistent setup (keeps envs and model caches across sessions):
./scripts/bootstrap.sh \
--persistent-root "${XDG_CACHE_HOME:-$HOME/.cache}/s2f-agent" \
--prefetch-models
# load the generated runtime env in new shells
source "${XDG_CACHE_HOME:-$HOME/.cache}/s2f-agent/env.sh"Equivalent Make target:
make bootstrap-persistent PREFETCH_MODELS=1First run after bootstrap:
./scripts/link_skills.sh
./scripts/route_query.sh --query "Use \$dnabert2 to validate my train/dev/test CSV files"
./scripts/run_agent.sh --query "Need variant-effect guidance for chr12 REF/ALT"
./scripts/smoke_test.sh --skills-dir "${CODEX_HOME:-$HOME/.codex}/skills"- Functional Capabilities
- Application Scenarios
- Skill Catalog
- Repository Structure
- Routing and Agent Runtime
- Installation and Deployment
- Validation and Troubleshooting
- Contributing
- Star History
| Capability | What it enables | Entry points |
|---|---|---|
| Skill-grounded execution | Domain-specific guidance for genomics model families and workflows | skills/*/SKILL.md, skills-dev/*/SKILL.md, docs/skills-reference.md |
| Deterministic routing | Ranked skill selection with route / clarify decision and confidence |
scripts/route_query.sh, registry/routing.yaml, docs/routing.md |
| Canonical input schema | Shared canonical input keys, aliases, and coordinate conventions | registry/input_schema.yaml, scripts/validate_input_contracts.sh, docs/input-schema.md |
| Task-contract checks | Detects missing required inputs before execution guidance | scripts/run_agent.sh, registry/task_contracts.yaml, docs/contracts.md |
| Plan standardization | Emits normalized task plans with runnable steps and expected outputs | scripts/run_agent.sh, registry/output_contracts.yaml, registry/recovery_policies.yaml, docs/contracts.md |
| Plan execution | Dry-run or execute generated steps and verify expected outputs | scripts/execute_plan.sh, docs/scripts-reference.md |
| Cross-skill playbook mapping | Maps user intent to reusable task playbooks | playbooks/*/README.md, docs/architecture.md |
| Reproducible environment setup | Standardized stack provisioning and one-step bootstrap | scripts/provision_stack.sh, scripts/bootstrap.sh, Makefile, docs/scripts-reference.md |
| Validation and regression checks | Registry, metadata, migration, and routing consistency checks | scripts/validate_*.sh, make validate-agent, docs/evals.md |
| Scenario | Typical objective | Primary skills | Playbook | Docs |
|---|---|---|---|---|
| Variant-effect analysis | Compare REF vs ALT impact or prioritize variants | alphagenome-api, borzoi-workflows, gpn-models, evo2-inference |
variant-effect |
contracts, input-schema |
| Embedding and representation | Produce sequence embeddings for downstream analyses | dnabert2, nucleotide-transformer-v3, nucleotide-transformer, evo2-inference |
embedding |
contracts, input-schema |
| Track prediction workflows | Run sequence-to-signal prediction with model-appropriate constraints | alphagenome-api, nucleotide-transformer-v3, borzoi-workflows, segment-nt |
track-prediction |
contracts, input-schema |
| Fine-tuning and training setup | Prepare schemas, training configs, and model-specific run paths | dnabert2, nucleotide-transformer-v3, bpnet, basset-workflows |
fine-tuning |
contracts, input-schema |
| Environment bring-up and migration | Build reproducible stacks and verify operational readiness | skill-factory plus stack-specific skills |
environment-setup |
scripts-reference, architecture |
The repository currently includes 11 packaged skills.
Status definition:
Stable: canonical package inskills/<skill-id>/Dev: in-progress package inskills-dev/<skill-id>/- default routing/install/validation only include
enabled=trueskills inregistry/skills.yaml(use--include-disabledto opt in)
| Skill ID | Status | Path | Best for | Explicit invocation | Docs |
|---|---|---|---|---|---|
alphagenome-api |
Stable | skills/alphagenome-api |
AlphaGenome setup, variant-effect, interval/track prediction, plotting, troubleshooting | $alphagenome-api |
SKILL.md · references/ |
basset-workflows |
Dev | skills-dev/basset-workflows |
Legacy Basset Torch7 preprocessing, prediction, interpretation, SAD | $basset-workflows |
SKILL.md · references/ |
bpnet |
Dev | skills-dev/bpnet |
BPNet preprocessing, train/predict/SHAP, motif integration | $bpnet |
SKILL.md · references/ |
borzoi-workflows |
Stable | skills/borzoi-workflows |
Borzoi setup, tutorials, variant scoring, interpretation | $borzoi-workflows |
SKILL.md · references/ |
dnabert2 |
Stable | skills/dnabert2 |
Embeddings, GUE evaluation, CSV validation, fine-tuning | $dnabert2 |
SKILL.md · references/ |
evo2-inference |
Stable | skills/evo2-inference |
Evo 2 setup, checkpoint choice, inference, deployment | $evo2-inference |
SKILL.md · references/ |
gpn-models |
Stable | skills/gpn-models |
GPN-family framework selection and usage | $gpn-models |
SKILL.md · references/ |
nucleotide-transformer |
Dev | skills-dev/nucleotide-transformer |
Classic NT v1/v2 JAX inference, tokenization, embeddings | $nucleotide-transformer |
SKILL.md · references/ |
nucleotide-transformer-v3 |
Stable | skills/nucleotide-transformer-v3 |
NTv3 inference, species conditioning, mode-aware fine-tuning (prep/train) |
$nucleotide-transformer-v3 |
SKILL.md · references/ |
segment-nt |
Stable | skills/segment-nt |
SegmentNT-family segmentation inference and scaling logic | $segment-nt |
SKILL.md · references/ |
skill-factory |
Stable | skills/skill-factory |
Scaffold and validate consistent skill packages from specs | $skill-factory |
SKILL.md · references/ |
Reference notes used during skill development are in Readme/.
s2f-agent/
├── agent/ # orchestrator identity, routing and safety policy
├── registry/ # skills index, tags, routing/task/output/recovery contracts
├── skills/ # canonical stable skill packages
├── skills-dev/ # in-progress skill packages
├── playbooks/ # task-level runbooks plus step-by-step learning guides
├── evals/ # routing + groundedness + task-success evaluation cases
├── docs/ # architecture and design notes
├── scripts/ # setup, routing, orchestration, validation tooling
├── Readme/ # source notes and upstream references
└── README.md
Architecture details: docs/architecture.md.
The s2f agent turns open-ended genomics requests into deterministic, inspectable execution plans.
What it does on each query:
- infer (or accept) task intent
- rank skill candidates and emit
routeorclarify - validate required task inputs
- generate a normalized
plancontract - support dry-run or execution of plan steps
| Command | Use when | Primary output |
|---|---|---|
scripts/route_query.sh |
You only need routing confidence and skill ranking | decision, confidence, primary/secondary skills |
scripts/run_agent.sh |
You need full orchestration (routing + input checks + plan) | structured agent response with plan |
scripts/execute_plan.sh |
You want to dry-run or run generated plan.runnable_steps |
execution summary + expected output verification |
./scripts/route_query.sh --query "Need variant-effect guidance for hg38 chr12 REF ALT" --format json
./scripts/run_agent.sh --task variant-effect --query 'Use $alphagenome-api variant-effect on hg38 chr12 REF A ALT G' --format json
./scripts/execute_plan.sh --task variant-effect --query 'Use $alphagenome-api variant-effect on hg38 chr12 REF A ALT G'Note: use single quotes around queries containing $skill to avoid shell expansion.
- Route the request:
./scripts/route_query.sh --query "Need variant-effect guidance around chr12 with REF/ALT." --format textExpected checkpoint: decision=route or decision=clarify with a focused clarify question.
- Build a full plan:
./scripts/run_agent.sh --task variant-effect --query 'Use $alphagenome-api variant-effect on hg38 chr12 REF A ALT G' --format jsonExpected checkpoint: primary_skill=alphagenome-api, missing_inputs=[], non-null plan.
- Validate plan execution path (dry-run):
./scripts/execute_plan.sh --task variant-effect --query 'Use $alphagenome-api variant-effect on hg38 chr12 REF A ALT G' --format textExpected checkpoint: dry_run=1, failed=0, verify_failed=0.
| Field | Meaning | Why it matters |
|---|---|---|
decision |
route or clarify |
tells you whether execution can proceed immediately |
primary_skill |
selected lead skill | confirms routing target |
missing_inputs |
required inputs not found in query | drives clarify questions and assumption risk |
plan |
normalized execution contract | source of runnable steps and expected outputs |
clarify_question |
focused follow-up question | shortest path to unblock low-confidence routing |
Contract-first references:
playbooks/variant-effect/README.mdplaybooks/embedding/README.mdplaybooks/track-prediction/README.mdplaybooks/fine-tuning/README.mdplaybooks/environment-setup/README.mdregistry/input_schema.yaml
Learning in playbooks:
playbooks/README.mdplaybooks/getting-started/README.mdplaybooks/variant-effect/README.mdplaybooks/embedding/README.mdplaybooks/track-prediction/README.mdplaybooks/fine-tuning/README.mdplaybooks/environment-setup/README.mdplaybooks/troubleshooting/README.md
Open the local interactive console:
./scripts/agent_console.shThis repository can be used in two layers:
- Codex skills only: install the packaged skill folders so Codex can route to them immediately.
- Full s2f runtime: also provision Python environments and model stacks for local execution.
For extended Codex/plugin notes, see docs/codex-install.md.
- Bash and Git.
- Node.js/npm only if installing with
npx skills. - Python 3.10+ for local runtime provisioning.
- Conda only for the
evo2-fullpath. - NVIDIA GPU + CUDA only for local Evo 2 GPU paths (
evo2-light/evo2-full).
List the skills published by this repository:
npx --yes skills add JiaqiLiZju/s2f-agent --list -a codex --full-depthInstall the stable Codex skill set:
npx --yes skills add JiaqiLiZju/s2f-agent \
-a codex -g -y --copy --full-depth \
--skill alphagenome-api \
--skill borzoi-workflows \
--skill dnabert2 \
--skill evo2-inference \
--skill gpn-models \
--skill nucleotide-transformer-v3 \
--skill segment-nt \
--skill skill-factoryRestart Codex after installing or updating skills.
Use this path when you have cloned the repo and want deterministic local installation without npx.
The default Codex skills directory is:
${CODEX_HOME:-$HOME/.codex}/skillsCopy all enabled, registry-listed skills:
./scripts/link_skills.sh --copy
# or
make link-skills COPY_SKILLS=1For development, symlink instead of copying so edits are picked up after restarting Codex:
./scripts/link_skills.sh --forceUseful variants:
./scripts/link_skills.sh --list
./scripts/link_skills.sh --skills-dir "$HOME/.codex/skills" --copy --force
./scripts/link_skills.sh --copy alphagenome-api borzoi-workflows dnabert2
./scripts/link_skills.sh --include-disabledInstalling skills gives Codex the workflow knowledge. Provisioning installs optional runnable model stacks for local execution.
One-step default install: skills + alphagenome + gpn + nt-jax + smoke test.
./scripts/bootstrap.sh
# or
make bootstrapProvision individual stacks:
./scripts/provision_stack.sh alphagenome
./scripts/provision_stack.sh gpn
./scripts/provision_stack.sh nt-jax
./scripts/provision_stack.sh ntv3-hf
./scripts/provision_stack.sh borzoiOne-time persistent install (keeps deploy envs and caches in a stable location):
./scripts/bootstrap.sh \
--persistent-root "${XDG_CACHE_HOME:-$HOME/.cache}/s2f-agent" \
--prefetch-modelsAfter first setup, load the generated env in new shells:
source "${XDG_CACHE_HOME:-$HOME/.cache}/s2f-agent/env.sh"Optional one-step variants:
./scripts/bootstrap.sh --with-ntv3-hf
./scripts/bootstrap.sh --with-borzoi
./scripts/bootstrap.sh --with-evo2-light
./scripts/bootstrap.sh --with-evo2-fullEquivalent Make targets:
make bootstrap-ntv3-hf
make bootstrap-borzoi
make bootstrap-evo2-light
make bootstrap-evo2-full
make bootstrap-persistentPrefetch model parameters separately (if environments are already prepared):
make prefetch-models
# or
./scripts/prefetch_models.sh --deploy-root "${XDG_CACHE_HOME:-$HOME/.cache}/s2f-agent/deploy"One-click cleanup for configured environments and temporary files:
make clean-runtime
# or
./scripts/clean_runtime.sh --yesUse dry-run first if you want to preview deletions:
./scripts/clean_runtime.sh --dry-runEvo 2 light (requires hardware-specific torch install command before flash-attn):
export TORCH_INSTALL_CMD='$VENV_PYTHON -m pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/cu128'
./scripts/provision_stack.sh evo2-lightEvo 2 full (active conda environment):
conda create -n evo2-full python=3.11 -y
conda activate evo2-full
./scripts/provision_stack.sh evo2-fullHosted Evo 2 API path (recommended on macOS or without NVIDIA GPU):
export NVCF_RUN_KEY='your_run_key'
python skills/evo2-inference/scripts/run_hosted_api.py --num-tokens 8 --top-k 1Full hosted workflow with output plots:
export NVCF_RUN_KEY='your_run_key'
python skills/evo2-inference/scripts/run_real_evo2_workflow.py --output-dir skills/evo2-inference/resultsexport JAX_INSTALL_CMD='$VENV_PYTHON -m pip install jax[cuda12]'
./scripts/provision_stack.sh nt-jaxBaseline smoke checks:
./scripts/smoke_test.sh --skills-dir "${CODEX_HOME:-$HOME/.codex}/skills"Registry and metadata checks:
./scripts/validate_codex_package.sh
./scripts/validate_registry.sh
./scripts/validate_registry_tracking.sh
./scripts/validate_skill_metadata.sh
./scripts/validate_migration_paths.shRouting checks and full validation bundle:
./scripts/validate_routing.sh
./scripts/validate_groundedness.sh
./scripts/validate_task_success.sh
make validate-agentOptional Make shortcuts:
make validate-registry
make validate-registry-tracking
make validate-skill-metadata
make validate-migration-paths
make eval-routing
make eval-groundedness
make eval-task-success
make eval-benchmark
make test-eval-benchmark-mock
make smoke-lite
make route-query QUERY='Need variant-effect guidance' TASK='variant-effect'
make run-agent QUERY='Help me run AlphaGenome predict_variant with RNA output'
make execute-plan QUERY='Need track-prediction plan for human hg38 interval' TASK='track-prediction'Comparative benchmark notes:
make eval-benchmarkrunss2f-agent,gpt-4o,o3-miniby default and requiresOPENAI_API_KEY.- Local-only benchmark smoke check:
python3 benchmark/tools/eval_benchmark.py --participants s2f-agent --dry-run. - Benchmark section root:
benchmark/(tools/config/prompts/fixtures/runs/reports are centrally managed here).
CI workflow entry:
.github/workflows/agent-ci.ymlExtended smoke test with explicit environment imports:
./scripts/smoke_test.sh \
--skills-dir "${CODEX_HOME:-$HOME/.codex}/skills" \
--alphagenome-python /path/to/alphagenome/bin/python \
--gpn-python /path/to/gpn/bin/python \
--nt-python /path/to/nt-jax/bin/python \
--ntv3-python /path/to/ntv3-hf/bin/python \
--borzoi-python /path/to/borzoi/bin/python \
--evo2-python /path/to/evo2-light/bin/pythonWhen a workflow fails, start from the skill's references/ folder and then check routing/task configuration under registry/.
See CONTRIBUTING.md for how to add skills, run validation, and submit pull requests.