Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

Typescript sdk

Not yet published to npm. Build it from packages/sdk-ts.
import { Orsel, ApprovalRequiredError } from 'orsel'; const orsel = new Orsel({ apiKey, baseUrl, project }); const run = await orsel.act({ domain, actionId, input }, { wait: true });
Options: apiKey (env ORSEL_KEY), baseUrl (env ORSEL_URL, required), project (env ORSEL_PROJECT, sent as X-Project-Id), fetch, retries (2), timeoutMs (30000).

use a site like an API

const blog = await orsel.site('egeuysal.com', { explore: true }); const { slugs } = await blog.list_blog(); const post = await blog.read_blog_page({ slug: slugs[0] });
site(domain) loads the site's actions and gives one method per action: input in, typed output out, run waited for. A run that does not succeed throws ActionError (.run, .code, and a message that says what failed and how to look closer). A missing input is named before anything is sent. explore: true makes read actions from the site's public pages first if it has none. site.run(id, input) returns the whole run without throwing. For typed inputs and outputs, generate the types with orsel typegen <domain> and pass them: orsel.site<EgeuysalComActions>(domain). See use a website as an API.
act({ wait: true }) no longer makes a second request when the answer to the act already says the run finished.

behavior

  • Writes are never retried automatically. Every act carries an idempotency key (sdk-<uuid> unless you pass one), so you can retry yourself safely with the same key.
  • Reads retry on 408, 425, 429 and 5xx with full-jitter backoff and honor Retry-After.
  • Errors: OrselError, ApiError (code, status, requestId, hint), RateLimitError, NetworkError, TimeoutError, ApprovalRequiredError, PaymentRequiredError, WebhookSignatureError.
  • act.stream() yields step, approval and result events.

offline checks

orsel/verify verifies a ledger and a recipe without trusting the server. orsel/webhooks verifies webhook signatures.