openserv-client
Skill này làm gì
Skill này bao quát gói client OpenServ, kết nối mã của bạn với API nền tảng OpenServ. Skill dành cho lập trình viên cần đăng ký agent và quản lý workflow cùng trigger.
Khi nào nên dùng
- ✓Khi bạn cần đăng ký agent với nền tảng OpenServ.
- ✓Khi bạn muốn tạo workflow với trigger webhook, cron hoặc thủ công.
- ✓Khi bạn cần chạy tác vụ hoặc quản lý thông tin xác thực qua API của nền tảng.
Liên kết skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/openserv/openserv-client/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể thiết lập agent OpenServ của tôi với một workflow chạy theo lịch hằng ngày không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent gọi hàm provision một lần để tạo hoặc tái sử dụng tài khoản, đăng ký agent, và thiết lập workflow cùng khóa API. Để kiểm soát nhiều hơn, agent dùng client đầy đủ của nền tảng để quản lý agent, trigger và tác vụ.
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.
OpenServ Client
The @openserv-labs/client package is the TypeScript client for the OpenServ Platform API. You use it whenever your code needs to talk to the platform—to register an agent, create workflows, set up triggers, or run tasks.
Why you need this package
Your agent (built with @openserv-labs/sdk) runs on your machine or server. The platform doesn’t know about it until you tell it: what the agent is, where it’s reachable, and how it can be triggered. The client is how you do that. It lets you create a platform account (or reuse one), register your agent, define workflows and triggers (webhook, cron, manual, or x402 paid), and bind credentials so your agent can accept tasks. Without it, your agent would have no way to get onto the platform or receive work.
What you can do with it
- Provision — One-shot setup: create or reuse an account (via wallet), register the agent, create a workflow with trigger and task, and get API key and auth token. Typically you call
provision()once per app startup; it’s idempotent. - Platform API — Full control via
PlatformClient: create and list agents, workflows, triggers, and tasks; fire triggers; run workflows; manage credentials. Use this when you need more than the default provision flow. - Model Parameters — Configure which LLM model and parameters the platform uses for your agent's tasks. Set
model_parameterson agent creation/update or viaprovision(). - Models API — Discover available LLM models and their parameter schemas via
client.models.list(). - x402 payments — Expose your agent behind a paywall; callers pay per request (e.g. USDC) before the task runs. Provision can set up an x402 trigger and return a paywall URL.
- ERC-8004 on-chain identity — Register your agent on-chain (Base), mint an identity NFT, and publish service metadata to IPFS so others can discover and pay your agent in a standard way.
Reference: reference.md (full API) · troubleshooting.md (common issues) · examples/ (runnable code)
Installation
npm install @openserv-labs/client
Quick Start: Just provision() + run()
The simplest deployment is just two calls: provision() and run(). That's it.
You need an account on the platform to register agents and workflows. The easiest way is to let provision() create one for you: it creates a wallet and signs you up with it (no email required). That account is reused on every run.
See examples/agent.ts for a complete runnable example.
Key Point:
provision()is idempotent. Call it every time your app starts - no need to checkisProvisioned()first.
What provision() Does
- Creates or reuses an Ethereum wallet (and platform account if new)
- Authenticates with the OpenServ platform
- Creates or updates the agent (idempotent)
- Generates API key and auth token
- Binds credentials to agent instance (if
agent.instanceis provided) - Creates or updates the workflow with trigger and task
- Creates workflow graph (edges linking trigger to task)
- Activates trigger and sets workflow to running
- Persists state to
.openserv.json
Workflow Name & Goal
The workflow config requires two important properties:
name(string) - This becomes the agent name in ERC-8004. Make it polished, punchy, and memorable — this is the public-facing brand name users see. Think product launch, not variable name. Examples:'Viral Content Engine','Crypto Alpha Scanner','Life Catalyst Pro'.goal(string, required) - A detailed description of what the workflow accomplishes. Must be descriptive and thorough — short or vague goals will cause API calls to fail. Write at least a full sentence explaining the workflow's purpose.
workflow: {
name: 'Deep Research Pro',
goal: 'Research any topic in depth, synthesize findings from multiple sources, and produce a comprehensive report with citations',
trigger: triggers.webhook({ waitForCompletion: true, timeout: 600 }),
task: { description: 'Research the given topic' }
}
Agent Instance Binding (v1.1+)
Pass your agent instance to provision() for automatic credential binding:
const agent = new Agent({ systemPrompt: '...' })
await provision({
agent: {
instance: agent, // Calls agent.setCredentials() automatically
name: 'my-agent',
description: '...',
model_parameters: { model: 'gpt-5', verbosity: 'medium', reasoning_effort
Câu hỏi thường gặp
Gọi provision lại có an toàn không?
Có. Skill cho biết gọi lại không tạo ra bản trùng lặp.
Những trigger nào được hỗ trợ?
Skill liệt kê trigger webhook, cron, thủ công và trigger trả phí x402.
Tôi có thể chọn mô hình cho agent không?
Có. Skill bao quát cách đặt mô hình và tham số mà nền tảng sử dụng.
Chi tiết
Mô tả gốc của tác giả
Complete guide to using @openserv-labs/client for managing agents, workflows, triggers, and tasks on the OpenServ Platform. Covers provisioning, authentication, x402 payments, ERC-8004 on-chain identity, and the full Platform API. IMPORTANT - Always read the companion skill openserv-agent-sdk alongside this skill, as both packages are required to build any agent. Read reference.md for the full API reference.
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13668
- Giấy phép
- —
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
internet-court
7.0kGiúp agent của bạn thanh toán, thuê hoặc giao dịch an toàn với một agent AI khác hoặc dịch vụ trả phí, và chỉ đến hướng dẫn chuyên sâu phù hợp.
genlayer-erc7710-connector
7.0kGiúp agent của bạn kết nối kết quả đánh giá AI với hệ thống quyền hạn, để một đánh giá xấu có thể hạn chế hoặc hủy quyền của agent.
genlayer-intelligent-contracts
7.0kGiúp agent của bạn xác định quy tắc, bằng chứng và đầu ra của một AI judge kiểm tra xem agent khác có làm đúng nhiệm vụ được ủy quyền hay không.
x402-erc7710
7.0kGiúp agent của bạn trả tiền cho dịch vụ web theo từng yêu cầu, và thiết lập chi tiêu định kỳ nằm trong ngân sách quyền hạn.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.