Skip to content

Concepts

Twins

Markdown

A twin is a disposable copy of production for one task, with its own database branch, its own preview address, its own machine.

For every task, your agent gets a twin of production:

  • a branch of the production database, with an expiry, so the data is real but the original is never touched,
  • a preview app that only people with a signed link can open,
  • a sandbox or computer whose DATABASE_URL points at the branch.

The agent can do anything inside a twin. When the task is done, the result goes to production with a promote step, and the twin goes away.

Every piece of a twin exists already, so you or your agent can assemble one today:

  1. Branch the database with an expiry: create_branch, or ry postgres branch with --expires-in.
  2. Deploy the change to an app of its own, and protect it with ry protect signed <app>.
  3. Attach the branch to that app with ry attach <branch> --to <app>. The app gets the branch’s connection URL as its DATABASE_URL.

Rytiv’s MCP tools never return a database password, and the connection URL of a branch is handed out only once, to whoever asks for it first. See Postgres.