# Vercel Eve

> **INFO:** This integration is in beta. APIs may change between releases.

Eve owns the agent runtime and session lifecycle, while agentOS maps every sandbox session to an isolated VM actor with a durable `/workspace` filesystem.

[View the complete example →](https://github.com/rivet-dev/agentos/tree/main/examples/vercel-eve)

## Quickstart

### Create an Eve agent

```sh
npx eve@latest init my-agent
cd my-agent
```

### Install the integrations

```sh
npm add @rivet-dev/agentos @rivet-dev/agentos-eve @rivet-dev/vercel-world
```

- `@rivet-dev/agentos`: Provides the agentOS VM.
- `@rivet-dev/agentos-eve`: Connects Eve's sandbox API to agentOS.
- `@rivet-dev/vercel-world`: Runs Eve workflows on [Rivet World](https://workflow-sdk.dev/worlds).

### Set up the Eve agent

Update `agent/agent.ts`:

```ts title="agent/agent.ts"
import { defineAgent } from "eve";

export default defineAgent({
	model: "anthropic/claude-sonnet-5",
	build: {
		externalDependencies: [
			"@rivet-dev/agentos",
			"@rivet-dev/agentos-core",
			"@rivet-dev/agentos-eve",
			"@rivet-dev/agentos-runtime-core",
			"@rivet-dev/agentos-sidecar",
			"@rivet-dev/vercel-world",
			"@rivetkit/engine-cli",
		],
	},
	experimental: {
		workflow: { world: "#world" },
	},
});
```

### Configure Rivet World

Rivet World lets you run Eve on top of Rivet.

Add the World module import to `package.json`:

```json title="package.json"
{
	"imports": {
		"#world": "./world.ts"
	}
}
```

Create `world.ts`:

```ts title="world.ts"
import { createWorld as createRivetWorld } from "@rivet-dev/vercel-world";
import { registry } from "./actors";

export const createWorld = () => createRivetWorld({ registry });
```

The first World operation starts this registry and waits for the Rivet envoy to
be ready.

### Configure agentOS

Create `actors.ts`:

```ts title="actors.ts"
import { agentOS, setup } from "@rivet-dev/agentos";
import { vercelWorldActors } from "@rivet-dev/vercel-world/registry";

const vm = agentOS({
	// Configuration will go here.
});

export const registry = setup({
	use: {
		...vercelWorldActors,
		vm,
	},
});
```

Create `agent/sandbox.ts`:

```ts title="agent/sandbox.ts"
import { agentOSBackend } from "@rivet-dev/agentos-eve";
import { defineSandbox } from "eve/sandbox";
import { registry } from "../actors";

export default defineSandbox({
	backend: agentOSBackend({ actor: "vm", registry }),
});
```

### Run Eve

Link Eve to Vercel once so it can call your configured model:

```sh
npx eve link
```

Then run the agent:

```sh
npx eve dev
```

### Deploy

## Using with other sandbox providers

agentOS is a drop-in replacement for any Eve sandbox backend.

[Read the Eve sandbox documentation →](https://eve.dev/docs/sandbox)

## Configuring agentOS with Eve

`agentOS()` configures the VM's filesystems, software, extensions, and limits.

[Read the agentOS + Vercel Eve documentation →](https://agentos-sdk.dev/docs/frameworks/vercel-eve)

## Configuring Rivet World with Eve

Rivet World stores Eve's runs in Rivet Actors so agents resume instead of restarting.

[Read the Rivet World + Vercel Eve documentation →](/integrations/vercel-workflows)
