HomeVideos

How Will We Prompt AGI? A History of Harness Hacks | Ivan Charapanau at Agent Conf 2026

Now Playing

How Will We Prompt AGI? A History of Harness Hacks | Ivan Charapanau at Agent Conf 2026

Transcript

465 segments

0:00

[music]

0:14

[music]

0:24

I would like to start with a little bit

0:26

of like a change. So I'm sure many of

0:28

you spend your days prompting agents,

0:30

right? In fact, some of you are doing

0:32

this at this very moment, right? Yeah, I

0:35

know what you're doing. So instead, I'm

0:37

I'm going to turn the ship around. I'm

0:39

going to prompt you for this talk. So

0:41

you are the audience of a talk about

0:44

harness hacks. The speaker is a tiny bit

0:47

nervous, so he might speak quickly.

0:50

Listen carefully. Laugh at the jokes if

0:52

they're funny. Hold your questions until

0:54

the end. Find me. And if something is

0:57

unclear, it is his fault, not yours. All

0:59

right, take a deep breath.

1:02

Let's begin. So, I'm Ivan. I work at

1:06

victor.com and I do a lot of open source

1:09

work related to local inference agents

1:11

and agentic systems. And if you want to

1:14

find out more, my GitHub handle is

1:17

fairly easy to type. So, feel free to.

1:20

And first about the product where I

1:22

work, victor.com. Well, AI employee, I

1:26

think many people here heard these words

1:28

one too many times already. So, let me

1:31

tell you what makes him special. So,

1:33

first of all, I checked this morning and

1:35

in our production workspace we have 173

1:39

integrations connected right now

1:40

totaling 5,400 tools at once. Then we

1:45

have 1,300

1:47

skills in the same workspace also at

1:49

once. And it's a single agent. It's not

1:51

a multi- agentic system. no sub aents

1:54

nothing like that and it works we just

1:56

use it like it automates half of our

1:58

company and the growth that company is

2:01

experiencing wouldn't be there without

2:03

that second thing is that it's

2:05

continuous agent so you can start your

2:07

work in slack you can continue in open

2:09

code and then you can finish on the call

2:13

while you are I don't know going

2:14

somewhere then uh it's a newer

2:17

generation of harnesses so it's double

2:19

loop by design meaning it's async native

2:22

so You can steer it, you can join uh the

2:25

trajectories mid run and it happens

2:28

asynchronously.

2:30

Then lastly, it works wherever you work.

2:32

It's a true work scale AI.

2:35

So Slack, Teams, all of the APIs you can

2:38

think of, OpenAI compatible, entropic

2:40

compatible, ACP, of course, MCP so that

2:43

you can use with your traditional tools.

2:46

So harness hacks, but let's talk a

2:49

little bit about the harness itself.

2:51

harness engineering, right? What what is

2:53

the harness itself? Uh for the purpose

2:56

of this talk, it will be very simple. So

2:58

harness is everything that sits between

3:00

the world and the model. And some people

3:03

might uh say, okay, is the inference

3:05

engine a part of the harness? Could be

3:08

why not

3:10

let's start in the beginning. So May

3:13

2020 we have GPT3 coming out and there

3:17

is a paper called language models are

3:20

few short learners by open AI and the

3:23

thing is GPT3 is not capable of

3:25

following instructions it completes next

3:28

token right so how do we make it work

3:30

how do we make it do it what we want it

3:32

to do well the answer is we give it

3:35

examples and we make the thing that we

3:39

want to do the next most probable output

3:41

for the

3:42

And the paper starts with a translation

3:45

example. It's very simple. So you have a

3:47

word translated version and then you end

3:51

with a

3:53

placeholder for the model to fill.

3:56

Then we are moving to a slightly

3:58

different area. So what examples are

4:00

doing they are just priming model latent

4:03

states. So the thing that you want is

4:05

the next most probable output. Right?

4:08

But it's not the only way to get there.

4:10

we can get there in a slightly different

4:11

way. What if we just type the

4:13

instruction? Well, okay, it can actually

4:16

put the model into the same exact state

4:18

and an awesome orc Luther AI uh released

4:21

this paper in February 2021 called

4:23

prompt programming for large language

4:26

models which describes exactly that. And

4:28

since then it was about searching how to

4:31

prime that internal state of the model

4:33

to do more of the things we want and

4:35

less of the things that we don't want

4:37

to.

4:39

Then we move to October 2021 and AI

4:43

chains. I I like many of you know uh

4:46

where this is going but that actually

4:48

happened a year later. So this was

4:50

actually a research paper from Google

4:52

research um in October 2021 and uh they

4:56

found out that well okay uh prompt is

4:59

one task but if we want to achieve more

5:02

delegated work then we chain them and

5:04

