Pratique du Shadowing: Running AI Agents in Secure Sandboxes with E2B & Docker MCP | Docker’s AI Guide to the Galaxy - Apprendre l'anglais à l'oral avec la vidéo

Création de la leçon...
1
Hi there, welcome to the next episode of AI Guide to the Galaxy.
2
My name is Olek and I work with the DevRel team at Docker.
3
Today we are in the real actual studio.
4
We are here at the Docker Captain Summit in Istanbul.
5
And it is my honor to introduce my next guest, who is a Docker captain, Jonas from E2B.
6
Hi, how are you doing?
7
Good, thank you.
8
It's great to be here.
9
It's been two days of very productive conversations about Docker, Docker products, roadmaps
10
and we're taking this chance to record this video face -to -face.
11
We'll see how it goes.
12
Leave it a comment if you think this is a great idea and we should do it more often.
13
So, recently, E2B and Docker announced this partnership.
14
And, well, our viewers mostly are familiar with Docker and Docker products.
15
So maybe, can you tell me a little bit about what E2B is and what do you offer?
16
So, E2B is an open -source infrastructure for AI sandboxes.
17
So if you want to run agents
18
that need access to like a full operating system and you want to do that securely and sandbox and isolate it, that's what E2B is for.
19
Right.
20
Sandboxes are a very hot topic nowadays.
21
Everyone is doing them from Cloudflare to all the coding assistant
22
shipping some sort of guardrails in form of seed belt or mangos and stuff like that.
23
So E2B, is E2B like a local sandbox, or is it the cloud machines?
24
It's cloud -based, and it's full virtual machines.
25
So the agent can get full access to a full Linux VM, and it's all in the cloud.
26
So you can also scale up like thousands of sandboxes in front of there.
27
That is awesome.
28
I can imagine the effort that went into creating the infrastructure of that.
29
Definitely not easy.
30
This is very, very cool.
31
So ETV provides the sandboxes and, well, Docker has a number of initiatives.
32
Most notably for this partnership was the MCP catalog,
33
the trusted catalog of MCP servers that you can plug and use from your AI assistants.
34
And maybe the supplementing technologies like MCP toolkit and the MCP gateway.
35
So can you maybe explain the partnership and what the integration is in a few words?
36
Yeah.
37
So with a partnership, Docker has this amazing catalog of like pre -configured MCP servers with like all the configuration you need.
38
And with the partnership, we bring the MCP servers that are already trusted and in the catalog to E2B sandboxes.
39
So when you run an agent in a sandbox, the agent has like automatic access to all of those 200 MCP servers.
40
Right.
41
Awesome.
42
When you say when you run a sandbox, what does it mean?
43
Can you maybe show an example?
44
How do I, as a developer or as a person running my agent, how do you create the sandboxes?
45
What's the experience look like?
46
So usually you would create a sandbox through an SDK that's either JavaScript or Python.
47
And then when you create a sandbox, which is just sandbox .create here, you can configure a few different MCP servers.
48
So here, this is fully typed.
49
You could, for example, do EXA, which is a search engine kind of, And then also the configuration is typed and you can provide,
50
for example, the API key for that.
51
Right.
52
So Docker has this catalog of MCP servers,
53
right, which are technically just Docker images with software that is an MCP server running inside them.
54
And there is a, like, surrounded technology, which is in case of headless machines is the MCP gateway Docker image
55
that acts as a configuration entry point in the proxy.
56
to the MCP servers.
57
So when I provide this configuration, so this is the API to create sandboxes with E2B.
58
When I provide this configuration, the library, the E2B library will spin up the gateway within the sandbox.
59
Yes, that is correct.
60
Is it like completely within the sandbox or is it an external...?
61
Yeah, the gateway runs completely in the sandbox, so isolated in that.
62
And then the MCP servers also run in the same sandbox.
63
Okay.
64
And the gateway is also accessible to the outside if you want, like authenticated, of course.
65
So if you have an agent running locally, it could use the isolated MCP servers in a sandbox as well.
66
Right.
67
Okadoke.
68
So let's look at this.
69
Walk me through this example more.
70
So we configure in sandbox and we create this.
71
So that will send the commands to the cloud ETB premises
72
and give me a virtual machine and the connection to
73
that right yeah and this because we configured mcp this will also automatically start the gateway
74
and like pre -pull the docker images for example for those mcp servers this is very interesting actually
75
so the docker catalog is just a number of um mcp catalog sorry those are docker images
76
and then uh they don't have any particular configuration externally
77
because it's the catalog resides and is sort of managed by the toolkit
78
or the mcp gateway uh
79
which well you configure them either from the user experiences like form
80
or using environment properties
81
and docker secrets uh in the in the in the catalog for in the gateway form like
82
when you just turn on containers uh how do you get the api like
83
that did you create it manually or uh so we take the catalog
84
which is like a huge yml file and then auto generate the types of
85
that and then in the background we map it back to the catalog
86
so what actually gets used in the end is the catalog right
87
but the catalog is quite complex
88
and like in docker desktop it's also mapped to like a nicer ui
89
and here we just map it to a different oh
90
that is awesome so but it's a one -to -one mapping in the end right
91
so like you get the api for both javascript and python uh
92
sort of for the price of one yeah yeah
93
so we just take the catalog and then auto generate everything
94
that is awesome okay and i can see you put entropic api key
95
so we're gonna use cloud yes
96
so here we just run cloud like the actual cloud code inside the sandbox
97
and we add the mcp gateway here the first command so
98
when you do sandbox .command .run this actually runs like a command in the sandbox
99
sort of like docker exec yeah but in the for the sandbox okay um
100
and then we can start i need to wrap here um we then start cloud with the task here
101
and the yolo mode because we're in a sandbox and we don't really, yes.
102
It cannot mess up our machine.
103
And in this case, we have a very simple use case where we just search for interesting research papers
104
and then summarize it and turn it into, like, a wide -coded summary in, like, an HTML page.
105
And then, because, again, we're in the sandbox, we can really do stuff we wouldn't do on our laptop.
106
We can expose it as an HTTP server here and, like, host a website.
107
I can run that.
108
so i hope that actually works
109
so this will probably take however long cloud decides to do its research right okay
110
so it created the mcp gateway yes and it prints the url for us
111
so yes so so for example
112
if you have cloud desktop running you could also connect your
113
cloud desktop to the a remote sandbox with the gateway running inside of it.
114
Right, right.
115
I will need to provide the authorization token, but like I can create, come on, connect to that from external things.
116
Okay, so now what is happening?
117
So now Claude is processing our request and we configured the MCP gateway.
118
So it has access to tools from the servers that we configured, which is the Archive and...
119
Archive and DuckDuckGo.
120
DuckDuckGo just to have a sad engine really right
121
and then it will use those servers
122
and generate on us some information in the index hml page
123
and then we can access that
124
because we spin up um yeah interactively a python server yeah and that's of course something you would not really
125
usually want to do this is the demo purposes uh demo so uh you would probably make it
126
make your clod write it to the database
127
and then you access it securely or put the files into your s3 bucket
128
or anywhere else okay this takes a little bit of time uh can you tell me
129
so here you have clod within the sandbox yes do you package clod by default
130
or is it something that uh just accidentally works here yeah uh
131
so when you create so sandboxes are created from templates
132
and templates are really like the root file system of a of the virtual machine
133
so you can create a new template
134
and then install whatever you want in there
135
so this is example code of how you create a template you can start from the mcp template
136
which already has the gateway installed
137
and a few tools like npm python is already installed in there and then you can extend it however you want.
138
So we have, for example, apt install.
139
So if there's, for example, if you want to install curl, you would just add curl here.
140
Or if you want to do, if you want to clone a certain repository, you could do that here as well.
141
And this is a template which is not the actual instance of the sandbox, but this is the file system.
142
Yes sort of projection yes so it will be used yeah we're starting the sandbox
143
and each template has a name and then
144
when you create the actual sandbox you just reference that name
145
and it's based on that so in this example everything would have curl installed
146
or if you do the right so in sort of
147
an analog in the docker universe terms this would be like
148
sort of building a docker image yes except specifying the entry point
149
because the sandbox entry point is probably controlled by correct yeah okay
150
and there's also start commands which is kind of like an entry point
151
so if you have a service
152
that you want to start automatically you can also do
153
that okay but this is very similar to docker image
154
and we even have support to use docker images as templates oh you can create an etb .docker file usually
155
and then this is converted to a template as well do you like the the api
156
or docker files more for creating templates the api
157
because it's better for like programmatic access So if you have a use case where you provide coding agents for your users,
158
for example, programmatic is usually the better way.
159
Yeah, I agree.
160
I agree.
161
I have experience with test containers.
162
So it's a very similar story there, which it's an open source library,
163
and they expose programmatic API to configure and manage containers within Docker context.
164
So I can totally see the appeal of running the API.
165
Right, so we have the results from Claude.
166
So you can see it found an interesting paper, Foundations of Large Language Models.
167
Okay.
168
And then also did some research about the authors.
169
And then hopefully if it worked, published it at this URL.
170
I think it says sandbox closed successfully.
171
Yeah, okay.
172
We were too slow.
173
The sandbox had a lifetime of five minutes and we talked too long.
174
So it's already gone.
175
uh but i can run it again
176
if you want no you don't have let's let's run let
177
okay let's show it we're gonna edit it in post yeah uh no uh
178
so i believe you
179
that it works i actually have seen it work i've built
180
a couple of examples uh i've mostly tried python myself to figure out pieces
181
which you know because you help me debug issues there but
182
so i i know that it works
183
and i know you can expose those uh sandboxes uh over the internet
184
if you want to like interactively sort of look uh for the demos
185
so you said you're not really you won't do this um during the normal
186
like usage of sandboxes um well like
187
if you can share some details like what is the common patterns how people use EGB sandboxes.
188
Is it common to package AI systems within the sandbox
189
and run it as a sort of isolated cloud machine for the unit of computation
190
or do people connect from external AI systems?
191
What do you see happening and also what do you personally think is a more interesting way going forward?
192
So I think one of the most common use cases is like the true coding agents
193
that you want to run completely in the background
194
so for example if you have like if you've seen cursor backbot which like
195
partially runs code or like rabbit which like um does pull request reviews
196
and like fixes code already um then usually like the agents run actually completely in the sandbox
197
just to have it fully isolated and
198
but of course there's also benefits to do it like partially in the sandbox partially outside
199
because um well it's it's a bit easier to orchestrate probably
200
if you run partially outside um
201
and i didn't quite understand what you meant with the no interesting so
202
if you look at the home page for etb yeah uh
203
well it's like there is a lot of examples uh here for technologies
204
that you can connect if you scroll a little bit down right
205
so we have uh there were some here for example right
206
and i understand that those could be synthetic examples but
207
if you click on the open ai for example right
208
so here the
209
which i assume is a classic example you run open ai externally in your in your python code
210
and then you connect it to sandbox just to run the code oh yeah
211
that is a very common use case as well for example
212
a lot of the chat applications have some way of running code right like
213
if you give it a csv file you like figure out
214
how many columns i have in there they write python code
215
and then actually run the python code
216
and then of course only like the actual code execution is in the sandbox right
217
and very short -lived usually and this is like a major use case Um, and you can, yeah, I, yeah.
218
Right.
219
So what I hear is there is no particular preference, uh, from the sort of, uh, user point of view, like if they want to connect external clients, it's absolutely fine.
220
If they want to put it into the sandboxes and have it to run that more like independent, longer, uh, end -to -end processes, that is also all good
221
and fine i think it also depends on who what do you want to isolate
222
and what do you want to like protect against
223
because in the end like the sandboxes provide a lot of
224
isolation right yeah this is very very cool i'm very very
225
happy uh with the was was how this partnership turned out it's really easy to configure the mcp servers um
226
so i know that docker uh mcp toolkit recently added uh the remote server abilities
227
so like if you can connect to for example notion uh server
228
and from idea token uh but the notion server is not run locally in the container
229
but it just connects to notion api uh would
230
that work with this uh with the integration like this as well
231
that is already supported
232
so you can already for example notion is a remote one uh you can connect it like this
233
but for now mostly pre -configured ones so those that are actually in the catalog you can use
234
right okay okay we can also now see the actual demo
235
result okay it's just real oh no we went too fast
236
you probably need to increase the time out somewhere in the code just say it say
237
that like run it like for 10 minutes or something yeah right okay
238
so you can do remote uh a lot of mcp servers
239
uh are created i know with the sort of idea
240
that their end users will be uh will be individual uh individuals who is their particular data access rights
241
and there's this whole OAuth integration story for mcp servers uh how does
242
that work or i assume there is not it's not important for programmatically created tasks um yeah
243
so how does it
244
so right now oauth doesn't work in the mcp gateway with
245
e2b right i think docker has already some auth support for like two
246
or three mcp servers as far as i know like a very little subset um
247
but i do see that oauth is
248
very important
249
and then we will have to figure it out how also
250
it fits into like the programmatic access use case yeah yeah
251
and i don't think we can ignore it just
252
because it's like a programmatic use case um
253
because in the end this is like user data and the user needs to give access to that
254
um for now it's just api keys yes so like in the docker toolkit there are some servers like for For example,
255
Github that you can configure with OAuth, right?
256
You can also configure it with the usual token, which is much, much simpler and maybe offers you more control for the integrations, because in the OAuth case,
257
you really need to have a user in the loop and they need to review the OAuth consent screen and like,
258
it makes no sense to show a consent screen if there is no end user present in the loop.
259
You might as well go with the token
260
and then the predefined rights uh
261
so i see i like i honestly assume allows is not
262
the most important feature for for the programmatic use cases like this um
263
but specifically with remote servers most of them have some sort of allows i just realized
264
that we have a sandbox skill in the demo so it would never work um
265
the fourth trial see this is an example how easy you can change your code
266
that runs this integration and how convenient it is to work with e2b sandboxes that actually
267
if you think about it it's quite a sophisticated piece of
268
turtles all the way down we run some javascript code
269
and it creates a virtual machine and then inside
270
that virtual machine it runs docker engine i assume
271
because it needs to run containers and it runs a container for mcp gateway
272
and it needs to run the containers for individual mcp servers uh and all of that surprisingly works
273
and at the same time surprisingly fast no it's actually pretty
274
fast spinning up a container is fast i assume you have
275
a lot of effort put into optimizing the startup for the sandboxes uh specifically
276
because you mentioned the short -lived uh interactions with them as well um
277
so this is all glorious
278
and nice um uh are there any plans to work on
279
other uh programming languages to support uh in the api
280
or is javascript and python sort of the largest chunk of the ecosystem
281
that you are aiming at currently i i'm this is not
282
really my field like i i don't really work on the sdks but
283
in ai right now i think javascript
284
and python probably make up 99 of all use cases i would love to see go personally
285
and i know that some customers actually build their own sdks for
286
that yeah you have the sort of a rest api
287
or something yeah you can you can use the api
288
and yeah yeah the sdk is open source
289
so you can also just like reverse engineer the sdk it's except for like the template template system it's not
290
that complicated yeah
291
so it would be fairly easy to for the basic operations
292
like creating a sandbox you could just use the api this
293
is an exercise for the curious watcher dropped the script from
294
the javascript sdk also the entire um project is open source yeah
295
so there's also like the open api specs for example right
296
can i can i run the backend myself on my premises
297
or yes you can it's it's not super easy to save for us because it's quite a lot of
298
stuff involved to make it work um so it's not like a docker run and then
299
i i think it's just the log file now oh yes okay um
300
so we've got our vibe coded landing page here well
301
that is quite awesome so you get the summary
302
and you get the information about the authors and
303
so the information about the authors what what the what was that was using the
304
search engine yeah this is awesome this is very easy to
305
use you can you can all i can ultimate those tasks i can put them in github actions
306
and the only and the only thing
307
that i need to configure to get access to the sandbox
308
i just need the etb api key correct yeah uh
309
and they will npm library or like a python library yeah okay this is awesome uh
310
what is your favorite mcp server oh the catalog because you said
311
that you're sort of parse the situation uh
312
or what's your least favorite okay what is what is one
313
that you hit with the most passion okay i need i need to think for
314
that i think my most favorite one
315
is probably dr go because it doesn't need an api key
316
and i used it so much for testing okay um so
317
and it always works like i never had a case where
318
i mean it's a very simple mcp server there's one tool
319
but it does its job
320
so i love it perfect for testing yeah it's it's it's a perfect
321
and i've probably used it like a thousand times in the
322
last week the one i hate the most you don't have
323
to answer we don't have to go on camera with this you can just tell me
324
that it's at last and later oh actually it's it's probably the ones
325
that need the most configuration yeah where there could be same defaults like i don't have a specific one
326
but sometimes it's like you need 20 different fields you need to configure
327
but you actually only need two
328
and i think that's a pain yes yes i think so
329
which is actually frankly that is the case i think with the atlassian mcp server
330
that we have in the catalog
331
because you need to have the key for maybe confluence
332
and then jira and some urls for both of them
333
and some additional configuration uh it's not
334
so easy from the lick uh it's probably very convenient
335
when you need to use it in anger in real life but like
336
if you need to create a demo yeah uh you will you kind of stumble on this uh
337
which is a minor use case it's not it's not actually like an actual complaint uh
338
and sorry the docker hub mcp server i'm not just saying
339
that because i'm a docker captain
340
but i've used it a lot um to find documentation about other docker images right it's really good
341
because you get the like true source of the documentation
342
and not if use web search like you get a lot of wrong information and on dock hub it's usually right
343
so yeah docker hub could be the source of information right very very good uh
344
so how do people get started with e2b
345
and maybe docker mcp catalog on e2b sandboxes
346
and where can they maybe meet the community
347
and ask questions to how to use this integration where do they go
348
so if you want to get started with E2B in general, there's a very generous free tier.
349
And if you want to try out MCP, there's a quick start guide with TypeScript and Python symbols that you can run just like that.
350
And we also have a lot of examples in our cookbook.
351
So for example, if you want to run cloud code or research agents or browser base for like web automation,
352
like we have a lot of examples for that right and
353
if you have questions there's a e2b discord
354
that you can join i think that should also be referenced somewhere somewhere on the e2b page
355
i'm sure it's uh somewhere there we're gonna find it
356
and we're gonna put the links into description of the videos
357
so header uh no thank you so much for joining us
358
and explaining how it looks and what is it to be
359
and how to use the sandboxes it was a pleasure stay tuned for the next episodes
360
and please check out the etub and docker partnership
361
and what you can do build uh running your agent securely in isolated sandboxes,
362
um, with enabled by default YOLO mode, which is fun thing to say.
363
Thank you so much.
364
See you there.

