← 返回 Skills 市场
yzk1121

Adaptyv

作者 yzk1121 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
39
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install adaptyv
功能描述
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user ment...
使用说明 (SKILL.md)

Adaptyv Bio Foundry API

Adaptyv Bio is a cloud lab that turns protein sequences into experimental data. Users submit amino acid sequences via API or UI; Adaptyv's automated lab runs assays (binding, thermostability, expression, fluorescence) and delivers results in ~21 days.

Quick Start

Base URL: https://foundry-api-public.adaptyvbio.com/api/v1

Authentication: Bearer token in the Authorization header. Tokens are obtained from foundry.adaptyvbio.com sidebar.

When writing code, always read the API key from the environment variable ADAPTYV_API_KEY or from a .env file — never hardcode tokens. Check for a .env file in the project root first; if one exists, use a library like python-dotenv to load it.

export FOUNDRY_API_TOKEN="abs0_..."
curl https://foundry-api-public.adaptyvbio.com/api/v1/targets?limit=3 \
  -H "Authorization: Bearer $FOUNDRY_API_TOKEN"

Every request except GET /openapi.json requires authentication. Store tokens in environment variables or .env files — never commit them to source control.

Python SDK

Install: uv add adaptyv-sdk (falls back to uv pip install adaptyv-sdk if no pyproject.toml exists)

Environment variables (set in shell or .env file):

ADAPTYV_API_KEY=your_api_key
ADAPTYV_API_URL=https://foundry-api-public.adaptyvbio.com/api/v1

Decorator Pattern

from adaptyv import lab

@lab.experiment(target="PD-L1", experiment_type="screening", method="bli")
def design_binders():
    return {"design_a": "MVKVGVNG...", "design_b": "MKVLVAG..."}

result = design_binders()
print(f"Experiment: {result.experiment_url}")

Client Pattern

from adaptyv import FoundryClient

client = FoundryClient(api_key="...", base_url="https://foundry-api-public.adaptyvbio.com/api/v1")

# Browse targets
targets = client.targets.list(search="EGFR", selfservice_only=True)

# Estimate cost
estimate = client.experiments.cost_estimate({
    "experiment_spec": {
        "experiment_type": "screening",
        "method": "bli",
        "target_id": "target-uuid",
        "sequences": {"seq1": "EVQLVESGGGLVQ..."},
        "n_replicates": 3
    }
})

# Create and submit
exp = client.experiments.create({...})
client.experiments.submit(exp.experiment_id)

# Later: retrieve results
results = client.experiments.get_results(exp.experiment_id)

Experiment Types

Type Method Measures Requires Target
affinity bli or spr KD, kon, koff kinetics Yes
screening bli or spr Yes/no binding Yes
thermostability Melting temperature (Tm) No
expression Expression yield No
fluorescence Fluorescence intensity No

Experiment Lifecycle

Draft → WaitingForConfirmation → QuoteSent → WaitingForMaterials → InQueue → InProduction → DataAnalysis → InReview → Done
Status Who Acts Description
Draft You Editable, no cost commitment
WaitingForConfirmation Adaptyv Under review, quote being prepared
QuoteSent You Review and confirm the quote
WaitingForMaterials Adaptyv Gene fragments and target ordered
InQueue Adaptyv Materials arrived, queued for lab
InProduction Adaptyv Assay running
DataAnalysis Adaptyv Raw data processing and QC
InReview Adaptyv Final validation
Done You Results available
Canceled Either Experiment canceled

The results_status field on an experiment tracks: none, partial, or all.

Common Workflows

1. Submit a Binding Screen (Step by Step)

# 1. Find a target
targets = client.targets.list(search="EGFR", selfservice_only=True)
target_id = targets.items[0].id

# 2. Preview cost
estimate = client.experiments.cost_estimate({
    "experiment_spec": {
        "experiment_type": "screening",
        "method": "bli",
        "target_id": target_id,
        "sequences": {"seq1": "EVQLVESGGGLVQ...", "seq2": "MKVLVAG..."},
        "n_replicates": 3
    }
})

# 3. Create experiment (starts as Draft)
exp = client.experiments.create({
    "name": "EGFR binder screen batch 1",
    "experiment_spec": {
        "experiment_type": "screening",
        "method": "bli",
        "target_id": target_id,
        "sequences": {"seq1": "EVQLVESGGGLVQ...", "seq2": "MKVLVAG..."},
        "n_replicates": 3
    }
})

