Skip to main content
The TypeScript SDK exports OrcapodsClient and generated request/response types under the Orcapods namespace. It is generated into sdks/typescript.
This repository currently contains the generated TypeScript source. If your deployment publishes it as an npm package, replace the local import path below with that package name.

Client setup

Useful client options: Per-request options are the second argument:

Create a profile

Profiles define the agent runtime, model, prompt, tools, skills, and optional MCP servers.
Use these common runtime/model patterns:

Submit a run

The API can mint runId and sessionId. The current generated TypeScript type still requires id and sessionId, so pass empty strings when you want Orca to assign them. If you supply either identifier, it must be 1-128 characters and use only letters, numbers, underscores, or hyphens.
Reuse a session by passing the previous sessionId:

Stream run events

runs.stream opens the Conductor SSE endpoint. Use a longer timeout for streams that may stay open while an agent is working.
The generated stream return type is Stream<string>, but Orca sends JSON Event objects in each SSE data: payload. Cast or parse the frames as Orcapods.Event in application code.
Use runs.replayEvents({ id }) when you want the persisted event log instead of a live SSE connection.

Read raw response metadata

Every SDK call returns an HttpResponsePromise. Await it for parsed data, or call withRawResponse() when you need headers and status metadata.
For endpoints not yet generated into a resource client, use the passthrough fetch method. Relative paths resolve against the configured base URL.

Error handling

Known status codes throw generated subclasses such as BadRequestError, ConflictError, and NotFoundError. Other failed status codes throw OrcapodsError.

Common calls

See the SDK method map for the full generated surface.

VirtualFS TypeScript SDK

@agent-orc/vfs is the standalone VirtualFS HTTP client for TypeScript, and @agent-orc/claude-vfs is the Claude Messages Bash tool adapter that routes through it. Both packages live under virtualfs/sdk/ and target the /vfs/... HTTP API directly rather than the conductor. See VirtualFS SDKs for installation, mount factories, typed file ops, the Vercel AI SDK / OpenAI tool bundle, the in-package SandboxClient facade, and Claude Bash tool integration.

Strict mount validation

Every mount the client declares is checked against the server’s live mount table. Call await ws.validate() before doing real work — typically right after constructing Workspace — so a misconfigured server fails fast instead of silently routing reads to the wrong store.
Validation rejects with:
  • MountMismatch — a declared path is not registered on the server, or the backend kind / bucket / endpoint does not match what the server reports.
  • MountUnavailable — the server has the mount but its backend failed to initialize at boot; the server-reported reason is included.
The r2() factory signature: