All Examples

Every runnable example lives in one repo: hiver-sh/examples, in TypeScript and Python.

Clone the examples

git clone https://github.com/hiver-sh/examples
cd examples

Every example talks to a local gateway, so start one first (see Installation):

hiver up      # http://localhost:10000 — hiver down to stop it

You'll also need an API key for whichever model provider the example uses.

Where to find the code

Each example is a top-level directory, with a typescript/ and/or python/ implementation inside it. Each of those is standalone — it has its own README.md and its own dependencies, and you run it from that directory:

examples/
  claude-code/
    typescript/   index.ts, package.json      <- run from here
    python/       main.py, requirements.txt   <- or here
  claude-agent-sdk/
    typescript/
      client.ts                               <- drives the agent
      agent/    Dockerfile, .hiver.json       <- the server that runs *inside* the sandbox

Run one:

# TypeScript
cd claude-code/typescript && npm install && npm start

# Python
cd claude-code/python && pip install -r requirements.txt && python main.py

Agent SDK servers

The agent loop runs inside the sandbox as an HTTP service. Each has an agent/ directory with a Dockerfile and a .hiver.json, launched in one step with hiver run . <key>. The .hiver.json locks egress to the model provider and injects the key via an override, so it never lives in the sandbox's env or context.

ExampleLanguagesGuide
claude-agent-sdkTypeScript, PythonClaude Agent SDK
openai-agents-sdkTypeScript, PythonOpenAI Agents SDK
google-adkPython

Google ADK is Python-first, so it has no TypeScript example.

CLI and browser drivers

A script you run on your machine. It provisions a prebuilt image (claude, codex, copilot, browser) and drives it over the gateway with exec or CDP.

ExampleLanguagesGuide
claude-codeTypeScript, PythonAgent CLI
codexTypeScript, PythonAgent CLI
copilotTypeScript, PythonAgent CLI
browser-useTypeScript, PythonBrowser Use

Client SDK recipes

Lower-level examples that drive a sandbox directly with the @hiver.sh/client SDK. TypeScript only.

ExampleWhat it shows
node-exec / python-execRun a command and read the buffered result.
node-exec-stream / python-exec-streamStream command output over SSE.
node-exec-tty / python-exec-ttyDrive an interactive REPL over a TTY exec stream.
claude-execRun Claude inside the claude image and print the result.
terminal-attachAttach your local terminal to an interactive shell in the sandbox.
apply-configRead the config, add an egress rule, apply the update.
egress-eventsObserve egress.request / egress.response events for allowed vs blocked hosts.
node-internal-serviceStart deny-all, then applyConfig to allow an internal host.
filesUpload a file into a mount and read it back out.
list-directoryList the contents of a sandbox mount.
snapshotPersist a sandbox's filesystem across a full shutdown via snapshots.
snapshot-fuseRoute the snapshot through an internal GCS-backed FUSE drive.
local-filesystem-mountMount a local directory into the sandbox during development.
gdrive-filesystemMount a Google Drive folder over a FUSE mount.
http-serverProxy HTTP requests to a service running inside the sandbox (ingress).
mcp-serverBundle and run an MCP server inside the sandbox.
browser-cdpDrive the sandbox's resident Chromium with Playwright over CDP.
claude-agentA Claude agent that drives the sandbox through an in-sandbox MCP server.
claude-agent-gdrive-filesystemThe Claude agent, with generated files persisted to Google Drive.

Next: Agent CLI