@@ -16,15 +16,13 @@ Runnable examples live in [`examples/`](./examples).
1616- [ Secrets with Devbox and Agent Gateway] ( #secrets-with-devbox )
1717
1818<a id =" blueprint-with-build-context " ></a >
19-
2019## Blueprint with Build Context
2120
2221** Use case:** Create a blueprint using the object store to provide docker build context files, then verify files are copied into the image.
2322
2423** Tags:** ` blueprint ` , ` object-store ` , ` build-context ` , ` devbox ` , ` cleanup `
2524
2625### Workflow
27-
2826- Create a temporary directory with sample application files
2927- Upload the directory to object storage as build context
3028- Create a blueprint with a Dockerfile that copies the context files
@@ -33,33 +31,28 @@ Runnable examples live in [`examples/`](./examples).
3331- Shutdown devbox and delete blueprint and storage object
3432
3533### Prerequisites
36-
3734- ` RUNLOOP_API_KEY `
3835
3936### Run
40-
4137``` sh
4238yarn tsn -T examples/blueprint-with-build-context.ts
4339```
4440
4541### Test
46-
4742``` sh
4843yarn test:examples
4944```
5045
5146** Source:** [ ` examples/blueprint-with-build-context.ts ` ] ( ./examples/blueprint-with-build-context.ts )
5247
5348<a id =" devbox-from-blueprint-lifecycle " ></a >
54-
5549## Devbox From Blueprint (Run Command, Shutdown)
5650
5751** Use case:** Create a devbox from a blueprint, run a command, fetch logs, validate output, and cleanly tear everything down.
5852
5953** Tags:** ` devbox ` , ` blueprint ` , ` commands ` , ` logs ` , ` cleanup `
6054
6155### Workflow
62-
6356- Create a blueprint
6457- Fetch blueprint build logs
6558- Create a devbox from the blueprint
@@ -69,33 +62,28 @@ yarn test:examples
6962- Shutdown devbox and delete blueprint
7063
7164### Prerequisites
72-
7365- ` RUNLOOP_API_KEY `
7466
7567### Run
76-
7768``` sh
7869yarn tsn -T examples/devbox-from-blueprint-lifecycle.ts
7970```
8071
8172### Test
82-
8373``` sh
8474yarn test:examples
8575```
8676
8777** Source:** [ ` examples/devbox-from-blueprint-lifecycle.ts ` ] ( ./examples/devbox-from-blueprint-lifecycle.ts )
8878
8979<a id =" devbox-mounts " ></a >
90-
9180## Devbox Mounts (Agent, Code, Object)
9281
9382** Use case:** Launch a devbox that combines an agent mount for Claude Code, a code mount for the Runloop CLI repo, and an object mount for startup files.
9483
9584** Tags:** ` devbox ` , ` mounts ` , ` agent ` , ` code ` , ` object ` , ` claude-code ` , ` agent-gateway ` , ` ttl `
9685
9786### Workflow
98-
9987- Create or reuse an agent by name
10088- Create a secret for an agent and route it through agent gateway
10189- Upload a temporary directory as a storage object with a TTL
@@ -105,34 +93,29 @@ yarn test:examples
10593- Shutdown the devbox and delete the temporary secret and object
10694
10795### Prerequisites
108-
10996- ` RUNLOOP_API_KEY `
11097- ` ANTHROPIC_API_KEY `
11198
11299### Run
113-
114100``` sh
115101ANTHROPIC_API_KEY=sk-ant-xxx yarn tsn -T examples/devbox-mounts.ts
116102```
117103
118104### Test
119-
120105``` sh
121106yarn test:examples
122107```
123108
124109** Source:** [ ` examples/devbox-mounts.ts ` ] ( ./examples/devbox-mounts.ts )
125110
126111<a id =" devbox-snapshots " ></a >
127-
128112## Devbox Snapshots (Suspend, Resume, Restore, Delete)
129113
130114** Use case:** Upload a file to a devbox, preserve it across suspend and resume, create a disk snapshot, restore multiple devboxes from that snapshot, mutate each copy independently, and delete the snapshot when finished.
131115
132116** Tags:** ` devbox ` , ` snapshot ` , ` suspend ` , ` resume ` , ` files ` , ` cleanup `
133117
134118### Workflow
135-
136119- Create a source devbox
137120- Upload a file and mutate it into a shared baseline
138121- Suspend and resume the source devbox
@@ -142,33 +125,28 @@ yarn test:examples
142125- Shutdown the devboxes and delete the snapshot
143126
144127### Prerequisites
145-
146128- ` RUNLOOP_API_KEY `
147129
148130### Run
149-
150131``` sh
151132yarn tsn -T examples/devbox-snapshots.ts
152133```
153134
154135### Test
155-
156136``` sh
157137yarn test:examples
158138```
159139
160140** Source:** [ ` examples/devbox-snapshots.ts ` ] ( ./examples/devbox-snapshots.ts )
161141
162142<a id =" devbox-tunnel " ></a >
163-
164143## Devbox Tunnel (HTTP Server Access)
165144
166145** Use case:** Create a devbox with a tunnel, start an HTTP server, and access the server from the local machine through the tunnel.
167146
168147** Tags:** ` devbox ` , ` tunnel ` , ` networking ` , ` http `
169148
170149### Workflow
171-
172150- Create a devbox with a tunnel
173151- Start an HTTP server inside the devbox
174152- Read the tunnel details from the devbox
@@ -177,33 +155,28 @@ yarn test:examples
177155- Shutdown the devbox
178156
179157### Prerequisites
180-
181158- ` RUNLOOP_API_KEY `
182159
183160### Run
184-
185161``` sh
186162yarn tsn -T examples/devbox-tunnel.ts
187163```
188164
189165### Test
190-
191166``` sh
192167yarn test:examples
193168```
194169
195170** Source:** [ ` examples/devbox-tunnel.ts ` ] ( ./examples/devbox-tunnel.ts )
196171
197172<a id =" mcp-github-tools " ></a >
198-
199173## MCP Hub + Claude Code + GitHub
200174
201175** Use case:** Connect Claude Code running in a devbox to GitHub tools through MCP Hub without exposing raw GitHub credentials to the devbox.
202176
203177** Tags:** ` mcp ` , ` devbox ` , ` github ` , ` commands ` , ` cleanup `
204178
205179### Workflow
206-
207180- Create an MCP config for GitHub
208181- Store GitHub token as a Runloop secret
209182- Launch a devbox with MCP Hub wiring
@@ -212,35 +185,30 @@ yarn test:examples
212185- Shutdown devbox and clean up cloud resources
213186
214187### Prerequisites
215-
216188- ` RUNLOOP_API_KEY `
217189- ` GITHUB_TOKEN (GitHub PAT with repo scope) `
218190- ` ANTHROPIC_API_KEY `
219191
220192### Run
221-
222193``` sh
223194GITHUB_TOKEN=ghp_xxx ANTHROPIC_API_KEY=sk-ant-xxx yarn tsn -T examples/mcp-github-tools.ts
224195```
225196
226197### Test
227-
228198``` sh
229199yarn test:examples
230200```
231201
232202** Source:** [ ` examples/mcp-github-tools.ts ` ] ( ./examples/mcp-github-tools.ts )
233203
234204<a id =" secrets-with-devbox " ></a >
235-
236205## Secrets with Devbox and Agent Gateway
237206
238207** Use case:** Use a normal secret for sensitive app data in the devbox and agent gateway for upstream API credentials that should never be exposed to the agent.
239208
240209** Tags:** ` secrets ` , ` devbox ` , ` agent-gateway ` , ` credentials ` , ` environment-variables ` , ` cleanup `
241210
242211### Workflow
243-
244212- Create a secret for application data that should be available inside the devbox
245213- Create a separate secret for an upstream API credential
246214- Create an agent gateway config for an upstream API
@@ -249,17 +217,14 @@ yarn test:examples
249217- Shutdown the devbox and delete the gateway config and both secrets
250218
251219### Prerequisites
252-
253220- ` RUNLOOP_API_KEY `
254221
255222### Run
256-
257223``` sh
258224yarn tsn -T examples/secrets-with-devbox.ts
259225```
260226
261227### Test
262-
263228``` sh
264229yarn test:examples
265230```
0 commit comments