Vocabulaire et conseils d’expression pour cette leçon

Cette leçon d’expression orale de niveau C1 s’appuie sur la vidéo « Running AI Agents in Secure Sandboxes with E2B & Docker MCP ». Les mots qui reviennent le plus souvent : docker, mcp, sandbox, server, example. Cette vidéo contient 364 phrases et 4291 mots à répéter en shadowing. La partie parlée dure 25:17. Le locuteur parle à un rythme naturel d’environ 170 mots par minute, proche d’une conversation courante. Seuls 79 % des mots font partie des 3 000 mots les plus courants en anglais, le vocabulaire est donc exigeant.

Vocabulaire clé de cette vidéo

Les 15 mots les plus avancés de la vidéo, avec leur prononciation et leur sens :

MotPrononciationSens
sandbox nom/ˈsæn(d).bɑks/bac à sable, carré de sable
catalogue nom/ˈkæt.əˌlɔɡ/catalogue
configure verbe/kənˈfɪɡə(ɹ)/configurer
template nom/ˈtɛm.plɪt/gabarit, calibre
configuration nom/kənˌfɪɡ.əˈɹeɪ̯.ʃən/configuration
container nom/kənˈteɪ.nəɹ/récipient, contenant
isolate verbe/ˈaɪ.sə.leɪt/isoler, esseuler
demo nom/ˈdɛm.oʊ/démo, démonstration
toolkit nom/ˈtulˌkɪt/toolkit
token nom/ˈtoʊkən/symbole
clod nom/klɑd/motte
securely adverbe/səˈkjʊɹ.li/en sécurité, solidement
curl nom/kɜɹl/boucle
expose verbe/ɪkˈspoʊz/exposer, dénoncer
authorization nom/ˌɔːθəɹaɪˈzeɪʃən/autorisation

