Sitelet https://rivet.dev/agents/docs/
Skip to main content

Agents

Run a coding agent as a durable Rivet Actor. Its files live in the Actor's database, or in a sandbox when it needs a shell.

Each agent on Rivet is one Rivet Actor. You define the agent once, and every key you call it with gets its own Actor, conversations, and files.

YOUR BACKENDSANDBOXEStool callsAgentShell + filesAgentShell + filesAgentShell + files
  • The agent loop runs in the Actor. Model calls, retries, and the conversation run in your backend, next to your application code, where you control credentials, permissions, and logging.
  • Files without a sandbox. By default, the agent’s file tools work on files in the Actor’s own SQLite database, so there is nothing else to set up.
  • A sandbox when it needs a shell. Add a sandbox such as E2B or Daytona, and file and shell tools run there. Nothing the agent runs executes on your worker, and your provider keys never enter the sandbox.
  • Agents are durable. Each agent lives in its Actor’s SQLite database, not in memory, so it can sleep, crash, or upgrade mid-run and pick up where it left off.

Why Rivet

Stateful agents on any infrastructure

  • A live process per agent. Each agent is an Actor with its own memory and SQLite database. It keeps its conversations loaded between prompts, so two servers never race on the same agent. Nothing is rebuilt from a database or replayed from an event log on each request.
  • No cloud lock-in. Rivet is open source under Apache 2.0. Use Rivet Cloud, bring your own compute, or self-host everything. Workers run on Kubernetes, AWS ECS, Railway, Render, Vercel, Google Cloud Run, AWS Lambda, or any VM.

Any harness, any model

  • Bring your harness. Rivet runs existing agent harnesses, starting with Pi, instead of asking you to rewrite your agent for a new framework.
  • Bring your model and keys. Use any provider the harness supports, your own API keys, or your users’ own subscriptions.

Built for scale and realtime

  • Lightweight. A running Actor adds about 72 KB of memory on top of the agent’s conversations, and a sleeping agent uses none. Give every user, task, or thread its own agent.
  • Wakes in milliseconds. A sleeping agent wakes on its next prompt in about 12 ms, instead of the seconds it takes to boot a container.
  • Realtime and multiplayer. Clients connect over WebSockets and stream events as the agent works. Many users can watch and steer the same conversation.
  • One primitive for your backend. Agents are Actors, like the rest of your Rivet app, so they call other agents and Actors directly and use the same schedules, queues, and workflows.
  • Swappable sandboxes. A sandbox crash does not lose the conversation, and a tool call adds about 10 ms in the same datacenter.

Core

Concepts