WEBVTT

00:00.360 --> 00:05.160
And of course, I should have been clear on what I just said as I was, uh, waffling away about the

00:05.160 --> 00:11.960
problem with the agents going going, uh, off track that you can use more intelligent termination conditions

00:11.960 --> 00:17.960
to make sure that this doesn't go awry and that you keep your agent interactions on rails.

00:17.960 --> 00:22.640
Don't just look for a hard coded piece of text in an agent response if you don't want to get yourself

00:22.640 --> 00:24.560
in trouble, right.

00:24.800 --> 00:26.480
Uh, there's an exercise for you.

00:26.480 --> 00:26.840
Okay.

00:26.840 --> 00:32.200
But now, in the meantime, big drum roll MCP is a topic for next week.

00:32.200 --> 00:33.800
But it is, of course, all the rage.

00:33.800 --> 00:38.800
And so I thought I'd give you a teaser, a little a little tiny sense of what it's like to work with

00:38.800 --> 00:43.640
MCP without going into any detail, because I don't want to spoil the show for next time, but let's

00:43.640 --> 00:48.400
just do a quick, quick bit of looking at MCP within Autogen.

00:48.440 --> 00:50.800
Okay, so what is MCP?

00:50.840 --> 00:58.080
Well, again, I don't want to spoil it for next time, but but MCP amongst other things is just a nice,

00:58.120 --> 01:06.620
simple, elegant way that that we can package up tools so that different models can use those tools.

01:06.620 --> 01:09.460
It's like a it's it's not an abstraction layer.

01:09.460 --> 01:11.020
It's not particularly code.

01:11.020 --> 01:13.140
It's just an agreement for a way.

01:13.140 --> 01:19.740
If you write tools in this way, then models LMS can discover them and call them in many ways.

01:19.740 --> 01:25.620
If you think of it like with something like Langshan, there is an ecosystem and Lang Chain built some

01:25.620 --> 01:31.180
code and they built some wrappers that lang chain tools and they say, if you can wrap your stuff in

01:31.180 --> 01:36.980
a Lang chain tool, then anyone else writing lang chain or lang graph will be able to use the tools

01:36.980 --> 01:38.740
that have been packaged this way.

01:39.100 --> 01:43.660
And what anthropic have done with MCP is they've said, well, actually, let's just go simpler than

01:43.660 --> 01:44.060
that.

01:44.260 --> 01:46.420
We don't necessarily need to have this glue code.

01:46.420 --> 01:52.940
We can just say, look, anyone, if you write a function a particular way, that's good enough that

01:52.940 --> 01:59.860
as long as it conforms to a particular kind of spec, then that that can be a tool that we can make

01:59.860 --> 02:01.660
available to any model we want.

02:01.980 --> 02:05.040
So it's very similar to the long chain idea.

02:05.040 --> 02:06.360
It's just more open.

02:06.400 --> 02:10.920
And rather than saying you need to be part of the lang chain lang graph ecosystem, it's just saying,

02:10.960 --> 02:15.840
look, anyone can be part of the MCP ecosystem, anyone can use this.

02:16.200 --> 02:24.360
And anthropic describes MCP as being like the USB-C connector for AI for Llms.

02:24.520 --> 02:33.000
It's just an agreed protocol, an agreed way that we can plug models into tools and also into into what

02:33.000 --> 02:36.960
they call resources, which is stuff like context for RAC.

02:37.320 --> 02:43.280
Um, so if this was just to give you some intuition for it, I didn't mean to explain it because we

02:43.280 --> 02:45.760
will explain it next time next week.

02:46.040 --> 02:52.400
But, uh, one of the things that's great about Autogen is that not only do they give you a nice little,

02:52.600 --> 02:58.280
little wrapper so that you can use any Lang chain tool, but they also give you a nice little wrapper

02:58.280 --> 03:01.160
so you can use any MCP tool.

03:01.200 --> 03:07.420
So if there's an MCP tool out there you can just use it in Autogen really, really easily and that is

03:07.420 --> 03:08.980
what we're going to do right now.

03:09.220 --> 03:11.740
And so let me take you through this.

03:11.740 --> 03:13.780
This is the whole extent of the code.

03:14.060 --> 03:17.340
Uh, we are using the assistant agent.

03:17.340 --> 03:20.300
We're using the OpenAI chat completion client.

03:20.780 --> 03:28.780
And from Autogen tools, we're bringing in this class here.

03:29.020 --> 03:32.580
There are two different types of ways of working with MCP.

03:32.580 --> 03:33.700
And this is one of them.

03:33.980 --> 03:37.220
Uh, and we will talk about those next week, of course.

03:37.580 --> 03:45.380
And in particular, uh, we are going to be using a tool called MCP fetch.

03:46.060 --> 03:51.060
And what this, this this is going to be running locally on our computers.

03:51.060 --> 03:55.180
So we're going to kick off this tool to run locally on our computers.

03:55.220 --> 04:01.780
And because it's been written a certain way, that tool is just a tool we can use from Autogen.

04:02.060 --> 04:07.970
So the key to MCP is that different people can write tools and as long as they write them a certain

04:07.970 --> 04:10.290
way, you can just use them out of the box.

04:10.370 --> 04:14.130
It's a bit like saying people could like, write a long chain tool and you can just use it out of the