then it gives us the results we need.

5:09

And then a year later, longchain put it

5:12

into a very viable framework.

5:14

Uh May 2022,

5:18

we are on a trajectory where we see that

5:22

model becomes slightly um more

5:25

responsible for what it outputs and

5:27

learns a little bit of the next probable

5:30

outputs step by step. And they found out

5:34

that u if you just append this tiny

5:36

thing in front of your task, let's think

5:38

step by step, the model outputs exactly

5:41

that and ends up in a state where it's

5:43

more likely to give an expected [snorts]

5:45

answer. Such a simple thing and all ever

5:49

since we were hunting for for approaches

5:52

like that, right?

5:55

Next, we are moving to October 2022. So

5:59

text generation has no side effects.

6:03

and how model acts in the world. Well,

6:06

let's let's build a small framework

6:08

around it, right? Let the model reason

6:11

about what it sees. Then let it output

6:13

some action. Then we execute that action

6:16

and then the world replies. And that I

6:20

think many of you already seen this loop

6:22

where you implemented it countless times

6:24

here, right? React classic paper on on

6:27

how harnesses are built. So um and

6:31

lchain which we talked about shipped a

6:33

react chain within 3 weeks after it was

6:35

released and so agentic frameworks uh

6:38

began

6:40

many others too. Um

6:43

then we are moving further. So we seen

6:48

examples few shot we seen framing zero

6:51

shot when we're just trying to uh put

6:53

the model into specific state. We seen

6:56

chains of prompts. Then with react, we

6:58

seen loops. And what's next? Well, just

7:01

add more dimensions to it, right? Let's

7:04

make it a three. So three of thoughts.

7:06

Let model consider multiple

7:07

possibilities explicitly and then

7:10

estimate which one is more probable to

7:12

happen or better for our outcome. Choose

7:15

that and continue based on that option.

7:18

So and repeat that in a loop or any part

7:21

of other framework. And on game of 24,

7:25

uh, GPT4 with this approach went from 4%

7:28

success rate to 74,

7:31

but of course at a high far higher

7:33

inference costs.

7:35

Uh, there are always trade-offs, aren't

7:38

they? So then we are moving to July

7:42

2023. Uh, I want to ask how many people

7:45

here have promised a reward for a model

7:48

if if it outputs syntactically correct

7:50

JSON.

7:54

Okay. Okay. So, that's not great. And if

7:59

we want more predictable outputs, of

8:00

course, we have to build a framework

8:02

around it. And that's another thing

8:05

where we had to make our inference

8:08

engine a tiny bit of of our harness

8:11

actually to make sure that they produce

8:13

what they want. So what if we take the

8:17

center which is already a part of our

8:18

inference pipeline anyway and let's use

8:21

it as a parser. Why not good hug and a

8:24

grammar could decide which tokens are

8:26

even allowed to be generated and we

8:29

don't have to care about invalid outputs

8:32

or retries again later. It just works by

8:34

default. Right?

8:38

Then uh in September 2023

8:41

uh we moving on to the next thing. So we

8:45

gave model prompts, we gave examples,

8:47

but then the model what if we we give it

8:51

a task to optimize its own prompt where

8:53

it will lead. Well, turns out it's a

8:55

pretty good idea and the models can

8:57

research language space quite well and

9:00

uh OPRO organization found out that just

9:06

giving model a way to optimize its own

9:08

prompt improves it outputs significantly

9:10

on a specific task. And the most

9:12

interesting part is that they launched

9:14

optimization hill climb on let's think

9:17

step by step. They uh t the model to

9:20

find a better version of that and models

9:23

are trained on on our outputs on human

9:25

outputs. Right? So the best performing

9:28

version they found was let's take a deep

9:31

breath and think step by step. So I find

9:34

it fascinating that they did that.

9:38

uh then July 2024

9:41

we have

9:43

uh we are entering the era when we want

9:46

to see better quality outputs of our

9:48

models and what else can we hack well we

9:52

have a sampler again we hacked it to

9:54

produce grammarss we want hm okay we're

9:56

also using it to produce more varied

9:58

outputs well let's let's actually try to

10:00

repeat generation 250 times pick best

10:04

candidates and then see if if it helps

10:07

on equality with with our given task. Oh

10:10

wow. And it did help quite a lot

10:12

actually. And imagine this, we are doing

10:15

this and then we're picking best

10:17

trajectories. We are training models on

10:19

them. Then we repeat and boom, we have

10:22

something that can improve itself over

10:24

time.

10:27

Then uh in June 2025

10:30

uh we observed another phenomenon

10:33

happening. So context windows always

10:35

short right and models can never keep up

10:38

with with the requirements that we have

10:39

for them and it's unlikely to happen. So

10:42

we had to find another hack to actually

10:45

to make them work in in such conditions.

10:47

So every task was outgrowing context

10:50

windows and we stopped trying to fit the

10:53

task. Let's split the work across

10:55

several windows, context windows. Give

10:57

each a fresh context and let let the

11:01

model be in in in its native training

11:04

context window so that it produces

11:06

higher quality output and yeah it helped

11:09

a lot.

11:11

Then November 2025

11:14

a very interesting hug. So uh harness

11:17

engineering is hard. So we are not

11:20

creating a lot of harnesses, right?

11:21

Because it's hard to optimize, hard to

11:24

adjust. But the thing is by that moment

11:27

in time models already learned quite a

11:29

bit from training data about the models

11:31

themselves, the harnesses, the

11:32

behaviors, what's needed, what's not,

11:34

how training data distribution looks

11:36

like, how the task distribution looks

11:37

like. And it's only reasonable if we

11:40

give model back some of that control so

11:42

that we can extract that knowledge from

11:43

the model, right? Well, okay, let's

11:45

start with a very simple harness. two

11:47

tools, one calls bash and another reads

11:50

files and tell the model well figure out

11:53

the rest. Write yourself tools, use them

11:56

and complete the task. And they observed

11:59

that the results on Sweetbench verified

12:02

went to 77.4%

12:04

with this approach. Such an amazing

12:07

thing. So models can learn about

12:10

previous optimizations from their

12:12

training data and just apply them in the

12:14

best possible format that is appropriate

12:16

for the model. And of course it can be

12:17

attached to all of the other things that

12:18

we've seen before to hill climb to

12:20

optimizations and it can happen

12:22

iteratively and we'll talk a little bit

12:24

more about that. So rethinking the

12:27

evaluation of harness evolution was the

12:28

name of the paper and it's a great one.

12:33

Great. So almost now August 2026 right

12:40

we are entering an era where AI is a

12:43

commodity. it's available for consumers

12:44

and we just we we want to optimize it

12:46

more because nobody will wait for an

12:48

assistant that takes 40 seconds for a

12:50

first reply, right? And the thing is uh

12:53

our tokens are very slow to arrive but

12:56

Python functions h they are faster

12:59

than tokens and why not just start

13:02

executing code as soon as model

13:04

generates it. So speculative code uh

13:06

execution model generates a function

13:09

call and we run it as soon as it is

13:11

syntactically uh valid. So that when the

13:14

model finish generating we already have

13:16

another payload to send to our API and

13:19

there is no waiting and the end results

13:22

um are arriving to the user faster. The

13:25

paper is called speculative programmatic

13:27

tool calling uh by Alex Jang a very cool

13:30

thing and it observes about 1.2x 2x uh

13:33

speed up in the uh small error

13:36

experiments.

13:38

Great. So all of the previous slides

13:40

they were actually on one of the three

13:42

trajectories. I think some of you

13:43

noticed the small pictograms in there.

13:45

So this is the decoding of that and u

13:49

this will help us to actually establish

13:51

what's next because now we are moving

13:52

into the area of like what will happen.

13:55

Let's try to fantasize a little bit

13:57

about it based on what we've seen and

13:59

the first trajectory is about shape of

14:01

work. So what we sent to the model and

14:03

how it's structured and of course it

14:05

started with just a simple prompt. So we

14:08

just sent a piece of text. A piece of

14:10

text flies out. That's it. Then we

14:12

started chaining them and then we

14:14

started looping them. And then there is

14:16

a tree. Well, what's next? Well, the

14:19

answer in the previous instances was

14:20

just adding more and more dimensions.

14:22

And how do we add more dimensions to a

14:24

tree? Well, we make it an a cyclic or

14:27

even cyclic graph. And I I think we'll

14:30

see more designs like that going

14:32

forward. The second trajectory is also a

14:35

very interesting one and I think many of

14:37

you observed it is that um the model

14:40

slowly eats the harness and possibly it

14:42

will start eating the world later in

14:46

mysterious ways. We'll talk about it. So

14:49

how it manifests? It manifests uh in in

14:52

changes like for example when cloud code

14:54

when migrates into fable 5 they removed

14:57

80% of their system prompt because it's

15:00

no longer needed. It doesn't add

15:01

anything to the model behavior. The

15:03

model behaves in the way they want

15:05

already and it doesn't add anything. So

15:07

we can just throw it out and model

15:09

already knows about it. Great. So in

15:12

there we started with think step by

15:15

step. We explore different formats of

15:17

how that can look like. We let the model

15:19

to try to find better versions of how to

15:22

ask itself questions. Then we let the

15:24

model to modify the harness itself. Uh

15:27

now we are at the stage where model can

15:28

also define execution shapes and

15:30

trajectories. Uh I think many of you

