Concepts
Twins
A twin is a disposable copy of production for one task, with its own database branch, its own preview address, its own machine.
What a twin is
Section titled “What a twin is”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_URLpoints 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.
Building one by hand today
Section titled “Building one by hand today”Every piece of a twin exists already, so you or your agent can assemble one today:
- Branch the database with an expiry:
create_branch, orry postgres branchwith--expires-in. - Deploy the change to an app of its own, and protect it with
ry protect signed <app>. - Attach the branch to that app with
ry attach <branch> --to <app>. The app gets the branch’s connection URL as itsDATABASE_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.