HomeVideos

Cursor Accidentally Exposed Grok Bot’s Blueprint

Now Playing

Cursor Accidentally Exposed Grok Bot’s Blueprint

Transcript

307 segments

0:00

So, it looks like the Cursor team

0:01

accidentally leaked parts of the Grokbot

0:04

build by mistake. And this fellow right

0:06

here was able to reconstruct the

0:07

majority of it and made it public. This

0:09

is over a million impressions, so

0:11

naturally I had to take a look as well

0:13

to understand how every part of Grokbot

0:15

ticks. And after looking under the hood,

0:17

I now understand how the agents

0:18

communicate, how they assign roles, how

0:21

they decide which agent gets to work

0:22

first, and lastly, how they even run a

0:25

meeting together. And after

0:26

understanding all these techniques, I

0:28

was able to rebuild my own version of

0:30

Grokbot that works with my [music] Codex

0:31

subscription, open router, and even

0:34

local models. So, whether you're a

0:35

Grokbot user and you just want to

0:37

understand how it works, or if you want

0:39

to build your own version, then this

0:41

video is going to break down all the

0:42

important parts that matter. Let's get

0:44

into it. Now, given that the majority of

0:45

people who love Grokbot love all the

0:47

interactions between the agents, how

0:49

they work, and how everything seems to

0:51

be so turn-key, I'm going to focus on

0:53

those aspects. And before we even get

0:55

started, it's important to know that

0:56

repo that I showed you wasn't fully

0:58

comprehensive. It wasn't the entire

1:00

build. It was just a reconstructed

1:01

version of a lot of the parts that were

1:03

exposed. But by looking at those parts,

1:05

we can really understand how they all

1:07

work together. So, I'm going to walk

1:09

through each part step-by-step and give

1:11

you an example just to solidify the

1:12

concept. You might think that all of

1:13

these agents share one big brain and one

1:16

memory base. But behind the scenes,

1:18

that's not actually how it works. Each

1:19

agent has its own name, job, chat

1:22

history, and even private notes. So, in

1:24

this case, a researcher agent can go and

1:26

grab a series of information and only

1:28

that single agent would be aware of it.

1:30

Then how can they share what they know?

1:32

Well, they send messages and DMs to each

1:34

other. And this is not a brand new

1:35

concept. If you remember, way back in

1:37

February, Claude Code released agent

1:39

teams. And the entire concept was all of

1:41

the agents would have their own mailbox,

1:43

and they would email each other the

1:44

status of who's working on what, who's

1:47

blocking what, and which one should take

1:49

precedence. And we've also had agent

1:50

mail, which is an entire framework that

1:52

can be used by any language model and

1:54

any agent team or swarms to do the exact

1:56

same thing. So, if you task your Grok

1:58

bot to go research, build, and QA some

2:01

application, it's going to spawn the

2:02

researcher to go and pull that

2:04

information, then it would communicate

2:06

what is the most salient important

2:08

points to the builder. Then once the

2:10

builder was ready, it would then poke

2:11

and ping the reviewer to go and take a

2:13

look at what it put together. So, each

2:15

one of them does a different job and

2:17

starts with different facts. So, behind

2:18

the scenes, you have a tool that's

2:19

called send to agent, and this is the

2:21

very tool that allows each one of them

2:23

to DM each other. And the way it works

2:25

is, agent A might decide it now needs to

2:28

pass on a note to agent B to wake it up.

2:30

And if agent B keeps working on

2:32

something actively, it won't look at

2:34

another note unless it's urgent. If

2:36

you're midway through a build and the

2:37

researcher decided that it found three

2:39

very useful tasks for the builder that

2:42

was already in progress, it might

2:44

preemptively pass off a note to that

2:46

builder to let it know to incorporate

2:48

that into its next steps, and it can

2:50

keep working at the same time. So, one

2:53

doesn't have to stop in order for the

2:54

other one to work. They can both work in

2:56

parallel, so it will pass off this DM,

2:59

the builder will take it into account

3:01

for the subsequent phases while the

3:03

researcher keeps going. So, you don't

3:04

need your different agents to shut down

3:06

just to communicate. They can

3:08

communicate while they're in progress,

3:09

and they can decide that their progress

3:11

is not done based on the overall goal