04:14.170 --> 04:14.530
box.

04:14.530 --> 04:20.090
But MCP is just more open, available to any ecosystem, not just the long chain ecosystem.

04:20.210 --> 04:26.250
So MCP server fetch is an example of a tool that is open source and available, and that you can just

04:26.250 --> 04:28.610
download and run it yourself.

04:28.610 --> 04:30.530
And that is what this thing here does.

04:30.530 --> 04:37.930
It runs it locally, and it is a tool which actually runs the playwright browser in a headless mode

04:37.930 --> 04:40.450
and allows it to go and fetch web pages.

04:40.450 --> 04:46.250
So it's doing something a bit similar to what we worked on with sidekick last week, but it's just doing

04:46.250 --> 04:50.890
it not not in a way that brings up the browser, but just does it quietly behind the scenes, headless

04:50.890 --> 04:51.690
as they call it.

04:51.690 --> 05:00.010
And it will run that and then it will, it will, uh, get those tools and it will put those tools into

05:00.010 --> 05:01.770
this thing called fetcher.

05:01.890 --> 05:06.250
And we can just provide fetcher in as our tools.

05:06.370 --> 05:09.790
That's it's, just as simple as that.

05:09.830 --> 05:18.670
And so, uh, yeah, basically what we're doing here is that we're using a public online tool available

05:18.870 --> 05:23.750
that runs Playwright Browser locally and uses that to scrape the web.

05:24.070 --> 05:27.710
And we're making that tool available to our assistant.

05:27.990 --> 05:33.710
And what we're going to ask our assistant to do is review the website epodunk.com.

05:33.710 --> 05:39.150
But you can change that to any website that you want and summarize what you learn and reply in markdown.

05:39.350 --> 05:42.190
So without further ado, let's kick this off.

05:43.110 --> 05:45.550
And again, the takeaway for you is just to show.

05:45.870 --> 05:46.470
And there we go.

05:46.510 --> 05:47.070
There I am.

05:47.070 --> 05:47.950
Look at that.

05:47.990 --> 05:51.790
A technology enthusiast with a focus on coding and experimenting with llms.

05:51.830 --> 05:52.750
Sounds about right.

05:53.110 --> 05:54.190
Uh uh.

05:54.590 --> 05:55.990
And oh look, it's got a link.

05:55.990 --> 05:58.790
I wonder if that's an actual link to my LinkedIn profile.

05:58.790 --> 06:00.190
It almost certainly is.

06:00.510 --> 06:06.350
Uh, these these, uh, things are amazing at it's replied in markdown, and I'm sure it's got the right,

06:06.390 --> 06:07.270
the right links.

06:07.510 --> 06:12.090
Uh, so, um, the, the this is cool.

06:12.090 --> 06:19.170
And the reason it's cool is that we've just used a tool that someone else has written for, for running

06:19.170 --> 06:21.210
playwrights in a headless way.

06:21.570 --> 06:28.010
And we have just incorporated that tool because that tool uses this, this open standard, this standard

06:28.050 --> 06:28.810
called MCP.

06:29.090 --> 06:33.090
We're able to just drop that tool in and use it from within Autogen.

06:33.090 --> 06:38.570
So just like we could use a Lang chain tool from within Autogen, we can use an MCP tool.

06:38.610 --> 06:42.890
Anyone that's written a tool that conforms to the MCP standard.

06:42.930 --> 06:48.130
And the cool thing about MCP is that it's such an open standard that anyone can write tools, and there

06:48.130 --> 06:51.650
are websites where you can get access to lots and lots of these tools.

06:51.650 --> 06:56.970
So it's like saying, we've got access to the Lang chain ecosystem only it's a whole lot more.

06:57.130 --> 07:02.850
It's this massive open source, public community ecosystem of tools.

07:03.090 --> 07:09.810
Anyone that writes tools that conforms to the MCP standard, you can then access just like this, and

07:09.810 --> 07:16.670
you can do it from within autogen in this way and immediately have access to any of them.

07:17.190 --> 07:19.470
So it's only meant to be a teaser.

07:19.470 --> 07:22.270
I wanted to show you how you can use MCP tools.

07:22.270 --> 07:24.230
Don't worry if you don't really understand.

07:24.270 --> 07:30.110
Just get an idea and we'll we'll go through MCP and then you can come back once you fully understand

07:30.110 --> 07:35.350
it and use lots and lots of MCP tools right here from Autogen.

07:35.790 --> 07:36.990
And so there we have it.

07:37.030 --> 07:38.110
We went multimodal.

07:38.110 --> 07:39.950
We looked at structured outputs.

07:40.070 --> 07:42.190
We used tools from Lang Chain.

07:42.270 --> 07:45.710
We saw briefly teams the round robin teams.

07:45.710 --> 07:47.830
And you can experiment with more should you wish.

07:48.190 --> 07:52.550
And then we introduced a special guest in the form of MCP tools.

07:52.710 --> 07:56.590
Your teaser your preview that we will come back to shortly.

07:56.790 --> 08:00.270
And that wraps up day two of Autogen.

08:00.270 --> 08:05.790
And it is the, the probably the our last deeper foray into Autogen agent chat.

08:05.830 --> 08:11.550
Next time we switch to Autogen core, the underlying infrastructure part.

08:11.710 --> 08:12.590
I'll see you then.
