openserv-client
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.
Install / Use
npx skills add internet-court/internet-court-skill --skill openserv-clientInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of openserv-client
openserv-client scores 96/100 on our quality scale, 182nd of 1,985 Automation skills we index (top 10%).
Its SKILL.md is 17 KB long, well organised into 31 sections with 20 code examples: a thorough specification that gives an agent plenty to work with.
With 6,129 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 39 days ago, so openserv-client is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
openserv-client compared with similar skills
All 4 of these similar skills score higher than openserv-client; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| openserv-client (this skill)by internet-court | 96 | 6.1k | 39d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.9k | 12d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.0k | 1d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 73.4k | today | CLAUDE.md |
| crawl4aiby unclecode | 100 | 84.4k | 3d ago | MCP Server |
Frequently asked questions
- How do I install openserv-client?
- Run
npx skills add internet-court/internet-court-skill --skill openserv-client. The install tabs above show the steps for each supported agent. - Which AI agents does openserv-client work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is openserv-client safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is openserv-client still maintained?
- The repository was last updated 39 days ago, so openserv-client is actively maintained.
Skill content
View source on GitHubname: openserv-client description: 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.
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: 'high' } // Optional
},
workflow: { ... }
})
// agent now has apiKey and authToken set - ready for run()
await run(agent)
This eliminates the need to manually set OPENSERV_API_KEY environment variables.
Model Parameters
The optional model_parameters field controls which LLM model and parameters the platform uses when executing tasks for your agent (including runless capabilities and generate() calls). If not provided, the platform default is used.
await provision({
agent: {
instance: agent,
name: 'my-agent',
description: '...',
model_parameters: {
model: 'gpt-4o',
temperature: 0.5,
parallel_tool_calls: false
}
},
workflow: { ... }
})
Discover available models and their parameters:
const { models, default: defaultModel } = await client.models.list()
// models: [{ model: 'gpt-5', provider: 'openai', parameters: { ... } }, ...]
// default: 'gpt-5-mini'
Provision Result
interface ProvisionResult {
agentId: number
apiKey: string
authToken?: string
workflowId: number
triggerId: string
triggerToken: string
paywallUrl?: string // For x402 triggers
apiEndpoint?: string // For webhook triggers
}
API Keys: Agent vs User
provision() creates two types of credentials. They are not interchangeable:
| Credential | Env Variable | Used By | Purpose |
| ------------- | ----------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Agent API key | OPENSERV_API_KEY | SDK internals | Authenticates the agent when receiving tasks from the platform. Set automatically via agent.instance. Do not use with PlatformClient. |
| Wallet key | WALLET_PRIVATE_KEY | PlatformClient | Authenticates your account for management calls (list tasks, debug workflows, manage agents). |
| User API key | OPENSERV_USER_API_KEY | PlatformClient | Alternative to wallet auth. Get from the platform dashboard. |
If you get a 401 Unauthorized when using PlatformClient, you are likely using the agent API key by mistake. Use wallet authentication or the user API key instead.
PlatformClient: Full API Access
For advanced use cases, use PlatformClient directly:
import { PlatformClient } from '@openserv-labs/client'
// Using wallet authentication (recommended — uses wallet from provision)
const client = new PlatformClient()
await client.authenticate(process.env.WALLET_PRIVATE_KEY)
// Or using User API key (NOT the agent API key)
const client = new PlatformClient({
apiKey: process.env.OPENSERV_USER_API_KEY // NOT OPENSERV_API_KEY
})
See reference.md for full API documentation on:
client.agents.*- Agent managementclient.workflows.*- Workflow managementclient.triggers.*- Trigger managementclient.tasks.*- Task managementclient.models.*- Available LLM models and parametersclient.integrations.*- Integration connectionsclient.payments.*- x402 paymentsclient.web3.*- Credits top-up
Triggers Factory
Use the triggers factory for type-safe trigger configuration:
import { triggers } from '@openserv-labs/client'
// Webhook (free, public endpoint)
triggers.webhook({
input: { query: { type: 'string', description: 'Search query' } },
waitForCompletion: true,
timeout: 600
})
// x402 (paid API with paywall)
triggers.x402({
name: 'AI Research Assistant',
description: 'Get comprehensive research reports on any topic',
price: '0.01',
timeout: 600,
input: {
prompt: {
type: 'string',
title: 'Your Request',
description: 'Describe what you would like the agent to do'
}
}
})
// Cron (scheduled)
triggers.cron({
schedule: '0 9 * * *', // Daily at 9 AM
timezone: 'America/New_York'
})
// Manual (platform UI only)
triggers.manual()
Timeout
Important: Always set
timeoutto at least 600 seconds (10 minutes) for webhook and x402 triggers. Agents often take significant time to process requests — especially in multi-agent workflows or when performing research, content generation, or other complex tasks. A low timeout (e.g., 180s) will cause premature failures. When in doubt, err on the side of a longer timeout. For multi-agent pipelines with many sequential steps, consider 900 seconds or more.
Input Schema
Define fields for webhook/x402 paywall UI:
triggers.x402({
name: 'Content Writer',
description: 'Generate polished content on any topic',
price: '0.01',
input: {
topic: {
type: 'string',
title: 'Content Topic',
description: 'Enter the subject you want covered'
},
style: {
type: 'string',
title: 'Writing Style',
enum: ['formal', 'casual', 'humorous'],
default: 'casual'
}
}
})
Cron Expressions
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
* * * * *
Common: 0 9 * * * (daily 9 AM), */5 * * * * (every 5 min), 0 9 * * 1-5 (weekdays 9 AM)
Deploy to OpenServ Cloud
Deploy your agent to the OpenServ managed cloud with:
npx @openserv-labs/client deploy [path]
Where [path] is the directory containing your agent code (defaults to current directory).
Prerequisites
-
OPENSERV_USER_API_KEYin.env— Your.envfile in the agent directory must containOPENSERV_USER_API_KEY. Get this from the OpenServ platform dashboard. This key is required by the deploy command (and byPlatformClientfor management operations). Note thatprovision()itself does not need this key — it creates its own wallet, authenticates, and persists credentials to.openserv.jsonindependently. The user API key is also saved to.openserv.jsonafter provision if present. -
Call
provision()first —provision()must run at least once before deploying. It registers the agent on the platform and persists credentials to.openserv.json. The recommended agent template already callsprovision()beforerun(agent)inmain(), so starting the agent locally (npm run devornpx tsx src/agent.ts) is enough. If your code does not callprovision()(e.g., you only callrun(agent)in a custom script), you must add an explicitprovision()call and run it once before deploying.
Deploy Workflow
1. Set OPENSERV_USER_API_KEY in .env
2. Call provision() during local startup (npm run dev) — registers the agent and writes .openserv.json
3. npx @open
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.4k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
crawl4ai
84.4kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
