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 examplesEvery example talks to a local gateway, so start one first (see Installation):
hiver up # http://localhost:10000 — hiver down to stop itYou'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 sandboxRun one:
# TypeScript
cd claude-code/typescript && npm install && npm start
# Python
cd claude-code/python && pip install -r requirements.txt && python main.pyAgent 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.
| Example | Languages | Guide |
|---|---|---|
claude-agent-sdk | TypeScript, Python | Claude Agent SDK |
openai-agents-sdk | TypeScript, Python | OpenAI Agents SDK |
google-adk | Python | — |
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.
| Example | Languages | Guide |
|---|---|---|
claude-code | TypeScript, Python | Agent CLI |
codex | TypeScript, Python | Agent CLI |
copilot | TypeScript, Python | Agent CLI |
browser-use | TypeScript, Python | Browser Use |
Client SDK recipes
Lower-level examples that drive a sandbox directly with the @hiver.sh/client SDK. TypeScript only.
| Example | What it shows |
|---|---|
node-exec / python-exec | Run a command and read the buffered result. |
node-exec-stream / python-exec-stream | Stream command output over SSE. |
node-exec-tty / python-exec-tty | Drive an interactive REPL over a TTY exec stream. |
claude-exec | Run Claude inside the claude image and print the result. |
terminal-attach | Attach your local terminal to an interactive shell in the sandbox. |
apply-config | Read the config, add an egress rule, apply the update. |
egress-events | Observe egress.request / egress.response events for allowed vs blocked hosts. |
node-internal-service | Start deny-all, then applyConfig to allow an internal host. |
files | Upload a file into a mount and read it back out. |
list-directory | List the contents of a sandbox mount. |
snapshot | Persist a sandbox's filesystem across a full shutdown via snapshots. |
snapshot-fuse | Route the snapshot through an internal GCS-backed FUSE drive. |
local-filesystem-mount | Mount a local directory into the sandbox during development. |
gdrive-filesystem | Mount a Google Drive folder over a FUSE mount. |
http-server | Proxy HTTP requests to a service running inside the sandbox (ingress). |
mcp-server | Bundle and run an MCP server inside the sandbox. |
browser-cdp | Drive the sandbox's resident Chromium with Playwright over CDP. |
claude-agent | A Claude agent that drives the sandbox through an in-sandbox MCP server. |
claude-agent-gdrive-filesystem | The Claude agent, with generated files persisted to Google Drive. |
Next: Agent CLI