mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 09:01:17 +00:00
docs: install agents before starting server in E2B example
This commit is contained in:
parent
7f73ea503e
commit
0bbe096fe4
1 changed files with 4 additions and 4 deletions
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue