Devin's Workspace
Manage the repositories that Devin’s Workspace will include at the start of every session
Devin’s Workspace resets to a saved machine state at the start of every session. By default this machine state includes all the repositories you’ve added at preview.devin.ai/workspace.
Tip: Setting up Devin’s Workspace significantly improves Devin’s performance on your codebase. Imagine if every time you started a task, your laptop and part of your memory were wiped - that’s what happens to Devin without setup!
Set up a repo in Devin’s Workspace
Step 0: Choose a repository to add
Repositories can be added at any point at preview.devin.ai/workspace. If you don’t see a repo you’re looking for, you may need to authorize additional repositories.
Step 1: Clone the repository
This step is done automatically when you add the repository.
Step 2: Environment setup
Devin sessions by default will start with Devin’s workspace reset to include the repository exactly as you leave it during setup. You can always edit this setup at preview.devin.ai/workspace.
Tips:
- Behind the scenes, all repositories you set up will co-exist on the same machine (in the same machine snapshot).
- Be careful about global package installations and consider using a virtual environment.
The 3 minimal recommended steps are:
- Install dependencies
- Configure secrets / environment variables
- Verify the code can run
Step 3: Startup commands
Startup commands run automatically in ~ (home directory) at the start of your Devin sessions. They execute in the order you provide them.
Tips:
- Pull changes from git
- Run your package manager installation (e.g.
npm install
) - Tip: DO NOT add commands that start long running processes (e.g.
npm start
to start a server) - each command has a 2 minute timeout!
Step 4: Success Criteria Commands
Devin runs success criteria commands whenever it thinks a task is complete. They help Devin sanity check its work before it shares a deliverable with you.
It’s recommended to:
- Run lint (e.g. npm run lint)
- Run formatting (e.g. npm run format)
- Run unit tests (e.g. npm run test)
Advanced: Machine Snapshots
Behind the scenes, all repositories you set up (if you follow the process described above) co-exist on the same (default) machine snapshot.
Advanced users can create additional machine snapshots to start Devin sessions from different saved machine states.
Quickstart
- Ask Devin to clone a repo and install the dependencies
-
Verify that the repo is built successfully
- [Optional] You can go to Use Devin’s Machine to open a shell on the dev box and verify the clean state, and/or make changes for Devin.
- Make sure there are no stray changes (e.g. untracked changes in git) that could confuse Devin.
-
If Devin successfully built the repo, click Create machine snapshot. Remember that creating the snapshot will terminate the session so only do this once the session is done.
-
When creating the snapshot, you can (1) provide a snapshot description which Devin will read when using the snapshot and (2) add startup commands that automatically run (e.g. Add
cd your-repo && git pull && npm install
to pull the latest version from Git, install the latest dependencies, etc).
How do I create a machine snapshot?
-
Once your run has ended, click the “Create machine snapshot” button in the menu in the top right corner of Devin’s Workspace.
This feature is only available when Devin is awaiting a response or after the session ends.
-
Then, fill in your snapshot name, description and the startup commands you want to run each time the snapshot is selected.
The snapshot description is used to explain the state of the machine to future Devin (who has no memory of your previous run).
The startup commands are commands that automatically run when starting a session with the snapshot (e.g. Add
cd your-repo && git pull && npm install
to pull the latest version from Git, install the latest dependencies, etc).Once submitted, the snapshot will generally take 15-30 minutes before becoming available. In some cases when your run has already ended a long time ago, your snapshot can actually become available immediately.
You’ll be able to choose the snapshot on the home page if you click the desktop / monitor icon in the input box.
Tip: While it’s possible to terminate a session at any point and then take a snapshot, it’s generally better to wait until Devin no longer has any commands running before creating the snapshot. This way you can be sure you’re not capturing Devin’s machine state mid-operation!
Tips & Important Notes
- Devin won’t have memory of the original session. You can either provide it in your input prompt or give additional context in your snapshot description!
- If you’re working in an organization, everyone will be able to see the snapshots you and your teammates have created.
- Devin’s performance can sometimes degrade as the chat log gets longer. If this happens, consider using snapshots as a way to ‘wipe’ the log but maintain the machine image progress. Just remember to give Devin all the necessary context when you start from the snapshot.