Skip to main content

Agent-Bioinformatics Interface: plugin-based abstraction for AI-driven bioinformatics analysis

Project description

ABI — Agent-Bioinformatics Interface

ABI is a Python interface layer for agent-driven bioinformatics workflows. It standardizes analysis plugins behind a common plan -> dry-run -> run -> inspect -> report lifecycle, with provenance, standard TSV tables, OpenAI-compatible tool descriptors, optional MCP transport, Nextflow export/runtime support, and a queue-backed HTTP Job Service.

PyPI Python License

Installation

pip install abi-agent

# Development install
pip install -e ".[dev]"

# Optional MCP server dependencies
pip install -e ".[dev,mcp]"

Python 3.10-3.13 is supported.

Quick Start

# List installed analysis plugins
abi list-types

# Initialize a plugin workspace
abi init --type metatranscriptomics --outdir ./workspace

# Build a plan without executing tools
abi plan --type metatranscriptomics --config config.yaml --sample-sheet samples.tsv

# Write dry-run provenance and table skeletons
abi dry-run --type metatranscriptomics --config config.yaml --sample-sheet samples.tsv

# Execute only after explicit confirmation
abi run --type metatranscriptomics --config config.yaml --sample-sheet samples.tsv \
  --confirm-execution

# Inspect and rebuild reports
abi inspect --result-dir results/
abi report --result-dir results/ --type metatranscriptomics

# Export agent/runtime interfaces
abi export-nextflow --type metatranscriptomics --output workflow.nf
abi export-openai-tools --type metatranscriptomics --format responses
abi export-agent-context --type metatranscriptomics --format json
abi doctor-agent --type metatranscriptomics

All agent-facing commands support --output-json.

Built-In Analysis Types

Type Implementation Notes
metatranscriptomics Native ABI demo plugin fastp -> STAR/HISAT2 -> featureCounts portability demo.
metagenomic_plasmid Internal abi.autoplasm pipeline Migrated from the former AutoPlasm development tree and bundled inside abi-agent.

The package also exposes an autoplasm command for the bundled plasmid pipeline:

autoplasm dry-run --config examples/config_minimal.yaml --profile dry_run

There is no top-level Python package named autoplasm; import the internal implementation as abi.autoplasm.

Agent Transports

ABIAgentInterface is the stable transport-neutral boundary used by:

  • CLI JSON through --output-json
  • OpenAI-compatible descriptors from abi export-openai-tools
  • Optional MCP stdio server via python -m abi.mcp.server
  • HTTP Job Service via abi job-service and abi job submit/list/status/artifacts/cancel

Execution tools require explicit confirmation. abi run, abi_run, and Job Service execution submissions return confirmation_required unless confirm_execution=true or --confirm-execution is provided.

Development

pip install -e ".[dev]"

ruff check src/ tests/
ruff format --check src/ tests/
mypy src/abi/ --ignore-missing-imports
pytest tests/ -v --tb=short

python -m build
python -m twine check dist/*

Repository-local bioinformatics environments are described under envs/ and resolved from .mamba/envs/<env_name>/bin. Set ABI_MAMBA_ROOT to override the default .mamba root; AUTOPLASM_MAMBA_ROOT remains accepted for compatibility.

More details:

Public SDK

Plugin authors should depend on these public modules:

Module Contents
abi.interfaces ABIPlugin, ABIDryRunPlugin, ABIInitializablePlugin
abi.schemas ABISample, ABISampleContext, ABIPlanStep, ABIExecutionPlan
abi.tools ToolRegistry, ToolSkill, GenericCommandSkill, RunResult
abi.errors ABIError, ConfigError, SampleSheetError, ToolError
abi.testing assert_plugin_contract

Register third-party plugins with:

[project.entry-points."abi.plugins"]
my_analysis = "my_package.plugins:MyPlugin"

License

MIT, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abi_agent-0.2.0.tar.gz (242.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abi_agent-0.2.0-py3-none-any.whl (317.3 kB view details)

Uploaded Python 3

File details

Details for the file abi_agent-0.2.0.tar.gz.

File metadata

  • Download URL: abi_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 242.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for abi_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a4b5111e84ea5c31e790bc9624d94557c70578874988261393df693c60280d8b
MD5 df469c339d8cf80d31ca8c54a8235466
BLAKE2b-256 508d8364bbb6e2b8f075f8c9db1b3f31316615ad825e06f7302a9b80fd5cad91

See more details on using hashes here.

Provenance

The following attestation bundles were made for abi_agent-0.2.0.tar.gz:

Publisher: publish-pypi.yml on sleepinlava/abi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file abi_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: abi_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 317.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for abi_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ea12b80eb9e610e6afb4620d7c4862a4241561e70a3a5acc8c7f9f8a67dfc5
MD5 c47a240cd64567578125f847fcedfa58
BLAKE2b-256 89d57bd19a4d8784b997025a1410b93ddd2a266a8587ab7cc56a712ba1e8d3ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for abi_agent-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on sleepinlava/abi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page