15:32

used ultra code from cloud code, right?

15:35

So I think that's just the beginning of

15:37

where it starts. And the next two things

15:39

we'll talk about will be about hill

15:40

climb because I believe eventually most

15:43

of the tasks will turn out into a hill

15:45

climb exercise of sorts. And then about

15:47

model eating the world. How scary it

15:50

sounds. We'll see. And the last one is

15:54

about the scale. So we started with a

15:56

single interaction with the model.

15:57

Single prompt, single output, then many

16:00

tries, best of end, then sub agents each

16:02

working on its own uh portion of task

16:05

and then of course more of that.

16:10

Let's go. So the first one uh we will

16:13

turn most tasks into a hill climb. What

16:15

does that mean? It means that you

16:17

probably observe that many companies are

16:19

starting to collect trajectories as much

16:21

as they can and this is a good thing

16:24

because those trajectories are very

16:26

valuable sources of of gradient and the

16:29

gradient is the scars artifact in this

16:31

new age. What we want is a clear and

16:34

useful signal on what to improve and why

16:37

and then the models can can already do

16:39

that autonomously. So hunting for that

16:41

signal will will become the next thing

16:43

that many companies will do and already

16:45

doing actually. So we set an objective,

16:48

we define experiments in that objective.

16:51

Uh then we have a clear metric to

16:52

optimize then we decide to keep some of

16:54

the experiments and build on top of that

16:56

and the whole thing loops as many times

16:58

as as we needed to.

17:01

The next thing is work becomes a graph.

17:04

So loops chains yeah great but graph can

17:07

have all of that. It can be a chain, it

17:09

can be a loop, it can have all kinds of

17:11

interesting topologies. So it cannot

17:13

parallel work, fan outs, funins, joins.

17:16

It cannot retries roads that are

17:18

conditional or things that are only

17:20

available after an intermediate result

17:22

and ultimately it will be just an easier

17:24

paradigm to orchestrate and the models

17:26

already know all of it like you don't

17:28

have to explain it. Uh this is a very

17:31

interesting exercise. I encourage all of

17:33

you to ask your coding agent next time,

17:36

please draw me a mirror diagram of how

17:39

you can complete this task with sub

17:41

agents and it will show you like amazing

17:43

amount of of understanding of how to

17:45

actually split work in such pieces and

17:47

and and use them.

17:52

Great. So the world retreats into the

17:55

model. What does it mean? Well, it means

17:57

that initially we have to explain the

17:59

world to the model and as they got

18:02

better, we we had to do less and less of

18:04

that explaining up to a point where now

18:06

most models they they understand that

18:08

okay uh

18:10

we'll just say it like that. Of course,

18:12

for the purpose of the talk, they

18:14

understand quote unquote that they are

18:16

large language models acting in the

18:18

world through some sort of harness and

18:19

they can own it and modify it. And it

18:22

means that eventually uh this trajectory

18:24

will lead to models having better and

18:26

better understanding of the world, its

18:28

state and how reactions of the model

18:31

modify that state up to a point where

18:33

eventually the model will not need to

18:36

actually observe the world. It will have

18:38

such a good internal model that it will

18:40

just need to check that okay my

18:42

expectation aligns with real reality.

18:45

And that's very similar to how another

18:48

kind of intelligence operates, right?

18:51

And then uh we have a swarm a very

18:53

interesting thing uh scale grows up

18:56

prompt model many tries many sub aents

18:59

we have a graph where we are uh this

19:03

told phrase like a city of geniuses

19:05

about modern data centers and the scale

19:08

will only grow larger up to a point

19:10

where you will say that okay I have a

19:12

civilization of experts working on my

19:14

task could be so how will we prompt AGI

19:19

based on what we discussed

19:21

I think about three things. So probably

19:24

through an agent that makes the case for

19:25

you because that capability you won't be

19:27

able to access it directly. There will

19:29

be an intermediate that translates,

19:31

explains, guards. The prompt might be

19:34

short because the model will have such a

19:37

good understanding of the world that

19:39

eventually your prompt might look like a

19:41

shrug in the morning and then the work

19:43

is done in the evening. Then the work

19:45

behind your prompt might be civilization

19:47

sized.

19:49

That's it. Thank you.

19:52

[applause]

Interactive Summary

The video provides an overview of the evolution of AI 'harness engineering', which refers to the structures and systems built between models and the world. The speaker, Ivan, traces the history from simple prompt engineering in 2020 to more complex agentic workflows, such as chains, loops, trees of thoughts, and recursive self-optimization. The presentation discusses how models are becoming more capable of understanding and modifying their own harnesses, moving toward a future where tasks are increasingly structured as graphs and autonomous hill-climbing experiments.

Suggested questions

3 ready-made prompts