'use client'; import { Code, Server, GitBranch } from 'lucide-react'; import { CopyButton } from './ui/CopyButton'; const sdkCodeRaw = `import { SandboxAgent } from "sandbox-agent"; const client = await SandboxAgent.start(); await client.createSession("my-session", { agent: "claude-code", }); await client.postMessage("my-session", { message: "Hello, world!", }); for await (const event of client.streamEvents("my-session")) { console.log(event.type, event.data); }`; function SdkCodeHighlighted() { return (
import
{" { "}
SandboxAgent
{" } "}
from
"sandbox-agent"
;
{"\n\n"}
const
client =
await
SandboxAgent.
start
();
{"\n\n"}
await
client.
createSession
(
"my-session"
{", {"}
{"\n"}
{" agent: "}
"claude-code"
,
{"\n"}
{"});"}
{"\n\n"}
await
client.
postMessage
(
"my-session"
{", {"}
{"\n"}
{" message: "}
"Hello, world!"
,
{"\n"}
{"});"}
{"\n\n"}
for await
(
const
event
of
client.
streamEvents
(
"my-session"
{")) {"}
{"\n"}
{" console."}
log
(event.type, event.data);
{"\n"}
{"}"}
);
}
const sandboxCommand = `curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh`;
const sourceCommands = `git clone https://github.com/rivet-dev/sandbox-agent
cd sandbox-agent
cargo run -p sandbox-agent --release`;
export function GetStarted() {
return (
Choose the installation method that works best for your use case.
Embed in your application
Import the TypeScript SDK directly into your Node or browser application. Full type safety and streaming support.
Run as a server
Run as an HTTP server and connect from any language. Deploy to E2B, Daytona, Vercel, or your own infrastructure.
$
curl -fsSL \
{"\n"}
{" "}
https://releases.rivet.dev/sandbox-agent/latest/install.sh
|
sh
Full control
Clone the repo and build with Cargo. Customize, contribute, or embed directly in your Rust project.
$
git clone
https://github.com/rivet-dev/sandbox-agent
{"\n"}
$
cd
sandbox-agent
{"\n"}
$
cargo run
-p sandbox-agent --release