labarchive-integration
它能做什么
这个工具可以连接 LabArchives 系统,帮你管理实验室数据。它能让你安全地访问和整理科研信息。
适用场景
- ✓记录实验结果时。
- ✓管理实验室耗材库存时。
- ✓与同事共享研究数据时。
技能链接
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/labarchive-integration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想把今天的实验结果记录到我的实验室笔记本里。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具使用专门的代码与 LabArchives 通信。它会确保你的信息被安全、准确地发送,并遵循系统的规则。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
LabArchives Integration
Use LabArchives APIs only from current, official method pages. The public documentation is a shared notebook, not a versioned SDK reference, so verify the specific page immediately before implementing a remote operation.
Choose the Correct Surface
Do not combine these interfaces:
- Legacy ELN API: notebook trees, entries, attachments, users, searches,
exports, and site-license functions. It uses regional
*api.labarchives.comhosts,/api/<class>/<method>paths, XML for many responses, and signed query parameters. - Inventory API v1: inventory, item types, orders, storage locations, and
vendors. It documents relative
/public/v1/...paths, JSON response schemas, and signedX-LabArchives-*request headers. - Product integrations: Jupyter, REDCap, Protocols.io, GraphPad Prism, SnapGene, Geneious, and others are product-specific UI or file workflows. They are not evidence of a general LabArchives OAuth 2.0 API.
Read references/api_reference.md before writing
API code and references/integrations.md before
automating an advertised integration.
Access and Credentials
LabArchives ELN developer API access is an Enterprise capability. The current Inventory FAQ limits Inventory API access to Enterprise and Enterprise Plus licensees and requires an Inventory account with API permission. Contact the institution's LabArchives team or LabArchives support for access and the development documentation supplied with it.
The environment names below are conventions of this skill, not vendor-defined standards:
LABARCHIVES_ELN_API_URL— one exact regional ELN API URL ending in/apiLABARCHIVES_ACCESS_KEY_ID— LabArchives-issued Access Key ID (akid)LABARCHIVES_ACCESS_PASSWORD— HMAC signing secretLABARCHIVES_USER_ID— optional persistent UID bound to that Access Key IDLABARCHIVES_INVENTORY_LAB_ID— required for lab-scoped Inventory requests; omitted duringGET /public/v1/users/melab discovery
Keep secrets in the process environment or an approved secret manager. Do not
put them in YAML, source code, command-line arguments, prompts, logs, notebooks,
or committed .env files. The bundled tools never search for .env files.
From this skill directory:
uv run scripts/setup_config.py regions
uv run scripts/setup_config.py check --require-user-id
setup_config.py validates only endpoint structure and named-variable presence;
it does not authenticate, persist, or print credentials. See
references/authentication_guide.md.
Regional Endpoints
Browser login hosts and API hosts are different. The official ELN API overview currently lists US/rest of world, Australia/New Zealand, UK, Europe outside the UK, and Canada API hosts. The help center separately lists the five regional browser login hosts.
Use setup_config.py regions for the current allowlist and the complete table in
the authentication guide. Never build an API URL from a browser login URL.
The Inventory overview publishes https://iapi.labarchives.com as its API base
URL; append the documented /public/v1/... route. No regional base-URL table is
published there. Confirm any regional deployment with the institution/vendor;
do not transform an Inventory browser login host into an API hostname.
Authentication Model
ELN requests
The official algorithm is fully documented:
- Set
expiresto the current Unix epoch time in milliseconds, adjusted for server clock difference if necessary. Despite its name, it is not a future expiry time. - Concatenate, with no separators:
<Access Key ID><API method name><expires>. - Compute HMAC-SHA-512 using the Access Password as the key.
- Base64-encode the digest.
- URI-encode that signature and send
akid,expires, andsigas the documented query parameters.
For ordinary ELN calls, the signature input is the method name only, not the API
class. User authorization is a documented special case: signing the
api_user_login redirect uses the unencoded redirect URI in place of a method
name.
Inventory API v1 requests
Inventory shares the HMAC algorithm but signs the exact relative route, including resolved path parameters and excluding the query string. Its authentication page documents these headers:
X-LabArchives-UIdX-LabArchives-AKIdX-LabArchives-LabId
…
常见问题
使用它需要特殊账号吗?
需要。LabArchives API 的访问通常要求企业版(Enterprise)许可证以及相应权限。请咨询你所在实验室的团队或 LabArchives 支持人员。
密码和密钥应该存放在哪里?
千万不要把密码或密钥写进代码文件、提示词或日志里。请使用安全的密钥管理工具,或系统的环境变量。
我怎么知道工具是否正常工作?
工具带有验证配置和地址结构的脚本,但这些脚本不会进行身份验证,也不会发送你的凭据。更多细节请查阅文档。
详情
作者的原始描述
Integrates with the official LabArchives ELN REST-like API and Inventory API v1. Supports regional endpoint selection, signed-request construction, user authorization and UID flows, local LA container validation, and verified LabArchives integration workflows.
热度
- GitHub 星标
- 51k
- 排名
- #3484
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …