docs: install agents before starting server in E2B example

This commit is contained in:
Nathan Flurry 2026-01-28 05:22:58 -08:00
parent 7f73ea503e
commit 0bbe096fe4

View file

@ -26,6 +26,10 @@ await sandbox.commands.run(
"curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh" "curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh"
); );
// Install agents before starting the server
await sandbox.commands.run("sandbox-agent install-agent claude");
await sandbox.commands.run("sandbox-agent install-agent codex");
// Start the server in the background // Start the server in the background
await sandbox.commands.run( await sandbox.commands.run(
"sandbox-agent server --no-token --host 0.0.0.0 --port 3000", "sandbox-agent server --no-token --host 0.0.0.0 --port 3000",
@ -46,10 +50,6 @@ for (let i = 0; i < 30; i++) {
} }
} }
// Install agents (or pre-install in a custom template)
await client.installAgent("claude");
await client.installAgent("codex");
// Create a session and start coding // Create a session and start coding
await client.createSession("my-session", { await client.createSession("my-session", {
agent: "claude", agent: "claude",