# 4. Submit for review
client.experiments.submit(exp.experiment_id)

# 5. Poll or use webhooks until Done
# 6. Retrieve results
results = client.experiments.get_results(exp.experiment_id)

2. Automated Pipeline (Skip Draft + Auto-Accept Quote)

exp = client.experiments.create({
    "name": "Auto pipeline run",
    "experiment_spec": {...},
    "skip_draft": True,
    "auto_accept_quote": True,
    "webhook_url": "https://my-server.com/webhook"
})
# Webhook fires on each status transition; poll or wait for Done

3. Using Webhooks

Pass webhook_url when creating an experiment. Adaptyv POSTs to that URL on every status transition with the experiment ID, previous status, and new status.

Sequences

  • Simple format: {"seq1": "EVQLVESGGGLVQPGGSLRLSCAAS"}
  • Rich format: {"seq1": {"aa_string": "EVQLVESGGGLVQ...", "control": false, "metadata": {"type": "scfv"}}}
  • Multi-chain: use colon separator — "MVLS:EVQL"
  • Valid amino acids: A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y (case-insensitive, stored uppercase)
  • Sequences can only be added to experiments in Draft status

Filtering, Sorting, and Pagination

All list endpoints support pagination (limit 1-100, default 50; offset), search (free-text on name fields), and sorting.

Filtering uses s-expression syntax via the filter query parameter:

  • Comparison: eq(field,value), neq, gt, gte, lt, lte, contains(field,substring)
  • Range/set: between(field,lo,hi), in(field,v1,v2,...)
  • Logic: and(expr1,expr2,...), or(...), not(expr)
  • Null: is_null(field), is_not_null(field)
  • JSONB: at(field,key) — e.g., eq(at(metadata,score),42)
  • Cast: float(), int(), text(), timestamp(), date()

Sorting uses asc(field) or desc(field), comma-separated (max 8):

sort=desc(created_at),asc(name)

Example: filter=and(gte(created_at,2026-01-01),eq(status,done))

Error Handling

All errors return:

{
  "error": "Human-readable description",
  "request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}

The request_id is also in the x-request-id response header — include it when contacting support.

Token Management

Tokens use Biscuit-based cryptographic attenuation. You can create restricted tokens scoped by organization, resource type, actions (read/create/update), and expiry via POST /tokens/attenuate. Revoking a token (POST /tokens/revoke) revokes it and all its descendants.

Detailed API Reference

For the full list of all 32 endpoints with request/response schemas, read references/api-endpoints.md.

安全使用建议
Install only if you intend to work with Adaptyv's Foundry API. Keep API keys scoped and out of source control, review costs before submitting experiments, do not use auto_accept_quote or quote confirmation unless you explicitly want to create a billable invoice, and only configure webhook URLs you control.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The skill explains authenticated API and SDK use for protein experiment design, submission, results retrieval, quotes, invoices, webhooks, and token management, which is coherent with an Adaptyv cloud-lab integration.
Instruction Scope
The trigger description is somewhat broad for protein-assay topics, and examples include submission plus an automated skip-draft/auto-accept-quote workflow; these are disclosed but should be treated as user-directed actions.
Install Mechanism
The package contains only Markdown documentation files and no executable scripts, installers, hooks, or hidden runtime code.
Credentials
Use of API tokens, environment variables, optional .env loading, package installation, network calls to Adaptyv, and optional webhooks is proportionate for this service integration.
Persistence & Privilege
No background persistence or privilege escalation is present, but the documented service actions can create experiments, accept quotes, create invoices, transmit status updates to webhook URLs, and revoke tokens.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install adaptyv
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /adaptyv 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial public release of the adaptyv skill, providing guidance on using the Adaptyv Bio Foundry API and Python SDK. - Covers authentication methods, environment variable best practices, and safe token handling. - Includes quick start examples using both cURL and the adaptyv Python SDK. - Documents experiment types, lifecycle stages, and result retrieval workflows. - Explains filtering, sorting, pagination, error handling, and token management in detail. - Provides sample code for common experiment submission and automation pipelines.
元数据
Slug adaptyv
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Adaptyv 是什么?

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user ment... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 39 次。

如何安装 Adaptyv?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install adaptyv」即可一键安装,无需额外配置。

Adaptyv 是免费的吗?

是的,Adaptyv 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Adaptyv 支持哪些平台?

Adaptyv 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Adaptyv?

由 yzk1121(@yzk1121)开发并维护,当前版本 v1.0.0。

💬 留言讨论