WEBVTT

00:00.900 --> 00:02.160
-: Hey there. Eden here.

00:02.160 --> 00:04.350
And before we dive to LangGraph,

00:04.350 --> 00:07.775
I wanted to cover two important theoretical concept

00:07.775 --> 00:11.220
and terminologies we're going to be using constantly

00:11.220 --> 00:12.420
in this course.

00:12.420 --> 00:16.140
The first one is going to be graph, the data structure,

00:16.140 --> 00:18.963
and the other is going to be state machine.

00:23.310 --> 00:24.856
A graph is a mathematical object

00:24.856 --> 00:28.290
that helps us represent relationships.

00:28.290 --> 00:32.190
It consists of nodes, also known as vertices and edges

00:32.190 --> 00:34.023
that connect those nodes.

00:35.130 --> 00:38.100
Graph data structures are incredibly versatile

00:38.100 --> 00:40.623
and they can be used in a wide range of applications

00:40.623 --> 00:42.750
across different fields.

00:42.750 --> 00:46.050
We can use graphs to describe social networks,

00:46.050 --> 00:49.500
transportation maps between cities and roads

00:49.500 --> 00:51.420
and routes between cities.

00:51.420 --> 00:54.270
And what's cool about it is that in computer science

00:54.270 --> 00:57.300
there is a lot of research on this data structures

00:57.300 --> 01:00.359
and a lot of algorithms and property extraction

01:00.359 --> 01:03.810
of those graphs that help us solve a lot of problems

01:03.810 --> 01:05.070
in the real world.

01:05.070 --> 01:07.410
Just as a side note, as a software engineer,

01:07.410 --> 01:10.186
I used to work a lot with graph databases,

01:10.186 --> 01:12.681
working for cybersecurity companies,

01:12.681 --> 01:17.370
leveraging graphs to find and describe attack vectors

01:17.370 --> 01:22.290
of cloud assets on public clouds like AWS, GCP, and Azure,

01:22.290 --> 01:24.240
and also describe the connectivity

01:24.240 --> 01:26.430
of those assets on those clouds.

01:26.430 --> 01:30.000
To ask a question, is this web server internet-facing

01:30.000 --> 01:32.610
and is it connecting into a database,

01:32.610 --> 01:35.640
helping the cloud security posture management?

01:35.640 --> 01:37.795
By the way, I'll leave in the videos resources,

01:37.795 --> 01:41.220
a talk I gave about this topic in Minsk,

01:41.220 --> 01:44.490
you know, Python Developer Meetup discussing this topic

01:44.490 --> 01:45.873
in case this interests you.

01:46.710 --> 01:48.960
And if we want to geek out a little bit,

01:48.960 --> 01:51.600
we can see even the formal definition of a graph,

01:51.600 --> 01:56.160
the mathematical definition where a graph G or V and E

01:56.160 --> 02:01.160
comprised of V, a set of vertices and E, a set of edges

02:01.920 --> 02:04.410
described with a pair X and Y

02:04.410 --> 02:08.013
where X and Y belongs to the vertices set.

02:09.210 --> 02:12.095
And in case you got worried, then this is the last time

02:12.095 --> 02:14.250
we will see math in this course.

02:14.250 --> 02:15.753
So, let's continue.

02:17.100 --> 02:19.680
And a state machine on the other hand

02:19.680 --> 02:24.240
is a model of computation where it consists of states

02:24.240 --> 02:26.820
and transition between those states.

02:26.820 --> 02:28.804
And by defining different states

02:28.804 --> 02:32.250
and the rules for the transition between them,

02:32.250 --> 02:34.783
then the states can manage complex conditions

02:34.783 --> 02:37.770
and sequence in software systems.

02:37.770 --> 02:40.140
And now you can notice that state machines

02:40.140 --> 02:42.120
can be represented as graphs

02:42.120 --> 02:46.020
where the states are nodes and the transitions are edges.

02:46.020 --> 02:48.513
And this visualization helps us understanding

02:48.513 --> 02:50.910
the flow of the state machines

02:50.910 --> 02:52.503
and to manage their complexity.

02:53.670 --> 02:55.740
And here enters LangGraph,

02:55.740 --> 02:59.070
a powerful library built on top of LangChain.

02:59.070 --> 03:03.175
And with LangGraph we can describe our flows

03:03.175 --> 03:05.658
using those nodes and edges,

03:05.658 --> 03:08.130
and we can build very powerful

03:08.130 --> 03:12.420
and sophisticated agentic applications using it.

03:12.420 --> 03:14.892
And we'll see in the course that we'll be describing

03:14.892 --> 03:18.413
some very advanced and sophisticated agents,

03:18.413 --> 03:21.058
and it will be very easy to write them

03:21.058 --> 03:23.820
in LangGraph and to run them.

03:23.820 --> 03:25.440
And that's it for this video.

03:25.440 --> 03:28.410
I think it was important to have an alignment

03:28.410 --> 03:30.426
of what's a graph and what's a state machine

03:30.426 --> 03:34.473
before we dive into Flow Engineering and to LangGraph.