3:13

that you've set the entire team. Now,

3:14

what if one of your agents is busy and a

3:16

brand new message comes in? Now, if it's

3:17

a normal message, then the agent will be

3:19

able to ignore it until it's completed

3:21

its current task. But if it's a priority

3:23

or extremely urgent, then it will scan

3:25

it and actually cancel the background

3:27

job and change directions. The one core

3:29

thing it won't interrupt is your

3:31

conversation back and forth. So, you as

3:33

the user take precedence, but everything

3:34

else that happens can be interrupted

3:37

depending on the level of urgency. So,

3:38

let's say that app you're working on is

3:40

already in production, and you find some

3:41

animation issue on the pricing page that

3:44

you want to tweak. But through doing so,

3:45

it finds out that the checkout is

3:47

broken. What will happen is, it will

3:49

intervene, interrupt the process, and

3:51

make the checkout fix number one, so

3:54

long as your back and forth chat with

3:56

the bot is completed. Now, DMs are solid

3:58

for passing work or work that's really

4:00

been fleshed out where there's no

4:01

judgment calls at play. But, if a call

4:03

needs to be made and a discussion needs

4:05

to be had, then your agents can have a

4:07

ground table, like you would in real

4:09

life. Then, to make sure that this group

4:10

chat doesn't end up in chaos, you

4:12

typically have a manager assigned, and

4:14

they go around the table to ask, "Do you

4:17

have something to contribute to the

4:18

conversation?" So, each one will chime

4:20

in, and if that particular agent has

4:22

nothing to contribute, they're allowed

4:23

to pass. So, you could have a series of

4:26

rounds where only one or two agents

4:27

chime in at a given time. So, if you

4:29

were pushing something to production and

4:31

you wanted to ask, "Are we ready to

4:32

launch?" then you'd be able to spawn

4:34

this conversation where the researcher

4:35

would say, "Yes." The builder might say,

4:37

"Everything passed." But, then the QA

4:39

says, "Something's broken." And then,

4:41

looking at the entire situation, the

4:43

operator decides that it passes because

4:44

has nothing good to offer this specific

4:47

conversation. So, then the conclusion of

4:49

the meeting, the next steps, if you

4:50

will, will be to go and fix this very

4:52

thing that was identified, and this

4:54

basically makes a conversation a lot

4:55

more efficient and reduces the

4:57

likelihood that you have endless

4:59

conversations about nothing that keep

5:01

hallucinating. Another feature that

5:02

people love about their Grok bots is the

5:04

feeling that they're so independent and

5:06

they feel like they have their own lives

5:07

and personalities. That's because, like

5:10

we said before, they have their own

5:11

name, their assigned job, you now know

5:13

they have their own inbox and way of

5:14

communicating, and they also have their

5:16

own computer with their own screen. So,

5:18

the AI model is the worker and the

5:19

computer is its desk. So, if you were to

5:21

say something like go and build this

5:22

application, test it, and review it, all

5:25

of these different agents would spawn

5:26

their own screens, and on those screens

5:28

would be different activities. For the

5:30

researcher, you'd have a series of tabs

5:32

that it's fetching for research. The

5:34

builder might use a screen just to open

5:36

up a terminal and make some changes in

5:37

the application. And then, the QA would

5:39

go and render either the local server

5:42

spun up by that terminal or do its own

5:44

independent work. When it comes to

5:45

things like the tools, plugins, and

5:47

permissions, Grokbot seems to work very

5:49

similar to something like auto mode on

5:52

Cloud Code. Where depending on the task

5:54

and the severity of the task, it will

5:56

decide whether or not it needs your

5:57

permission. So, even though you can give

5:59

it a credit card to go buy things

6:01

autonomously on its own, the first few

6:03

times it will want to ask you if it's

6:05

okay. Once it understands that it is

6:07

okay, then it will add it to its list of

6:09

accepted permissions and be able to do

6:12

it autonomously moving forward. So, if

6:13

we extend our example from before and

6:15

now you are republishing your pricing

6:16

page after fixing the checkout problem,

6:19

when it comes to editing the files, it

6:20

will auto allow. When it comes to

6:22

testing them, it will auto allow. But,

6:23

maybe the second or third time that

6:25

you're looking to publish, it will

