mirror of
https://github.com/K-Dense-AI/scientific-agent-skills.git
synced 2026-12-07 03:54:00 +08:00
docs: update SKILL.md for Adaptyv API enhancements
- Updated the license to MIT and added compatibility requirements for Python 3.10+ and API key usage. - Incremented version number to 1.2 and included additional metadata for clarity. - Revised installation instructions and environment variable handling for better user guidance. - Enhanced documentation with official API links and improved code examples for consistency.
This commit is contained in:
1 parent
761e83ddca
commit
b636ef1968
1 file changed
+33
-5
@@ -2,14 +2,19 @@
|
||||
name: adaptyv
|
||||
author: "K-Dense, Inc."
|
||||
description: "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 mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`."
|
||||
license: MIT
|
||||
compatibility: Requires Python 3.10+, an Adaptyv Foundry account, and an API key from foundry.adaptyvbio.com. Install adaptyv-sdk from GitHub with uv pip install.
|
||||
metadata:
|
||||
version: "1.0"
|
||||
version: "1.2"
|
||||
skill-author: K-Dense Inc.
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||
**Official docs:** [docs.adaptyvbio.com/api-reference](https://docs.adaptyvbio.com/api-reference) · [llms.txt index](https://docs.adaptyvbio.com/llms.txt) · [OpenAPI spec](https://foundry-api-public.adaptyvbio.com/api/v1/openapi.json)
|
||||
|
||||
## Quick Start
|
||||
|
||||
**Base URL:** `https://foundry-api-public.adaptyvbio.com/api/v1`
|
||||
@@ -18,24 +23,40 @@ Adaptyv Bio is a cloud lab that turns protein sequences into experimental data.
|
||||
|
||||
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.
|
||||
|
||||
The [official API docs](https://docs.adaptyvbio.com/api-reference/api-introduction) use `FOUNDRY_API_TOKEN` in curl examples; that is the same bearer token — prefer `ADAPTYV_API_KEY` in Python and new shell scripts for consistency with the SDK.
|
||||
|
||||
```bash
|
||||
export FOUNDRY_API_TOKEN="abs0_..."
|
||||
export ADAPTYV_API_KEY="abs0_..."
|
||||
curl https://foundry-api-public.adaptyvbio.com/api/v1/targets?limit=3 \
|
||||
-H "Authorization: Bearer $FOUNDRY_API_TOKEN"
|
||||
-H "Authorization: Bearer $ADAPTYV_API_KEY"
|
||||
```
|
||||
|
||||
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)
|
||||
**Version note:** `adaptyv-sdk` **0.1.0** (beta) is not yet on PyPI — install from GitHub:
|
||||
|
||||
```bash
|
||||
uv pip install "git+https://github.com/adaptyvbio/adaptyv-sdk.git"
|
||||
```
|
||||
|
||||
In a project with `pyproject.toml`:
|
||||
|
||||
```bash
|
||||
uv add "adaptyv-sdk @ git+https://github.com/adaptyvbio/adaptyv-sdk.git"
|
||||
```
|
||||
|
||||
**Environment variables** (set in shell or `.env` file):
|
||||
|
||||
```bash
|
||||
ADAPTYV_API_KEY=your_api_key
|
||||
ADAPTYV_API_URL=https://foundry-api-public.adaptyvbio.com/api/v1
|
||||
ADAPTYV_ORGANIZATION_ID=your_org_id # optional
|
||||
```
|
||||
|
||||
The `@lab.experiment` decorator and `FoundryClient` both read `ADAPTYV_API_KEY` and `ADAPTYV_API_URL` from the environment when not passed explicitly.
|
||||
|
||||
### Decorator Pattern
|
||||
|
||||
```python
|
||||
@@ -52,9 +73,16 @@ print(f"Experiment: {result.experiment_url}")
|
||||
### Client Pattern
|
||||
|
||||
```python
|
||||
import os
|
||||
from adaptyv import FoundryClient
|
||||
|
||||
client = FoundryClient(api_key="...", base_url="https://foundry-api-public.adaptyvbio.com/api/v1")
|
||||
client = FoundryClient(
|
||||
api_key=os.environ["ADAPTYV_API_KEY"],
|
||||
base_url=os.environ.get(
|
||||
"ADAPTYV_API_URL",
|
||||
"https://foundry-api-public.adaptyvbio.com/api/v1",
|
||||
),
|
||||
)
|
||||
|
||||
# Browse targets
|
||||
targets = client.targets.list(search="EGFR", selfservice_only=True)
|
||||
|
||||
Reference in new issue
Block a user