Les verbes à particule que vous entendrez

MotSens
figure out verbecerner
check out verbemater, regarder
mess up verbegâcher
try out verbeessayer, expérimenter
turn out verbese finir, se terminer

Des phrases à répéter

Des phrases courtes et complètes de la vidéo, à réutiliser dans la conversation de tous les jours :

  • Hi, how are you doing?
  • We'll see how it goes.
  • When you say when you run a sandbox, what does it mean?
  • Can you maybe show an example?
  • What's the experience look like?

La grammaire de cette vidéo

Les structures que le locuteur utilise le plus, avec les mots exacts de la vidéo :

StructureDans la vidéo
Voix passive be + participe passé — l’accent est mis sur ce qui arrive, pas sur qui le faitare already trusted · is typed · are created
Propositions relatives who / which + proposition — une précision sur une personne ou une chosesandbox, which is · EXA, which is · right, which are
Present perfect have/has + participe passé — une action passée qui compte encore maintenanthave let · have seen · you've seen

Prononciation à surveiller

Le locuteur utilise 39 contractions et formes réduites, comme don't, we're, I'm. Prononcez-les sous leur forme courte, telles que vous les entendez.

  • Les sons « th »: authorization /ˌɔːθəɹaɪˈzeɪʃən/, authenticate /ɔˈθɛn.tɪ.keɪt/, synthetic /sɪnˈθɛtɪk/
  • Les sons « sh » et « zh »: configuration /kənˌfɪɡ.əˈɹeɪ̯.ʃən/, authorization /ˌɔːθəɹaɪˈzeɪʃən/, documentation /ˌdɑkjəmɛnˈteɪʃən/, computation /ˌkɑmpjʊˈteɪʃn̩/, projection /pɹəˈd͡ʒɛkʃən/
  • Mots longs — placez bien l’accent: configuration /kənˌfɪɡ.əˈɹeɪ̯.ʃən/, programmatic /ˌpɹəʊ.ɡɹəˈmæt.ɪk/, authorization /ˌɔːθəɹaɪˈzeɪʃən/, automobile /ˈɔː.tə.məˌbil/, documentation /ˌdɑkjəmɛnˈteɪʃən/