6:26

double and triple-check if it's okay.

6:28

Now, you can actually keep going down

6:30

the rabbit hole and finding more details

6:32

and fine print, but it seems like the

6:33

Grokbot interface, the secret sauce,

6:36

lies in six elements. The interface, the

6:39

orchestration layer where each agent

6:40

decides which one will go next in what

6:43

order, the messages in the mail room and

6:45

DM room, then you have your memory

6:47

layers, the fact that each agent can get

6:49

its own screen that's a part of a bigger

6:51

sandbox, and then the model that runs

6:53

all underneath it. Now, with this

6:54

understanding, you could literally feed

6:56

this transcript and build something like

6:58

I've built. Where if we pop into this

7:00

Grokky app and I spin up a couple agents

7:03

and I click on my explorer agent and my

7:05

worker agent, and I ask something like,

7:08

"Can you go and do some deep research

7:10

telling me what are the latest features

7:11

with Grokbot?"

7:13

And I send these over. You can replicate

7:15

the exact same environment where you

7:17

have your own mail room where each one

7:19

of these agents are queued until the

7:21

task is understood, they have a small

7:23

meeting, then they pass off the task one

7:25

to task two, and you finally have the

7:27

lead that takes a look at every single

7:29

thing that's happening underneath the

7:30

hood. And once they're done running, you

7:31

get the exact same experience where you

7:33

can have an answer that is fully

7:35

composed by different agents that work

7:37

by communicating with each other,

7:39

putting together different pieces of

7:40

context, and delivering one unified

7:43

answer with an incredible amount of

7:44

detail. And the best part of this is you

7:47

can build your own version that depends

7:48

on an existing subscription that you

7:50

don't have to pay additional usage for

7:52

and most importantly, you don't have to

7:53

wait for an external team to decide when

7:56

it's okay to extend usage, when it's

7:58

okay to add new features because that is

8:00

fully within your control. And one

8:01

expert tip is I used Codex to not only

8:04

build this app, but also use computer

8:06

use to take a look at the performance

8:08

and the behavior of the Rockbot app so

8:10

that you can actually look at it,

8:12

emulate it and replicate it. And if you

8:14

want to do something like importing your

8:15

skills from Codex or Cloud Code, which

8:17

you can also use the SDK for, you can

8:20

grab that, you can create and build an

8:22

entire team of agents and keep adding

8:24

onto them and replicating all the

8:26

multi-agent orchestration that you see

8:28

and love in something like Rockbot. So

8:30

hopefully this breaks down all the

8:32

mysteries that lie underneath the

8:33

Rockbot hood so you can better

8:35

understand how to use it better, how to

8:37

leverage it or like I showed you, how to

8:39

recreate it on your own terms, on your

8:41

own device. If you want a full guide

8:43

walking through every single feature

8:44

that I mentioned in a lot more detail

8:47

that you could theoretically feed to

8:48

your own language model of choice and

8:50

have it either add features to something

8:52

you already have like a Hermes agent or

8:54

similar or just better understand how

8:56

this stuff works, then check out the

8:57

second link down below and you can grab

8:59

that completely for free. And by the

9:00

way, if you always want access to every

9:02

single thing that I managed to reverse

9:04

engineer along with all the

9:05

understanding of how I did that, you're

9:07

always going to find a copy of these

9:08

exact applications and exclusive lessons

9:11

that you'll never see on YouTube in my

9:13

early AI adopters community. So if you

9:14

always want to be 10 steps ahead of the

9:16

game and save tons of money, then check

9:18

out the first thing down below. And for

9:19

the rest of you, if you found this

9:20

helpful, if you want me to make more

9:21

videos breaking down and reverse

9:23

engineering [music] concepts and builds

9:25

that already exist, let me know down

9:27

below and I'll see you in the next

9:28

video.

Interactive Summary

This video breaks down the architecture of Grokbot, a multi-agent system, following a leak that allowed the creator to reverse-engineer its internal mechanisms. The summary covers how agents operate independently with their own memory and workspace, communicate through direct messaging and group meetings to coordinate tasks, and handle permissions autonomously. Furthermore, it explains how one can leverage these insights to build a custom, flexible multi-agent framework using existing subscriptions or local models.

Suggested questions

3 ready-made prompts