WEBVTT

00:00:00.080 --> 00:00:03.449
AI agents can be super useful with GitHub
Copilot.

00:00:03.460 --> 00:00:07.050
It's the most powerful mode it offers
and it's the mode you'll

00:00:07.080 --> 00:00:11.020
probably use the most
when working with this chat feature.

00:00:11.080 --> 00:00:15.030
Now, I already mentioned
that you can configure which tools

00:00:15.040 --> 00:00:18.400
And here, for the agent mode, for example,
you see it has all the

00:00:18.440 --> 00:00:21.860
tools. And I'll get back to MCP
and extension tools,

00:00:22.640 --> 00:00:25.540
but there are also other things you can do
and

00:00:25.640 --> 00:00:29.060
configure. For example,
you get this Settings button

00:00:29.140 --> 00:00:32.980
here. If you click it,
you can configure your custom

00:00:33.080 --> 00:00:37.060
agents.
So you could build your custom agents,

00:00:37.120 --> 00:00:40.260
You can choose a location where it should
be stored locally or

00:00:40.400 --> 00:00:43.080
globally. Here, I'll choose locally.

00:00:43.100 --> 00:00:46.550
Name it Research, maybe, and then you can

00:00:46.840 --> 00:00:50.220
define what this agent should do.
So you would give it a

00:00:50.260 --> 00:00:53.600
description. So for example here,
I could say that I wanna build a research

00:00:53.640 --> 00:00:57.560
assistant agent that explores docks
and finds relevant information, and

00:00:57.600 --> 00:00:59.260
then add a meaningful description here.

00:00:59.269 --> 00:01:03.220
And this is, in the end, a prompt
that will be fed to the AI

00:01:03.460 --> 00:01:07.179
so that it does its task.
So this should be treated as a

00:01:07.220 --> 00:01:10.540
prompt here, and you can control
which tools are available to this

00:01:10.600 --> 00:01:14.390
agent. And for example here,
you can click Configure Tools and then

00:01:14.420 --> 00:01:17.780
say that this agent should be able to,
let's say, read files to

00:01:17.820 --> 00:01:21.760
understand the code base.
It should be able to search through my

00:01:21.780 --> 00:01:25.320
code base to gather all the relevant
knowledge, and it should

00:01:25.360 --> 00:01:27.650
definitely have web search available.

00:01:27.650 --> 00:01:29.980
And in my case, I'll also give it this

00:01:30.020 --> 00:01:33.850
context7-mcp-server, which is a tool
that helps with finding

00:01:33.860 --> 00:01:37.700
relevant documentation. Again,
I'll get back to MCP later.

00:01:37.710 --> 00:01:41.590
And now, I could submit this with OK,
save this file, and

00:01:41.620 --> 00:01:45.230
now we have this new research agent here,
which we can use.

00:01:45.240 --> 00:01:48.940
We can now use that to explore how does

00:01:49.000 --> 00:01:52.890
the Faker library work? It sees that

00:01:52.920 --> 00:01:56.860
we're using this because it can read my
files and search my files, and it can

00:01:56.880 --> 00:02:00.220
perform web search. So
if I use this research

00:02:00.300 --> 00:02:03.450
agent, it now can go ahead and,
for example, use this

00:02:03.480 --> 00:02:07.240
context7-mcp-server to gather the relevant
information.

00:02:07.250 --> 00:02:10.919
And here,
we see another example for it asking for

00:02:10.960 --> 00:02:14.640
though I allowed it to use this server,
it does

00:02:14.700 --> 00:02:18.440
allow for the individual things it wants
to do with that MCP server.

00:02:18.480 --> 00:02:21.660
So for example here,
that it looks for documentation.

00:02:21.680 --> 00:02:25.460
And this is a safety mechanism you'll see
a lot to make sure

00:02:25.540 --> 00:02:29.430
that these agents don't start destroying
your code base or

00:02:29.460 --> 00:02:32.910
your overall computer. So here,
it does more and more research.

00:02:32.920 --> 00:02:36.280
And since I don't wanna click Allow
manually all the time, I'll allow it

00:02:36.320 --> 00:02:40.300
entirely in this workspace.
I could also allow

00:02:40.400 --> 00:02:44.300
all tools in general from this MCP in this
session or workspace,

00:02:44.360 --> 00:02:48.160
and I'll actually do that.
So you have fine-grained permission

00:02:48.180 --> 00:02:52.100
And with that,
I get some results here

00:02:52.140 --> 00:02:55.380
the official documentation
and should therefore be of high quality.

00:02:55.390 --> 00:02:58.940
And now we could continue to chat here,
switch to a different agent and

00:02:59.000 --> 00:03:02.760
say, "Evaluate the code and

00:03:02.840 --> 00:03:05.720
see if it's in line with the

00:03:05.840 --> 00:03:09.720
official Faker best practices as

00:03:09.760 --> 00:03:13.520
per their docs." Something like this.

00:03:14.500 --> 00:03:18.120
And we could do this in ask mode actually
since we wanna get an

00:03:18.180 --> 00:03:20.640
evaluation and not necessarily change
something.

00:03:20.660 --> 00:03:24.460
And that is how you can build custom
agents and have different

00:03:24.520 --> 00:03:28.120
agents work together. Here, for example,
it sees one

00:03:28.220 --> 00:03:32.120
potential improvement,
and therefore I could switch to

00:03:32.200 --> 00:03:36.000
agent mode and say, "Fix that issue you

00:03:36.010 --> 00:03:39.340
identified." Or actually it's multiple,

00:03:39.400 --> 00:03:43.310
so I guess it's these issues. And now,
since it's agent mode, it

00:03:43.380 --> 00:03:46.360
can edit the file
and you see where I'm going.

00:03:46.380 --> 00:03:50.060
This is how you can work with these AI
agents, build custom agents and

00:03:50.100 --> 00:03:54.020
combine multiple agents to do tasks
and write

00:03:54.080 --> 00:03:55.540
code.
