Skip to content

Commit b985f67

Browse files
Updated mintlify pages
- Updated docs/agents/devin.mdx - Created images/devin_flowchart.png Mintlify-Source: dashboard-editor
1 parent 5ffcce0 commit b985f67

2 files changed

Lines changed: 34 additions & 102 deletions

File tree

docs/agents/devin.mdx

Lines changed: 34 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ description: "Run Devin in or against secure E2B sandboxes."
44
icon: "/images/icons/devin.svg"
55
---
66

7-
[Devin](https://devin.ai) is Cognition's coding agent. You can use E2B with
8-
Devin in two ways:
7+
[Devin](https://devin.ai) is Cognition's coding agent. You can use E2B with Devin in two ways:
98

109
- run Devin for Terminal directly inside an isolated E2B sandbox
1110
- run a Devin Outposts worker in an E2B sandbox and route Devin sessions to it
1211

1312
## Run Devin for Terminal
1413

15-
[Devin for Terminal](https://devin.ai/terminal) runs directly from a terminal.
16-
Install it in a sandbox to give Devin an isolated workspace without access to
17-
your local machine.
14+
[Devin for Terminal](https://devin.ai/terminal) runs directly from a terminal. Install it in a sandbox to give Devin an isolated workspace without access to your local machine.
1815

1916
```bash
2017
e2b sandbox create base
@@ -26,8 +23,7 @@ curl -fsSL https://cli.devin.ai/install.sh | bash
2623
source /home/user/.bashrc
2724
```
2825

29-
After completing Devin's interactive sign-in, run a task from the project
30-
directory:
26+
After completing Devin's interactive sign-in, run a task from the project directory:
3127

3228
```bash
3329
git clone https://github.com/your-org/your-repo.git /home/user/repo
@@ -38,15 +34,9 @@ devin --permission-mode dangerous -p "Add error handling to all API endpoints"
3834

3935
## Run Devin Outposts in E2B
4036

41-
Use the public `devin-outposts` template to run an Outposts worker and its setup
42-
UI inside an E2B sandbox. The template includes the Devin CLI, starts the setup
43-
UI on port `3000`, and reserves `/mnt/repos` as the worker workspace.
37+
Use the public `devin-outposts` template to run an Outposts worker and its setup UI inside an E2B sandbox. The template includes the Devin CLI, starts the setup UI on port `3000`, and reserves `/mnt/repos` as the worker workspace.
4438

45-
<Card
46-
title="Open the Devin Outposts template"
47-
icon="terminal"
48-
href="https://e2b.dev/dashboard/terminal?template=aiengineer-d56d/devin-outposts"
49-
>
39+
<Card title="Open the Devin Outposts template" icon="terminal" href="https://e2b.dev/dashboard/terminal?template=aiengineer-d56d/devin-outposts">
5040
Start the template in the E2B dashboard and open its terminal.
5141
</Card>
5242

@@ -63,31 +53,25 @@ The immutable template ID is `myw11k4t1jtjbr7ckvz8`.
6353

6454
### Open the setup UI
6555

66-
When the terminal connects, it prints the exact setup URL for that sandbox and
67-
the command that reads its sandbox-local control token. The URL has this shape:
56+
When the terminal connects, it prints the exact setup URL for that sandbox and the command that reads its sandbox-local control token. The URL has this shape:
6857

6958
```text
7059
https://3000-<sandbox-id>.<e2b-domain>
7160
```
7261

73-
The sandbox receives its runtime ID as `E2B_SANDBOX_ID`. A self-hosted E2B
74-
deployment must configure its own E2B domain when building the template; the
75-
sandbox cannot infer that public domain from its runtime ID.
62+
The sandbox receives its runtime ID as `E2B_SANDBOX_ID`. A self-hosted E2B deployment must configure its own E2B domain when building the template; the sandbox cannot infer that public domain from its runtime ID.
7663

7764
Read the setup token inside the sandbox:
7865

7966
```bash
8067
cat /home/user/.config/devin-outposts/control-token
8168
```
8269

83-
Enter it in the setup UI. A successful exchange issues a signed, HTTP-only
84-
session cookie valid for 12 hours. The control token remains reusable inside
85-
that sandbox and is not stored in browser local storage.
70+
Enter it in the setup UI. A successful exchange issues a signed, HTTP-only session cookie valid for 12 hours. The control token remains reusable inside that sandbox and is not stored in browser local storage.
8671

8772
### Configure the worker
8873

89-
The setup UI asks for credentials and routing information from your Devin
90-
organization:
74+
The setup UI asks for credentials and routing information from your Devin organization:
9175

9276
| Value | Purpose |
9377
| --- | --- |
@@ -99,55 +83,35 @@ organization:
9983
| Outposts worker token | Authenticates the worker to that pool |
10084

10185
<Warning>
102-
Do not put these credentials in a public template. The setup UI stores them
103-
only in the running sandbox with file mode `0600`. Treat a snapshot of a
104-
configured sandbox as secret-bearing.
86+
Do not put these credentials in a public template. The setup UI stores them only in the running sandbox with file mode `0600`. Treat a snapshot of a configured sandbox as secret-bearing.
10587
</Warning>
10688

107-
Save the configuration and start the worker. The status view shows whether the
108-
worker process is running and displays recent worker output for troubleshooting.
109-
Confirm the pool appears in Devin's virtual-environment menu before sending a
110-
task; process state alone does not prove pool registration.
89+
Save the configuration and start the worker. The status view shows whether the worker process is running and displays recent worker output for troubleshooting. Confirm the pool appears in Devin's virtual-environment menu before sending a task; process state alone does not prove pool registration.
11190

112-
If the template reports that no Outposts pools are available, the API key cannot
113-
see a pool that this worker can join. Create or assign the pool in Devin, then
114-
run **Check Devin account** again before saving the connection.
91+
If the template reports that no Outposts pools are available, the API key cannot see a pool that this worker can join. Create or assign the pool in Devin, then run **Check Devin account** again before saving the connection.
11592

116-
Copy the organization URL from Devin while that organization is open. For
117-
example:
93+
Copy the organization URL from Devin while that organization is open. For example:
11894

11995
```text
12096
https://app.devin.ai/org/your-org
12197
```
12298

123-
The organization selected in the template UI controls API session listing and
124-
follow-ups. The `/org/<slug>` URL controls where Devin creates the browser
125-
session. These must refer to the same organization; an origin-only URL such as
126-
`https://app.devin.ai` is rejected because it would inherit the browser's last
127-
selected organization. Confirm the pairing in the setup form after selecting
128-
the API organization. Changing either value requires confirmation again.
99+
The organization selected in the template UI controls API session listing and follow-ups. The `/org/<slug>` URL controls where Devin creates the browser session. These must refer to the same organization; an origin-only URL such as `https://app.devin.ai` is rejected because it would inherit the browser's last selected organization. Confirm the pairing in the setup form after selecting the API organization. Changing either value requires confirmation again.
129100

130101
### Send a task to the Outposts worker
131102

132103
<Steps>
133104
<Step title="Wait for the worker process">
134-
The template UI header should say **Process running**. This means the local
135-
worker process is alive. Before sending work, also verify that the pool is
136-
available in Devin; process state alone does not prove registration.
105+
The template UI header should say **Process running**. This means the local worker process is alive. Before sending work, also verify that the pool is available in Devin; process state alone does not prove registration.
137106
</Step>
138-
139107
<Step title="Describe the task">
140-
Enter what Devin should build, change, or investigate. The template adds
141-
instructions to use `/mnt/repos` and to stop when the wrong virtual
142-
environment was selected. Nothing is sent while you type.
108+
Enter what Devin should build, change, or investigate. The template adds instructions to use `/mnt/repos` and to stop when the wrong virtual environment was selected. Nothing is sent while you type.
143109
</Step>
144110
<Step title="Open Devin with the prepared task">
145-
Choose **Open Devin with this task**. A new Devin page opens with the prompt
146-
pre-filled, but the task is not sent yet.
111+
Choose **Open Devin with this task**. A new Devin page opens with the prompt pre-filled, but the task is not sent yet.
147112
</Step>
148113
<Step title="Open Configuration in Devin">
149-
Look directly below the prompt. Select the **Configuration** button beside
150-
the attachment and effort controls, then open **Virtual environment**.
114+
Look directly below the prompt. Select the **Configuration** button beside the attachment and effort controls, then open **Virtual environment**.
151115

152116
```text
153117
┌──────────────────────────────────────────────┐
@@ -158,46 +122,28 @@ the API organization. Changing either value requires confirmation again.
158122
└─ Virtual environment
159123
```
160124
</Step>
161-
162125
<Step title="Select the Outposts pool">
163-
Choose the virtual environment whose name exactly matches the pool shown in
164-
the template UI. Devin labels registered pools as Outpost environments.
165-
Do this before selecting **Send**.
126+
Choose the virtual environment whose name exactly matches the pool shown in the template UI. Devin labels registered pools as Outpost environments. Do this before selecting **Send**.
166127
</Step>
167-
168128
<Step title="Send and attach the session">
169-
Send the prepared task in Devin. Return to the template UI, select
170-
**Refresh** under **Sessions claimed by this worker**, and attach the new session after this
171-
worker claims it. You can then read history and send follow-up messages from
172-
the template UI.
129+
Send the prepared task in Devin. Return to the template UI, select **Refresh** under **Sessions claimed by this worker**, and attach the new session after this worker claims it. You can then read history and send follow-up messages from the template UI.
173130
</Step>
174131
</Steps>
175132

176-
The task prompt tells Devin to work in `/mnt/repos`. If Devin reports a
177-
different workspace, such as `/home/ubuntu/repos`, the session is running on a
178-
managed Devin machine instead of the selected Outposts environment.
133+
The task prompt tells Devin to work in `/mnt/repos`. If Devin reports a different workspace, such as `/home/ubuntu/repos`, the session is running on a managed Devin machine instead of the selected Outposts environment.
179134

180135
<Check>
181-
The session is routed correctly when Devin works in `/mnt/repos`, does not ask
182-
you to choose a repository path, and the session appears in the template UI
183-
after the worker claims it.
136+
The session is routed correctly when Devin works in `/mnt/repos`, does not ask you to choose a repository path, and the session appears in the template UI after the worker claims it.
184137
</Check>
185138

186139
<Warning>
187-
If Devin says `/mnt/repos` is missing or reports `/home/ubuntu/repos`, stop
188-
that session. Open the task again and select the Outposts pool under
189-
**Configuration****Virtual environment** before sending it.
140+
If Devin says `/mnt/repos` is missing or reports `/home/ubuntu/repos`, stop that session. Open the task again and select the Outposts pool under **Configuration****Virtual environment** before sending it.
190141
</Warning>
191142

192-
The task is passed to Devin in the browser URL. Do not include credentials or
193-
other secrets in the task field.
143+
The task is passed to Devin in the browser URL. Do not include credentials or other secrets in the task field.
194144

195145
<Note>
196-
Creating a session through the public Devin v3 API does not currently select
197-
an Outposts pool. The initial task is therefore sent from Devin's web UI,
198-
where the virtual environment can be selected. After the worker claims the
199-
session, the template UI can display its history and send follow-up messages
200-
through the API.
146+
Creating a session through the public Devin v3 API does not currently select an Outposts pool. The initial task is therefore sent from Devin's web UI, where the virtual environment can be selected. After the worker claims the session, the template UI can display its history and send follow-up messages through the API.
201147
</Note>
202148

203149
### Verify the worker
@@ -210,34 +156,20 @@ test -d /mnt/repos
210156
tail -200 /home/user/devin-worker.log
211157
```
212158

213-
Successful claim logs may contain either `serving session <session-id>` or a
214-
structured `session_id` field. Once attached, the setup UI polls the session
215-
history and renders Devin's messages as they become available.
159+
Successful claim logs may contain either `serving session <session-id>` or a structured `session_id` field. Once attached, the setup UI polls the session history and renders Devin's messages as they become available.
216160

217161
### How the integration works
218162

219-
```mermaid
220-
flowchart LR
221-
UI["Setup UI in E2B sandbox"] -->|"Open prepared task"| DevinWeb["Devin web UI"]
222-
DevinWeb -->|"Route selected environment"| Pool["Devin Outposts pool"]
223-
Pool -->|"Worker claim"| Worker["Devin worker in E2B sandbox"]
224-
Worker -->|"Edit files and run commands"| Workspace["/mnt/repos"]
225-
UI -->|"History and follow-ups"| DevinAPI["Devin API"]
226-
```
163+
<Frame>
164+
![Devin Flowchart](/images/devin_flowchart.png)
165+
</Frame>
227166

228-
The worker, setup UI, credentials, and workspace stay inside the sandbox. The
229-
browser talks to the setup UI, and the setup UI makes authenticated Devin API
230-
requests on behalf of the user.
167+
The worker, setup UI, credentials, and workspace stay inside the sandbox. The browser talks to the setup UI, and the setup UI makes authenticated Devin API requests on behalf of the user.
231168

232169
## Limitations
233170

234-
- A Devin API key does not start an Outposts worker. The worker also needs a
235-
pool ID and worker token.
236-
- Existing Devin sessions remain assigned to the worker that claimed them. Do
237-
not assume a follow-up will migrate an old session to a replacement worker.
238-
- Devin can assign a new task to any available worker in the selected pool.
239-
Use a dedicated pool, or stop stale workers, when validating a specific
240-
sandbox or template build.
171+
- A Devin API key does not start an Outposts worker. The worker also needs a pool ID and worker token.
172+
- Existing Devin sessions remain assigned to the worker that claimed them. Do not assume a follow-up will migrate an old session to a replacement worker.
173+
- Devin can assign a new task to any available worker in the selected pool. Use a dedicated pool, or stop stale workers, when validating a specific sandbox or template build.
241174
- Use scoped, short-lived Outposts worker tokens when available.
242-
- Web apps started by Devin can be opened through their E2B sandbox preview
243-
URLs.
175+
- Web apps started by Devin can be opened through their E2B sandbox preview URLs.

images/devin_flowchart.png

28.7 KB
Loading

0 commit comments

Comments
 (0)