Adaptyv

From aipoch/medical-research-skills · View interactive version

Adaptyv is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Cloud laboratory platform for automated protein testing and validation; use when you have designed protein sequences and need wet-lab experimental validation (e.g., binding, expression, thermostability, enzyme activity) and API-based submission/status/result retrieval.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Key Features

Dependencies

Example Usage

cd "20260316/scientific-skills/Others/adaptyv"
python -m py_compile scripts/validate_skill.py
python scripts/validate_skill.py --help

Example run plan:

  1. Confirm the user input, output path, and any required config values.
  2. Edit the in-file CONFIG block or documented parameters if the script uses fixed settings.
  3. Run python scripts/validate_skill.py with the validated inputs.
  4. Review the generated output and return the final artifact with any assumptions called out.

Implementation Details

Validation Shortcut

Run this minimal command first to verify the supported execution path:

python scripts/validate_skill.py --help

Adaptyv

Adaptyv is a cloud laboratory platform for automated protein testing and validation. You can submit protein sequences via API (or web UI), track experiment status, and download results (typically delivered in ~21 days).

For additional details, see:

1. When to Use

Use this skill when you need to:

2. Key Features

3. Dependencies

4. Example Usage

The following example is a minimal, runnable workflow to (1) submit an experiment and (2) poll for completion, then (3) download results. Adjust endpoint paths/fields to match reference/api_reference.md.

4.1 Set credentials

Request API access and a token from support@adaptyvbio.com, then set:

export ADAPTYV_API_KEY="your_api_key_here"

Or create a .env file:

ADAPTYV_API_KEY=your_api_key_here

4.2 Install dependencies

python -m pip install "requests>=2.31.0" "python-dotenv>=1.0.0"

4.3 Submit, poll, and fetch results

import os
import time
import requests
from dotenv import load_dotenv

load_dotenv()

API_KEY = os.getenv("ADAPTYV_API_KEY")
if not API_KEY:
    raise RuntimeError("Missing ADAPTYV_API_KEY. Set it in your environment or .env file.")

BASE_URL = "https://kq5jp7qj7wdqklhsxmovkzn4l40obksv.lambda-url.eu-central-1.on.aws"
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

# 1) Submit an experiment
submit_payload = {
    "sequences": ">protein1\nMKVLWALLGLLGAA...",  # FASTA-like string as shown in the original docs
    "experiment_type": "binding",                # e.g., binding | expression | thermostability | enzyme_activity
    "webhook_url": "https://your-webhook.com/callback",  # optional but recommended for async workflows
}

submit_resp = requests.post(f"{BASE_URL}/experiments", headers=HEADERS, json=submit_payload, timeout=60)
submit_resp.raise_for_status()
experiment_id = submit_resp.json()["experiment_id"]
print("Submitted experiment:", experiment_id)

# 2) Poll status until completion (use webhook in production to avoid polling)
status = None
for _ in range(120):  # e.g., poll up to ~20 minutes at 10s intervals (adjust as needed)
    status_resp = requests.get(f"{BASE_URL}/experiments/{experiment_id}", headers=HEADERS, timeout=60)
    status_resp.raise_for_status()
    data = status_resp.json()
    status = data.get("status")
    print("Status:", status)

    if status in {"completed", "failed", "canceled"}:
        break

    time.sleep(10)

if status != "completed":
    raise RuntimeError(f"Experiment did not complete successfully (status={status}).")

# 3) Download results (endpoint/format may vary; confirm in reference/api_reference.md)
results_resp = requests.get(f"{BASE_URL}/experiments/{experiment_id}/results", headers=HEADERS, timeout=60)
results_resp.raise_for_status()

# Save results (could be JSON, CSV, or a file bundle depending on the API)
with open(f"{experiment_id}_results.json", "wb") as f:
    f.write(results_resp.content)

print("Results saved to:", f"{experiment_id}_results.json")

5. Implementation Details

Authentication

Core request parameters

Workflow timing and execution model

Sequence optimization guidance (pre-submission)

Common pre-checks before ordering wet-lab validation (see reference/protein_optimization.md):

Commonly referenced tools in the workflow documentation:

Notes and constraints

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Quick Validation

Run this minimal verification path before full execution when possible:

No local script validation step is required for this skill.

Expected output format:

Result file: adaptyv_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any

Deterministic Output Rules

Completion Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.