Skip to content

Commit d862c37

Browse files
committed
chore: readme
1 parent 08694ce commit d862c37

1 file changed

Lines changed: 21 additions & 34 deletions

File tree

README.md

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
</p>
44

55
<p align="center">
6-
A portable open-source operating system for AI agents.<br/>Near-zero cold starts (~6 ms), up to 32x cheaper than sandboxes.<br/>Powered by WebAssembly and V8 isolates.
6+
A portable open-source operating system for AI agents.<br/>Near-zero cold starts (~6 ms), up to 32x cheaper than sandboxes.<br/>Powered by WebAssembly and V8 isolates.<br/><br/>Supports Pi, Claude Code*, Codex*, Amp*, and OpenCode*<br/><sub>* coming soon</sub>
77
</p>
88

99
<p align="center">
10-
<a href="https://rivet.dev/docs/agent-os">Documentation</a> | <a href="https://rivet.dev/docs/agent-os/quickstart">Quickstart</a> | <a href="https://rivet.dev/docs/agent-os/versus-sandbox">agentOS vs Sandbox</a>
10+
<a href="https://rivet.dev/docs/agent-os">Documentation</a> | <a href="https://rivet.dev/docs/agent-os/quickstart">Quickstart</a>
1111
</p>
1212

1313

@@ -19,55 +19,42 @@
1919
- **Deploy anywhere**: Just an npm package. Works on your laptop, Rivet Cloud, Railway, Vercel, Kubernetes, or any container platform.
2020
- **Open source**: Apache 2.0 licensed. Self-host or use [Rivet Cloud](https://rivet.dev/docs/agent-os/deployment) for managed infrastructure.
2121

22+
### agentOS vs Sandbox
23+
24+
agentOS is a lightweight VM that runs inside your process. Sandboxes are full Linux environments. agentOS integrates agents into your backend with [host tools](https://rivet.dev/docs/agent-os/tools) and granular permissions. Sandboxes give you a full OS for browsers, native binaries, and dev servers.
25+
26+
You don't have to choose: agentOS works with sandboxes through the [sandbox extension](https://rivet.dev/docs/agent-os/sandbox), spinning up a full sandbox on demand and mounting the sandbox's file system when the workload needs it.
2227

2328
## Quick start
2429

2530
```bash
26-
npm install rivetkit @rivet-dev/agent-os-common @rivet-dev/agent-os-pi
31+
npm install @rivet-dev/agent-os-core @rivet-dev/agent-os-common @rivet-dev/agent-os-pi
2732
```
2833

29-
**server.ts**
30-
3134
```ts
32-
import { agentOs } from "rivetkit/agent-os";
33-
import { setup } from "rivetkit";
35+
import { AgentOs } from "@rivet-dev/agent-os-core";
3436
import common from "@rivet-dev/agent-os-common";
3537
import pi from "@rivet-dev/agent-os-pi";
3638

37-
const vm = agentOs({
38-
options: { software: [common, pi] },
39-
});
40-
41-
export const registry = setup({ use: { vm } });
42-
registry.start();
43-
```
44-
45-
**client.ts**
46-
47-
```ts
48-
import { createClient } from "rivetkit/client";
49-
import type { registry } from "./server";
50-
51-
const client = createClient<typeof registry>("http://localhost:6420");
52-
const agent = client.vm.getOrCreate(["my-agent"]);
53-
54-
// Subscribe to streaming events
55-
agent.on("sessionEvent", (data) => {
56-
console.log(data.event);
57-
});
39+
const vm = await AgentOs.create({ software: [common, pi] });
5840

5941
// Create a session and send a prompt
60-
const session = await agent.createSession("pi", {
42+
const { sessionId } = await vm.createSession("pi", {
6143
env: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY! },
6244
});
63-
await agent.sendPrompt(
64-
session.sessionId,
65-
"Write a hello world script to /home/user/hello.js",
66-
);
45+
46+
vm.onSessionEvent(sessionId, (event) => {
47+
console.log(event);
48+
});
49+
50+
await vm.prompt(sessionId, "Write a hello world script to /home/user/hello.js");
6751

6852
// Read the file the agent created
69-
const content = await agent.readFile("/home/user/hello.js");
53+
const content = await vm.readFile("/home/user/hello.js");
7054
console.log(new TextDecoder().decode(content));
55+
56+
vm.closeSession(sessionId);
57+
await vm.dispose();
7158
```
7259

7360
See the [Quickstart guide](https://rivet.dev/docs/agent-os/quickstart) for the full walkthrough.

0 commit comments

Comments
 (0)