0:04
So, I've been thinking a little bit
0:05
about like agent swarms and what it
0:08
means for well, observability. I was
0:12
kind of trying to think a little bit
0:13
ahead like, I don't know, 6 months into
0:15
the future or a year into the future
0:21
yeah, what does that mean? What does
0:23
that mean for Kitaru?
0:26
so yeah, I've been doing a bit of
0:27
exploring and I kind of just wanted to
0:28
share I don't know, some initial things
0:31
that I was was working on. Maybe it I
0:34
don't know, provoke something in you or
0:36
you can tell me this bit is interesting
0:38
or this bit is not interesting. Um
0:41
And maybe the best place to start is
0:46
so at the moment people have agents and
0:49
you start to see a little bit the labs
0:52
people in the labs, I mean mainly those
0:53
are the ones that can afford to run
0:55
these things, but starting to run groups
0:59
Now previously we would call this like a
1:01
multi-agent system. Maybe I don't know,
1:04
for the last 2 years this is what people
1:06
And you know, agents coordinating
1:08
together. Even our own Jai
1:11
built a kind of communication protocol
1:12
for agents to work together.
1:16
but now what you start to see is agents
1:18
collaborating together in a multi-agent
1:20
system. But the number of these is is
1:23
much larger. I think the largest one
1:26
that is kind of well-known to have been
1:28
have done something productive at least
1:31
was the one that that solved the
1:36
Millennium Prize mathematics problem and
1:39
that was something like 10,000
1:42
agents working together in a swarm.
1:45
And obviously at that at that scale
1:52
I mean already people talk about, you
1:54
know, the the single agent stuff being
1:56
too many traces to follow or whatever.
1:58
Uh but if you scale up to 10,000 agents
2:01
working over a multi-day period or
2:03
something, it's going to be outside the
2:04
realm of human possibility to
2:09
so what does that mean? Are we just
2:11
going to delegate understanding of these
2:13
things to agents? How are we tracking
2:15
this? Um do these swarms need tracking
2:17
in a different way? These are all kind
2:19
of questions which I was thinking about
2:21
this week. Um or allowing myself uh time
2:24
to think about it. Um and if you'll
2:25
excuse me just referring to something I
2:27
wrote in my blog, um I kind of gathered
2:29
together some questions that people had
2:31
written about in blogs um about, you
2:34
know, after they'd run agent swarms. Um
2:39
yeah, you know, why was the whole system
2:41
waiting for its slowest worker?
2:43
Uh why did the session fail before the
2:46
um agent could do meaningful work? Why
2:48
did this worker receive the task? Um
2:51
I mean, these these are just the ones
2:52
which were specified, but you can
2:53
imagine there's there's a whole range of
2:55
things that can go wrong within a swarm.
2:57
Um and yeah, you might have questions or
3:00
you might just want a little bit like we
3:02
do with insights in Ketero, you might
3:04
want to have some kind of insights being
3:06
coming out of these these swarms to
3:08
understand them better.
3:09
Uh because the scale is pretty huge.
3:12
Um and you can kind of map these
3:13
questions onto the evidence that's
3:18
uh some of them are kind of traditional
3:19
stuff of like just the model context,
3:21
the messages, tool calls, that kind of
3:24
But then you also need to go a lower
3:26
level down to see like what was
3:27
happening on the file system level of um
3:33
of each individual agent. And then, you
3:35
know, what how were messages being
3:37
passed uh between each other? Um
3:41
uh among uh within the swarm um and how
3:44
did decisions get made? Are there kind
3:47
uh patterns which patterns of
3:49
communication or file writing or so on
3:52
or like where were problems happening.
3:54
So, you do need quite a bit of evidence.
4:00
Yeah, somewhere in my blog I kind of
4:02
list, you know, the different kinds of
4:04
things from model context to files. You
4:06
need to be capturing like reads and
4:10
memory when it's used.
4:17
All sorts of things. You know, each
4:20
process that that gets run. And we saw
4:23
in some of the some of the
4:25
some of the swarms which have existed
4:27
like the hugging face hack.
4:30
The agents actually tried to hide their
4:32
hide their tracks. So, you need to have
4:34
something which is sufficiently low
4:36
level that that it is tracking tracking
4:40
everything. So, all of that is kind of
4:43
preface and opening just like the
4:45
problem space I guess a bit for you. I
4:48
tried looking for traces for swarms.
4:50
Couldn't find any anywhere. So, I just
4:52
thought I would spin up some kind of
4:57
The ones which I created were only 20
4:59
agents or 18 to 20 agents large. I
5:05
data set on hugging face hub. It's
5:10
pretty big. It only has like 19 kind of
5:12
19 runs. Of 18 LLM agent teams. And
5:17
these were all running Luna. So, yeah.
5:20
This is just kind of Codex and they were
5:27
task like building a list interpreter
5:30
and they had to collaborate
5:32
and kind of work together across the
5:35
git repo and saving files and and
5:39
committing them and so on. And so, we
5:41
have this data set now of
5:45
lots of different events. Maybe I can
5:49
the recording of what was going on. So,
5:51
yeah, the agent you can have any agent
5:54
you want basically. You just need to
5:59
you need to have the models tracked by
6:01
the kind of model API proxy.
6:03
Um so, luckily with OpenAI models, you
6:05
can just switch out the base URL um and
6:08
then we're we're we're tracking requests
6:09
and responses uh and all of that good
6:12
Um then you need to be tracking process
6:19
uh for this we were using Yeah, I used
6:22
uh Tetragon, which is basically like a
6:27
thing that you insert into the kernel um
6:30
and you use it to basically track and
6:33
exit codes of every every command that
6:35
runs, standard out, standard error, uh
6:38
and so on. And the same with file reads
6:40
and file writes. Uh we use um
6:43
a thing called Fuse, which again is like
6:44
very low-level. It's kind of a hook that
6:50
uh so that you're snap- snapshotting um
6:53
uh and tracking like file reads uh
6:57
and then obviously you're doing all of
6:59
the the kind of snapshotting above it
7:01
uh of tracking uh Git writes and and and
7:04
Git commits and so on.
7:10
we have an append-only uh like database
7:14
uh which is just a Dynamo DB
7:17
which is running uh over on Modal um is
7:21
able to handle pretty pretty um pretty
7:24
high-level um or pretty large levels of
7:27
uh of scale. Um I tested this before uh
7:32
throwing the agent at it. Uh sometimes
7:34
it can be a bit things can back up a
7:36
little bit, but anyway, it can
7:42
uh without so much problem.
7:47
yeah, and so so at the end you have this
7:49
kind of database full full of events
7:52
which is just living um
7:55
Yeah, you have all of the events and
7:57
everything all of the data stored in uh
8:04
well, I'm getting ahead ahead of myself
8:05
a little bit, but then
8:07
uh it's not enough to just be capturing
8:09
all of the events just like with Kitaru,
8:12
it's not enough to have your traces in
8:13
LangFuse, you actually need to do
8:15
something with it. So
8:18
so I kind of built a little like
8:19
investigator agent which is able
8:21
specifically trained and has
8:25
special powers to be able to deal with
8:27
the stuff in this append-only store and
8:29
to trace down problems. Um
8:32
so the investigator agent I just
8:34
mentioned its name now, it's called
8:35
Hudhud. Um and this kind of append-only
8:39
store recorder thing is called Mantıq.
8:42
These are both names from
8:46
It has a relationship to swarms and
8:49
and data recording, but it's not so
8:53
So this yeah, this investigator
8:55
investigator agent reads the evidence
8:58
and basically allows you to ask
9:00
questions, puts together like hypotheses
9:05
So I built most of this
9:14
private repo is a little kind of
9:15
architecture diagram in a little bit
9:21
showing you know, where things are
9:25
it's all running on Model. What I want
9:28
to kind of show you a little bit
9:30
is is the UI because this was kind of my
9:33
starting point. I was thinking a little
9:36
oh well, you know, if people find it
9:38
already difficult, um,
9:40
uh, and I apologize this video might
9:42
might end up going going a little bit
9:44
long, might be, um, uh,
9:54
it's already pretty difficult to to kind
9:56
of sometimes understand in Kitaru when
9:58
you see like, uh, or in LangFuse, like a
10:00
huge, uh, dump of, uh, of all of these
10:03
kind of JSON and sub-agents and
10:05
whatever. But what happens if you had,
10:07
um, you know, 20 different agents, uh,
10:09
running at the same time, let alone
10:10
10,000 agents? And like, are there
10:13
particular ideas, or like, are there
10:15
different views that people are going
10:19
to want to use to understand
10:21
explanations? Maybe not to navigate the
10:23
data, but maybe your agent wants to give
10:25
you kind of a, um, uh, an explanation
10:28
for like how things failed. Like, are
10:30
there different ideas about like how you
10:32
might someone might explore this?
10:34
Um, and, uh, so I just kind of built out
10:37
a bunch of different,
10:40
uh, based on the failures that I
10:41
observed in the, um, uh, in the mini
10:44
swarms that I ran, because there aren't
10:46
any traces available publicly.
10:48
Um, I just kind of like started playing
10:51
around with ideas of showing, uh,
10:54
showing how, um, yeah, how to understand
10:58
a swarm, uh, basically. So, I just
11:00
wanted to kind of walk through some of
11:01
them. I'll start with the most simplest,
11:03
um, I'll start with like, uh, some of
11:10
here there's kind of like a,
11:16
there's kind of a a symbolic, uh,
11:18
language, which, uh,
11:20
I think, like, if you are spending your
11:22
whole time investigating swarm data,
11:24
like, you don't want to have too much
11:26
text. You want to have, uh, probably a
11:28
symbolic language like this. Maybe it
11:30
feels like quite a lot at the beginning,
11:32
but probably will will be quite useful
11:35
in dealing with large amounts of
11:37
information cuz you really want to just
11:41
to whatever the thing is that is like
11:43
most interesting or most
11:47
Yeah, most most important. Um
11:50
So, we can look at like specific cases.
11:52
So, these are questions and hypotheses.
11:54
This is kind of what I was talking about
11:56
a little bit earlier where you can kind
11:58
of trace through across a bunch of
12:02
how certain events like why were so many
12:04
pushes refused in this run. So, you can
12:07
and you can see that in the agent number
12:11
four our kind of starting point in this
12:14
is that we started with this prompt and
12:16
you can see the evidence there and then
12:19
did send a message over into
12:22
agent five and you can see like what was
12:25
recorded and some kind of guess for the
12:27
explanation. And this stuff, by the way,
12:31
it's not hard coded. This is generated
12:32
by the agent kind of a little bit like
12:34
an MC P app. So, these were just some
12:37
like little stories that I was like
12:39
exploring and asking it to to analyze.
12:42
So, this is kind of one
12:48
But, we can actually go
12:50
we can even go from from here. We can go
12:54
particular agent or a moment and we can
12:57
see like the actual like pushes to the
13:01
and we can see these across the all of
13:04
the different agents and again using
13:12
different elements and we can see see
13:14
below what's changing in the files.
13:18
We can also look at the files themselves
13:20
and see like which agents were most
13:22
responsible in this kind of heat map
13:24
most responsible for changing certain
13:26
files and if we click on um you know,
13:31
uh A11, which was dealing with the CLI
13:32
implementation, you can actually see um
13:36
see the kind of the Git diff uh that
13:40
this particular agent was responsible
13:45
and we can also look at message uh
13:46
communication. So, uh
13:49
the communication from like uh agent
13:55
or or this one, let's say, we can
13:57
actually see the messages.
13:59
So, this is quite cool already. Like, I
14:01
can uh kind of see uh uh
14:03
see a use for this. I can kind of see
14:09
you know, use these uh
14:12
use this UI to like understand things. I
14:14
can go, you know, from here I can go
14:16
directly to the pushes menu, you can go
14:21
and I realize I'm saying saving the cool
14:23
stuff to last. But, what happens when
14:28
So, um I kind of put together
14:32
a whole bunch of different views uh to
14:34
allow you to to understand uh
14:36
understand these things. So, I'm just
14:38
going to take you take you through them.
14:41
they each do kind of different things
14:42
and tell different stories. So, here, I
14:44
mean, there are kind of three big
14:46
problems where like um uh across the
14:49
agents of like this whole idea that like
14:51
uh agents took a task but never released
14:53
it, or agents pushed but nothing uh
14:55
landed in the repo, uh or a task was
14:58
never released by one agent so then
14:59
other agents couldn't check it out. So,
15:01
there are kind of different problems
15:02
that were uh identified. So, you can
15:05
filter by those problems. You can also
15:07
uh kind of filter by uh
15:09
which ones uh scored different uh
15:12
different scores in terms of like the
15:14
grader which evaluated um you know, how
15:16
well they performed. Uh and here we can
15:19
identify, you know, which were the ones
15:20
that got a full uh a full score.
15:23
Uh so we can kind of hover hover over it
15:25
and then here uh we can see that um
15:28
these are actually teams. Uh so if we
15:30
click in, we can see it's a team of uh I
15:33
don't know, 10 or 15 agents um or 16 16
15:38
16 or 17. There's a planner and there's
15:40
a judge. Um and we can see a similar
15:42
kind of uh similar kind of view. We can
15:45
switch between the teams here. Um it's
15:47
all uh organized across uh across the
15:50
timeline. Uh we can click through again
15:52
to the similar cases, pushes, files uh
15:55
and messages view for that particular
16:00
so yeah, that that's kind of uh kind of
16:04
we can have this uh pinch uh pinch zoom
16:08
view uh which yeah, we can sort by
16:11
problems. I can just zoom in. So here
16:13
I'm using my um my kind of my trackpad
16:16
to zoom in to a particular um
16:19
uh set of teams. And kind of the closer
16:20
we go, the more uh granular uh the
16:23
detail becomes. So here now I'm seeing
16:25
this this team and I'm using again these
16:27
visual symbols to see uh exactly what
16:30
has happened. We can keep going even
16:32
further and then we can actually start
16:33
seeing, you know, what this particular
16:35
agent worker was doing. Uh
16:38
um we can turn off different things. So
16:39
some are messages, some are like that a
16:41
push uh happened. Um uh
16:45
here is a message going to one agent,
16:46
here is a message going to a different
16:48
agent. So we can kind of zoom in and out
16:51
uh in terms of like the granularity of
16:55
agents and agent teams. So this is if
16:57
you can imagine and this is across uh
16:59
whatever it was, 10,000 agents. This is
17:01
quite a nice way to like browse and see
17:04
uh possibly the scale of uh scale of
17:08
Uh we can remove this filter. We can
17:10
sort by different things, by start time
17:13
um or the the the the result and so on.
17:16
And of course we can click on them, and
17:18
then we can go straight into the teams
17:19
for these uh previous views.
17:22
Uh we can click on this uh kind of
17:23
weather view, which um is a way to see
17:27
uh to get a sense of like different
17:29
things. So, we can have, for instance,
17:31
messages, and we can click play here,
17:34
and we can see like how messages were
17:36
passed among the different divisions.
17:38
So, a division is kind of a group of
17:39
teams. Um uh over time. Uh and so, you
17:43
can sometimes get a sense of like
17:45
problems rippling through a particular
17:47
division or particular uh
17:50
particular groupings of things. Uh we
17:52
can do the same for um
17:54
uh you know, files, uh and we can see
17:56
what when files were uh were being
17:58
written. Uh we can have them all turn on
18:01
at once. This is maybe not so useful. We
18:02
can just look at pushes.
18:04
Uh we can slow it down. Um
18:07
and yeah, we can also kind of zoom in
18:09
and and and and get a sense of
18:12
if we if we pause it, yeah, we can uh we
18:15
can have a look at uh
18:16
a particular uh group of time.
18:19
So, that's kind of an interesting one.
18:22
this one is kind of my um
18:24
kind of a nice one. If you I I was
18:25
trying to think of like um
18:28
uh spatial ways of of understanding like
18:32
what happens during uh a swarm. Um and
18:35
so, here, as time passes, and we can
18:37
press the the the play button, and we
18:39
can see things trickling through the
18:43
uh actually, there are kind of uh
18:46
there are different events happening,
18:48
and you might want to be able to um
18:51
doesn't necessarily make so much sense,
18:53
or at least it's a bit hard for the mind
18:54
to be able to like parse things, but you
18:56
might want to like spatially go through
18:59
and say that, "Oh, I do know uh like
19:01
this particular point, we can actually
19:03
go in here, and we can zoom out, and we
19:07
uh actually, I wonder what other things
19:09
were happening in the same
19:10
neighborhood.'" And we can click on
19:14
Um and then here we can see a bunch of
19:15
times. We can open the team. So, we can
19:17
go to that team view at that time. We
19:19
can look at the pushes, messages, files.
19:21
But, we can get a kind of a little bit
19:22
of an overview of like what messages
19:24
were sent, what pushes were happening.
19:31
uh kind of go down uh here. And we can
19:35
uh move things up. So, we can see the
19:37
different activities that's happening.
19:38
And then use this as kind of a way of
19:40
like spatially understanding what was
19:42
happening in the swarm. Um yeah. It's
19:45
not always going to be the best way of
19:46
navigating things. But, potentially, you
19:48
know, your agent might be able to use
19:50
this as a kind of MCP app to give a a
19:53
kind of video explanation of like
19:54
clusters of problems happening. So, all
19:58
uh is available to to the agent. Uh and
20:01
this is all real, I should say. It's
20:02
like it's using actual uh uh swarm data.
20:08
then we have the kind of constellation
20:09
view, which is a way of understanding
20:11
like messages between teams. So, again,
20:14
we have these different divisions. And
20:15
you can see how messages were being uh
20:19
uh transmitted. If we zoom in, we can
20:21
then see exactly like how the um
20:24
different teams within the division were
20:26
communicating with each other. And we
20:28
can move in even further. Uh we can look
20:30
at like the clusters of uh of the
20:33
messages that were being passed between
20:34
the different uh between the different
20:36
agents. Um so, yeah. It's just a way of
20:39
like understanding like inter
20:41
inter-team, inter-division
20:42
communication, uh which I think for for
20:44
certain kinds of problems might be might
20:46
be really important.
20:49
Uh layers is just a different uh
20:51
kind of a different version of this uh
20:53
rose view, except you're able to like
20:55
turn on different uh things. So, you can
20:57
turn on the pushes. You can turn on like
21:01
Um and you can kind of uh look here. You
21:04
can change the the opacity a bit. Uh and
21:07
you can kind of cross
21:08
uh layer them on on on top of each
21:10
other. Um it's just a different way of
21:13
uh seeing across your across your swarm
21:15
different kinds of activity. We can use
21:18
number keys to to turn them on.
21:21
Funnel is kind of a process diagram.
21:22
You're probably familiar with these
21:23
kinds of things, but you can
21:29
different problems passed through uh the
21:32
the teams or the agents.
21:36
yeah, you can kind of
21:39
click through to see, you know, all of
21:41
the ones that have uh passed um you
21:43
know, 180 out of 180 of the tasks. Where
21:45
did Where did those come from? What is
21:48
Uh and then of course you can click on
21:51
get to go into the specific examples.
21:55
contact sheet is kind of a different way
21:56
of uh sorting through
21:59
uh the different uh agent teams. Uh we
22:02
can group teams which are similar to
22:04
each other. Uh we can layer on messages
22:08
uh in case that's like something useful
22:10
that that you might want to add in
22:12
Um you can kind of uh only filter out
22:16
for a particular problems, uh or you can
22:19
filter out for for the results. So, it's
22:21
all all the ones which are 180 out of
22:24
180 passing all all are at the top, and
22:27
uh didn't get a result or got very low
22:29
results are all at the bottom. So, it's
22:30
kind of a uh visual way. I'll skip over
22:33
uh horizon for now, and just go to tree
22:38
tree map is kind of uh I'll make it full
22:40
screen. Uh again, a different way of um
22:44
browsing through the divisions. So, you
22:46
can click on, I don't know, division 21,
22:48
and you can zoom in there, and then you
22:50
have access to the different teams. So,
22:52
I can click uh this particular team, and
22:54
we'll zoom in, and we'll see uh that
22:56
this never landed thing. So, that it
22:58
This is basically the main problem that
23:00
affected this particular agent was the
23:02
fact that uh something never landed or
23:04
here this one like a task was was never
23:07
released so we can click here and we can
23:09
get a little bit of an overview of like
23:11
how you know how many pushes it made how
23:14
active it was did someone push first and
23:17
then we then we can go directly into
23:19
of course the the specific evidence for
23:23
Fisheye is just like another way of
23:26
scrolling between things with um
23:32
so we can kind of uh look at
23:36
specific specific items or we can
23:44
again go into the go into the specific
23:46
results it's just different way of like
23:48
quickly scrolling and going from a very
23:50
high level to to kind of a lower level
23:54
expanding things being able to see more
23:58
zooming out and kind of
24:05
again it's a different way of
24:07
of seeing things we can
24:09
take like a small little snippet
24:13
see kind of what proportions of things
24:15
messages were being refused um
24:20
so these are all like kind of different
24:24
different slices of the same information
24:28
and different ways of kind of uh viewing
24:31
it and I imagine that uh agents would be
24:36
basically take their take their pick of
24:40
what views they would want to show you
24:41
in order to explain a problem or even to
24:44
research a problem because some of them
24:45
might be very good at like spatial
24:46
reasoning so they might want to use this
24:49
they might even use this 3D stack to to
24:52
investigate things uh
24:54
obviously all of the data is available
24:56
through MCP server and through the the
24:58
CLI and SDK and so on.
25:00
But, they might want to use these kinds
25:05
to give you an explanation for the but
25:06
for them to to research things.
25:09
one final other kind of cool feature I
25:11
just wanted to to to show is that
25:15
obviously all of these
25:20
it probably would be nice to be able to
25:22
to export them. So, here we have like
25:26
this this judge row. So, I can just
25:33
flash a little bit and at a certain
25:35
point it's going to go black. And you
25:37
can see this little special Kitaru word
25:40
And what this is doing is it's hooked up
25:45
yeah, our kind of prod Kitarus. So, I
25:49
it's actually exported it directly into
25:53
into Kitaru as a session. And so these
25:58
these are the judge judge sessions. And
26:00
so you can see you know, the full the
26:02
full system prompt you are a judge. Blah
26:05
blah blah. And you can see the
26:07
all of the the agent activity. It's it's
26:09
a bit because we don't really
26:10
support coding agents that well. But
26:12
anyway, you you get the idea. And then
26:16
you know, then you can you can run your
26:18
evaluations. You can do all of the nice
26:20
juicy Kitaru stuff across them.
26:23
And it's kind of I just wanted to have a
26:24
way of like going from these views of
26:29
particular agents all the way into
26:32
into Kitaru. So, that was just
26:35
slightly long video, but I hope you
26:38
maybe found it interesting. Um
26:41
it's what I've been thinking about a bit
26:43
this week. I'm going to be still
26:44
blogging about it. But
26:48
yeah, I'll be but be interested in your
26:52
uh in your thoughts on this. I don't
26:55
I don't think agent swarms are going to
26:59
uh most people for a very long time. Um
27:03
even the Frontier Labs are only uh only
27:06
a few of them are are doing
27:07
experimentation around it. It's quite
27:09
expensive and it's also
27:11
most people don't have the kind of
27:12
problems that you would need a swarm
27:16
and I imagine the ones that are doing
27:17
this have built their own custom
27:20
versions of this kind of stuff. Uh
27:23
because there's no other way that like
27:25
the volume of data that this stuff is
27:28
uh is huge. Even these 20
27:31
uh 19 recordings of 18 LLM agents uh
27:34
takes up yeah half a gigabyte um of uh
27:38
just uh text data. So, you can see it's
27:40
it's going to be quite a lot.
27:42
But uh yeah, I kind of wonder whether um
27:45
whether there's uh room or space for
27:48
tools like this where the people just
27:50
are going to build them themselves. Um
27:53
whether there is any advantage to being
27:55
like an early mover in this space um
27:58
or just like hunting down teams who are
28:00
building stuff with swarms and uh trying
28:03
to get in early in the front door.
28:05
Um it does feel like it is Kitaru
28:08
adjacent, but it's like the Kitaru of 6
28:11
to 12 months from now.
28:14
so yeah, I don't know what that looks
28:16
like, but these are some of my my
28:18
initial explorations at least.