Les sons difficiles pour les francophones :

  • /h/ — il se souffle, il n’est pas muet: headless /ˈhɛdləs/, header /ˈhɛdɚ/
  • /tʃ/ et /dʒ/ — à ne pas adoucir en « ch » et « j »: entropic [ɛnˈt͡ʃʰɹɑːpɪk], watcher /ˈwɑ.t͡ʃɚ/, chunk /t͡ʃʌŋk/, projection /pɹəˈd͡ʒɛkʃən/
  • /r/ anglais — langue recourbée, sans frotter la gorge: configure /kənˈfɪɡə(ɹ)/, configuration /kənˌfɪɡ.əˈɹeɪ̯.ʃən/, container /kənˈteɪ.nəɹ/, programmatic /ˌpɹəʊ.ɡɹəˈmæt.ɪk/, securely /səˈkjʊɹ.li/

Comment s’entraîner avec cette vidéo

  1. Écoutez la vidéo en entier une fois sans parler et notez les mots que vous ne connaissez pas.
  2. Commencez à la vitesse 0,75×, répétez phrase par phrase, puis revenez à la vitesse normale quand cela devient facile.
  3. Enregistrez-vous et comparez avec l’original, en faisant attention à des mots comme sandbox, catalogue, configure.

Qu'est-ce que la technique du Shadowing ?

Le Shadowing est une technique d'apprentissage des langues fondée sur la science, développée à l'origine pour la formation des interprètes professionnels. Le principe est simple mais puissant : vous écoutez de l'anglais natif et le répétez immédiatement à voix haute — comme une ombre suivant le locuteur avec un décalage de 1 à 2 secondes. Les recherches montrent une amélioration significative de la précision de la prononciation, de l'intonation, du rythme, des liaisons, de la compréhension orale et de la fluidité.

Technique du shadowing : lire le guide complet étape par étape →