Using Rift

Agent development environments

Agent development environments (ADEs) such as Orca (opens in a new tab) create a worktree for each AI agent. Use their lifecycle scripts to start an app when a worktree is created, and stop it when the task is archived.


Before you start

  • Complete the Quick start for your project, so rift.yaml and your Docker Compose changes are committed.
  • Make sure rift is available on the PATH the scripts run with.
  • Complete the initial certificate trust step interactively, by running rift setup once yourself. It may ask for your system password, which a script cannot type.

Set up Orca

Add these commands to your repository's scripts in Orca (opens in a new tab).

Setup script

cd "$ORCA_WORKTREE_PATH" && rift setup

rift setup prepares the environment and runs rift up, so no extra start command is needed.

Archive script

cd "$ORCA_WORKTREE_PATH" && rift down

This stops that app and removes its route, while the other apps and the shared router keep running.


Other environments

Any tool that runs a command when a worktree is created and when it is removed works the same way: run rift setup from the new worktree's directory, and rift down from it before it goes away.

Previous
The dashboard