# Openserv Agent Sdk

Build and deploy autonomous AI agents using the OpenServ SDK (@openserv-labs/sdk).

- Repository: https://github.com/internet-court/internet-court-skill (7050 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-26
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add internet-court/internet-court-skill --skill openserv-agent-sdk -g -a claude-code -y`
Codex: `npx skills add internet-court/internet-court-skill --skill openserv-agent-sdk -g -a codex -y`
Cursor: `npx skills add internet-court/internet-court-skill --skill openserv-agent-sdk -g -a cursor -y`
Gemini CLI: `npx skills add internet-court/internet-court-skill --skill openserv-agent-sdk -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add internet-court/internet-court-skill`

## Description

Build and deploy autonomous AI agents using the OpenServ SDK (@openserv-labs/sdk). IMPORTANT - Always read the companion skill openserv-client alongside this skill, as both packages are required to build and run agents. openserv-client covers the full Platform API for multi-agent workflows and ERC-8004 on-chain identity. Read reference.md for the full API reference.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# OpenServ Agent SDK

Build and deploy custom AI agents for the OpenServ platform using TypeScript.

## Why build an agent?

An OpenServ agent is a service that runs your code and exposes it on the OpenServ platform, so it can be triggered by workflows, other agents, or paid calls (e.g. x402). The platform sends tasks to your agent; your agent runs your capabilities (APIs, tools, file handling) and returns results. You don't have to use an LLM, e.g. it could be a static API that just returns data. If you need LLM reasoning, you have two options: use **runless capabilities** (the platform handles the AI call for you, no API key needed) or use `generate()` (delegates the LLM call to the platform); alternatively, bring your own LLM (any provider you have access to).

## How it works (the flow)

1. **Define your agent**, System prompt plus _capabilities_. Capabilities come in two flavors: **runnable** (with a Zod schema and a `run` handler) and **runless** (just a name and description, the platform handles the AI call automatically). You can also use `generate()` inside runnable capabilities to delegate LLM calls to the platform.
2. **Register with the platform**, You need an account on the platform; often the easiest way is to let `provision()` create one for you automatically by creating a wallet and signing up with it (that account is reused on later runs). Call `provision()` (from `@openserv-labs/client`): it creates or reuses a wallet, registers the agent, and writes API key and auth token into your env (or you pass `agent.instance` to bind them directly). In development you can skip setting an endpoint URL; the SDK can use a built-in tunnel to the platform.
3. **Start the agent**, Call `run(agent)`. The agent listens for tasks, runs your capabilities (and your LLM if you use one), and responds. Use `reference.md` and `troubleshooting.md` for details; `examples/` has full runnable code.

## What your agent can do

The rest: https://github.com/internet-court/internet-court-skill/blob/HEAD/vendored/openserv/openserv-agent-sdk/SKILL.md
