Chuyển đến nội dung
Skillpedia
Cơ sở dữ liệu51k · #3429

benchling-integration

Skill này làm gì

Công cụ này kết nối bạn với Benchling, một hệ thống được dùng trong phòng thí nghiệm để quản lý dữ liệu khoa học. Bạn có thể tự động hóa các việc như nhập trình tự DNA, kiểm tra kho vật tư hoặc xuất thông tin.

Khi nào nên dùng

  • ✓Nhập các trình tự DNA từ một tệp vào Benchling.
  • ✓Kiểm tra những vật tư (kho) nào đang có ở một vị trí cụ thể trong phòng thí nghiệm.
  • ✓Xuất danh sách các trình tự DNA kèm thông tin cụ thể.

Liên kết skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/benchling-integration/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/benchling-integration/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Nhập các trình tự từ tệp “sequences.fasta” vào thư mục “lib_example”.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng mã đặc biệt (SDK) để giao tiếp với Benchling. Bạn cần thiết lập quyền truy cập bằng thông tin đăng nhập của mình, sau đó có thể yêu cầu nó thực hiện các thao tác như đọc hoặc ghi dữ liệu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Benchling Integration

When to use

Use this skill for Benchling registry entities, sequence imports, inventory, ELN entries, workflow tasks, apps, event-driven integrations, and warehouse analytics.

Reviewed 2026-09-30: examples target the released benchling-sdk 1.25.0 and its stable v2 API models. The current authentication guide recommends V3 for new development, while the V3 guide still describes endpoint-specific early access. Confirm your tenant's V3 availability and stability before migrating; these v2 SDK examples must not be mechanically rewritten to V3.

SDK imports, model serialization, and request construction were checked locally against 1.25.0. Tenant-dependent examples are illustrative: no authenticated requests, mutations, AWS deployment, or warehouse connection were run.

Workflow

  1. Identify the tenant, API version, identity, and permissions. Use OAuth app credentials for background integrations; use delegated authorization when acting as an individual user. See authentication.
  2. Read the relevant schema and resolve actual folder, registry, status, and dropdown IDs. Preserve sequence alphabet/topology and sample units. A valid Python model does not establish biological correctness or satisfaction of a tenant's required fields.
  3. Read a small filtered page before writing. Use typed SDK methods and check their actual parameter names; not all services share the same CRUD naming convention.
  4. Construct and serialize a representative payload. For imports, retain external IDs and returned Benchling IDs so a retry can reconcile a partial run without duplicates.
  5. Perform the requested operation and read back the result. Check terminal async status; completed polling can still mean FAILED.

Setup and a read-only query

uv pip install "benchling-sdk==1.25.0"
import os
from benchling_sdk.benchling import Benchling
from benchling_sdk.auth.client_credentials_oauth2 import ClientCredentialsOAuth2

tenant_url = os.environ["BENCHLING_TENANT_URL"].rstrip("/")
benchling = Benchling(
    url=tenant_url,
    auth_method=ClientCredentialsOAuth2(
        client_id=os.environ["BENCHLING_CLIENT_ID"],
        client_secret=os.environ["BENCHLING_CLIENT_SECRET"],
        token_url=f"{tenant_url}/oauth/token",
    ),
)
for page in benchling.dna_sequences.list(page_size=10, name_includes="plasmid"):
    for sequence in page:
        print(sequence.id, sequence.name)
    break  # deliberate first-page connectivity/permission check

A successful empty page is a valid connectivity result. It does not imply access to all projects. There is no documented v2 users/me route or SDK users.get_me().

Important SDK conventions

  • Import fields from benchling_sdk.helpers.serialization_helpers. Its input is {"field_name": {"value": value}}, including the inner value mapping.
  • Use dna_sequence_id for DNA updates and workflow_task_id for workflow updates. Workflow task creation requires a workflow_task_group_id.
  • Entry methods are create_entry, get_entry_by_id, list_entries, and update_entry.
  • list() usually returns pages; iterate twice to reach the objects. estimated_count is a property that can raise NotImplementedError, not a method or guaranteed count.
  • Moving a tube uses ContainerUpdate(parent_storage_id=...). Material transfer is a separate operation; it changes contents and quantities.
  • Register on creation with registry_id plus either entity_registry_id (a human registry identifier) or naming_strategy. Do not confuse those with the registry's ID.

Common use cases

Import FASTA sequences

Install Biopython separately (uv pip install biopython). This illustrative import creates unregistered linear DNA; choose topology and resolve collisions before running.

from Bio import SeqIO
from benchling_sdk.models import DnaSequenceCreate

for record in SeqIO.parse("sequences.fasta", "fasta"):
    payload = DnaSequenceCreate(
        name=record.id,
        bases=str(record.seq),
        is_circular=False,
        folder_id="lib_example",
    )
    created = benchling.dna_sequences.create(payload)
    print(record.id, created.id)  # persist this mapping for restart/reconciliation

Audit inventory under a location


…
Câu hỏi thường gặp

Benchling là gì?

Benchling là nền tảng dùng trong phòng thí nghiệm để quản lý dữ liệu nghiên cứu, như trình tự DNA, kho vật tư và thí nghiệm.

SDK là gì?

SDK là viết tắt của “Software Development Kit”. Đây là bộ công cụ giúp lập trình viên tạo chương trình tương tác với các hệ thống khác, như Benchling.

Tôi có cần biết lập trình để dùng công cụ này không?

Dù công cụ dùng mã ở phía sau, mục tiêu là bạn có thể yêu cầu công việc bằng ngôn ngữ đơn giản, còn phần kỹ thuật sẽ do công cụ xử lý.

Chi tiết

Mô tả gốc của tác giả

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

repo: K-Dense-AI/scientific-agent-skills

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3429
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự