HomeVideos

When to Build Your Own Agent Harness | Harrison Chase, LangChain

Now Playing

When to Build Your Own Agent Harness | Harrison Chase, LangChain

Transcript

740 segments

0:00

Harnesses. I think this is a very

0:02

important topic. A lot of you are

0:03

thinking through building your own

0:04

harnesses right now. Um, I'm very

0:06

excited to introduce Harrison. I first

0:09

noticed Harrison on Twitter in 2022,

0:12

back in the GPT-3 era. And Harrison was

0:15

one of the first people thinking about,

0:17

"Okay, we have these models. How can we

0:19

build an entire harness around them so

0:21

that they're not just um auto-complete

0:24

uh tasks, but that they start acting as

0:27

virtual collaborators or agents?" Um and

0:30

Harrison, like the ecosystem has grown

0:32

so much since 2022, and I've seen you

0:35

you also grow a lot in terms of how you

0:36

think about building agents, building

0:38

harnesses, how to eval them, etc. Um so,

0:41

I'm very excited to have you talk today.

0:43

I think the talk's going to be both

0:44

about harnesses and evals. And then

0:46

format again will be 15 minutes or so of

0:48

presentation content, uh 15 minutes of

0:51

Q&A. Thanks for joining us, Harrison.

0:57

>> Cool. Um my name's Harrison, co-founder

1:00

CEO of LangChain. I want to talk about

1:03

evals and harnesses in the context of

1:05

kind of owning your own intelligence.

1:09

So, when we talk about intelligence,

1:10

we're normally talking about agents.

1:12

What exactly makes up an agent? At

1:14

LangChain, we think there's kind of like

1:15

three main parts. There's a harness that

1:17

orchestrates a model and some context.

1:19

And if you're talking about owning your

1:20

intelligence in general, you probably

1:22

want to own all three parts of these.

1:24

And so, owning the model, I'm not going

1:26

to talk too much about. Lin was here

1:27

from Fireworks and talking about open

1:29

weight models and owning that. Uh big

1:31

part of this is also the ability to

1:32

switch models. Uh

1:34

there used to be this concept of kind of

1:36

being like cloud agnostic and being able

1:37

to switch clouds uh back in the day.

1:40

Same thing exists, but for models. You

1:41

want to be able to switch to avoid

1:42

lock-in, but also to just use the best

1:44

model when it's available. Context, you

1:46

want to own all the the context that

1:49

your agent uses. Whether that is memory,

1:52

uh whether that is semantic knowledge,

1:54

um whether that is previous

1:55

conversations. You can these can help

1:56

personalize and guide the agent as it

1:58

goes along. And then the last bit is the

2:00

harness, and that's what I really want

2:01

to focus on.

2:02

So, how how do you how do you really own

2:04

your harness? What does that even mean?

2:06

What's the main job of a harness? The

2:07

main job of a harness is to bring

2:08

context to the model at the right point

2:11

in time.

2:12

And so, it does all the orchestration

2:13

around the the fixed context, the the

2:16

dynamic context. It brings it into the

2:18

context window of the model, shows it

2:20

something, gets some response, and then

2:22

does something with that.

2:24

And so, agents need to do all these

2:27

different things in order to accomplish

2:28

their jobs. There's a ton of

2:30

domain-specific stuff that they need to

2:31

do as well, but they need to interact

2:33

with external systems. These external

2:34

systems, when you interact with them,

2:36

they emit more context that can get fed

2:37

back into the agent into the loop. And

2:39

so, the harness is the thing that really

2:40

orchestrates all of this together.

2:43

Agents at [snorts] their their kind of

2:45

like simplest, when everyone talks about

2:47

agents, what they really talk about is

2:48

just an LLM running in a loop calling

2:50

tools.

2:51

Um and uh this this is a really simple,

2:53

but really general architecture. Some

2:55

request comes in, the the LLM makes some

2:59

uh generation. That generation may

3:01

include a tool to call. If it does, you

3:03

invoke those tools, and you pass that

3:05

observation back to the LLM. And and

3:06

this is this is the core architecture

3:08

behind pretty much every agent out there

3:10

today.

3:12

But they're all different in like

3:13

slightly different ways. And so, on the

3:15

left here, this is kind of like uh the

3:16

the the base core kind of like loop. But

3:19

there's a bunch of different things that

3:21

you can do in your particular harness at

3:24

different stages.

3:25

And so, this is uh over here, this is

3:28

So, so we built LangChain, which is a

3:29

really really base minimal harness, and

3:31

that's LangChain over here. And then

3:33

this is Deep Agents. Deep Agents is kind

3:34

of like our model-agnostic and and more

3:37

general-purpose version of of Quad Code.

3:39

And so, it does more things. It connects

3:40

to file systems. Uh it has skills. It

3:43

has sub-agents.

3:44

It's built on top of this really simple

3:46

harness, but we customize it by using

3:48

these uh these levers over here. So, you

3:50

can run particular code snippets before

3:53

the agent's invoked, before each model

3:55

call. You can kind of like wrap these

3:57

model calls, you can wrap the tool

3:59

calls, and you can and you can customize

4:01

this core uh simple loop in a lot of

4:04

really powerful ways just by just by

4:07

using kind of like small what we call

4:09

kind of like middleware constructs.

4:10

There's other ways to customize the

4:12

harness as well, but this is kind of

4:14

emerged as uh there's a concept of hooks

4:16

and plugins in a lot of the coding

4:17

agents as well, and that's essentially

4:19

what they're doing. They're taking this

4:20

base loop that's running, and they're

4:22

adding little hooks or plugins at

4:23

various points to let you customize it.

4:26

And so, a lot of the stuff that you can

4:28

do when you can customize, this is all

4:30

done by that concept of middleware, by

4:32

just modifying that core loop. So, the

4:34

agent's still running in a loop, it's

4:36

still doing that same simple

4:37

architecture, but through that you can

4:39

give it access to a sandbox, you can

4:41

give it access to a file system, you can

4:43

give it access to sub-agents, you can

4:45

give it access to to memory, you can

4:47

have summarizations. So, summarization,

4:49

if if if we go back to this thing,

4:51

summarization would come in before the

4:52

model. Before the model's invoked, you

4:54

check if the context is too long, and

4:55

then you summarize it. And so, that that

4:57

you can add into this core loop through

4:59

this concept of middleware, same with

5:01

context offloading,

5:03

um which which is a way of basically

5:04

taking large tool calls and dumping

5:06

them. That kind of wraps the tool call.

5:08

And so, the point is there's there's

5:10

this really simple kind of like general

5:12

architecture of an agent. All of these

5:14

more advanced agent harnesses are

5:16

basically doing that loop, but adding in

5:18

a bunch of stuff while still running the

5:20

core loop. And so, as you think about

5:21

kind of like building or customizing

5:24

your own harness,

5:26

these are the different places that you

5:27

can insert things into. You can add your

5:29

own summarization step, you can add your

5:31

own handling of particular tool calls,

5:33

and that's one way that you can

5:34

customize kind of like the agent to your

5:37

particular domain and the harness to

5:39

your particular domain.

5:41

The other way that you can customize the

5:42

harnesses that the agent runs in is by

5:44

having a more explicit kind of like

5:46

cognitive

5:47

So, this used to be the way that a lot

5:50

of people would build agents in kind of

5:51

2023, 2024 because the models weren't

5:54

good enough to run in a loop. And so, in

5:56

order to get it to do particular things,

5:58

you would have these very bespoke

6:00

cognitive architectures. And so, this

6:02

one over here is

6:04

for

6:05

a deep research example

6:07

where it would generate some some sub

6:09

questions, fan them out, and then go and

6:11

execute them. And then this one over

6:12

here is for a code review bot. And you

6:14

can see that there's these very kind of

6:15

like the bespoke steps.

6:17

A lot of this has gone into the harness

6:21

now. And by the harness, I mean it's

6:22

still this core loop. These might be

6:24

added as particular kind of like

6:25

modifications to that core loop. But,

6:28

for a lot of really particular kind of

6:30

like flows, we do see people still using

6:34

cognitive architectures like these to

6:35

really guide it in particular ways. One

6:37

thing that we recommend to people is to

6:39

start with a general harness.

6:41

That's the easiest to get started. It's

6:42

going to be quickest to time to value.

6:44

And then as you kind of narrow in on the

6:47

use case that you want to be excellent

6:48

at, you can start to add more of these

6:50

kind of like gates and checks around it

6:52

to to to guide it into particular ways.

6:55

One question that we get a lot is when

6:58

to kind of think about building your own

7:00

harness versus using an off-the-shelf

7:01

harness. Um a lot of the off-the-shelf

7:04

harnesses are uh work with particular

7:06

models. So, the off-the-shelf harnesses

7:09

include things like Claude Code or

7:11

Claude Agent SDK, which works with

7:12

Anthropic models, Codex, which works

7:14

with OpenAI models. I think this is a

7:16

big open question in the industry. My

7:19

answer generally is the more in

7:21

distribution you are of what the models

7:23

are trained on, then the better the

7:25

off-the-shelf harness will be. As soon

7:27

as you start to move further and further

7:28

out of distribution, then the then

7:31

you'll probably want to tune your

7:32

harness in some way.

7:34

There's different ways to tune the

7:35

harness as well. So, the models may be

7:37

in distribution on particular things

7:40

that you are doing on an out of

7:41

distribution task. So, what I mean by

7:43

that is if you think about something

7:46

like like legal AI, which Gabe just

7:48

talked about, and I think he mentioned

7:49

how they have their own harness,

7:51

there are things that are in legal AI

7:53

that are still in distribution of the

7:56

the the main models. So, for example,

7:58

editing files is something that the main

8:01

models have all been RL'd on. And

8:03

they've actually all been RL'd in very

8:04

particular ways. So, OpenAI and and

8:07

Claude models edit files in in different

8:10

ways in their harnesses, and as a

8:11

result, their models are actually best

8:13

at editing files in different ways.

8:16

Now, the the models themselves are out

8:18

of distribution on this larger task of

8:20

legal AI, but they're in distribution on

8:22

this task of editing files. So, if you

8:24

think about building a harness that

8:26

works there, you'll probably want a

8:28

custom harness, but you'll want it to

8:30

use the edit file tool that is in

8:32

distribution for

8:35

the the the model that you're using. So,

8:37

one of the things we do in Deep Agents,

8:39

for example, so Deep Agents is our

8:40

customizable harness, we actually have

8:42

this concept of model profiles, where

8:44

for things that are in distribution of

8:46

models like editing files, we basically

8:49

switch between different edit file

8:51

implementations depending on which

8:52

model's being used. And so, I think

8:54

that's an example of customizing the

8:56

overall harness when it's out of

8:57

distribution for a task, but keeping

8:59

smaller in distribution parts

9:02

as close to the model layer as as

9:04

possible.

9:06

The second big part of what I want to

9:08

talk about is evals and observability.

9:10

And so, I think as you're experimenting

9:11

with all parts of an agent, whether it's

9:14

the model or the harness or the context,

9:16

you're going to want to know what's

9:17

going on inside of this system, and

9:20

you're going to want to be able to

9:21

evaluate it. And so, these are useful

9:23

tools that you can use, again, not just

9:25

for custom harnesses, but also for

9:27

custom models.

9:29

So, there was a great Twitter article

9:30

that Satya wrote uh

9:33

2 weeks ago,

9:34

um where he talked about a lot of these

9:35

concepts. And there's three quotes in

9:37

particular that kind of stood out for

9:38

me. One, create your private evals

9:40

because eval defines what good looks

9:42

like inside the organization. Two,

9:45

retain ownership of your organization's

9:47

memory, traces, feedback, though that

9:49

bold is mine, decisions, and

9:51

institutional context. And then three,

9:53

you create your own continuous learning

9:54

loop hill climbing machine that will

9:56

allow your AI investments to compound

9:58

the value of your firm. And so I think

10:00

these speak to the importance of evals

10:03

and observability and the learning loop

10:05

that they power in in really owning your

10:07

intelligence and compounding it. So how

10:10

exactly do they do that?

10:11

So evals. Gabe was here talking about

10:14

how they built benchmarks for the legal

10:17

domain. I think every company what when

10:19

they're building a mission-critical

10:20

agent, they will build benchmarks for

10:22

that agent.

10:23

Um you can use it to define and catch

10:25

regressions or you can hill climb on

10:27

that benchmark. Again, either by

10:28

adjusting the harness or adjusting the

10:30

model.

10:31

Things that we see becoming the industry

10:33

standard for defining these benchmarks

10:35

is Harbor. Harbor is an open-source eval

10:37

runner. It's uh created by the makers of

10:40

Terminal Bench 2, which is one of the

10:42

industry standard benchmarks for

10:43

benchmarking coding agents, and it's

10:45

become pretty popular for a variety of

10:46

domains.

10:48

What it lets you do, so this is so this

10:49

is Frontier Bench, which is another uh

10:51

coding benchmark. You get this nice

10:53

benchmark and you can compare different

10:56

agent harnesses, different models,

10:58

different reasoning efforts, and you can

11:00

get this nice benchmark and you can see

11:01

how all these different harnesses and

11:03

all these different models do on your

11:04

task. And so having a benchmark for your

11:06

task will become really really important

11:08

when you're trying to define it.

11:10

What exactly is Harbor? It's pretty

11:12

simple. At a high level, it consists of

11:15

agent that you you run an agent against

11:17

the data set. A data set has a bunch of

11:19

different tasks. Generally, they're run

11:21

in sandboxes because they are a lot of

11:24

these different tasks and you might want

11:25

to parallelize them. And as we talk as I

11:28

talk about in a little bit, each task

11:30

has its own kind of like environment. So

11:31

this is what a Harbor task looks like.

11:33

So, on the right, you can see that it

11:35

has an environment. This is where you

11:36

define the environment that the agent

11:38

runs in. A lot of these longer running,

11:39

more stateful agents need to interact

11:41

with their environment. And so, you

11:43

basically spin up a sandbox, give it its

11:45

own environment that's defined in a

11:46

Dockerfile, and run it there.

11:48

There's then uh a solution, which is

11:50

basically this this is uh a kind of like

11:52

golden solution that you use to sanity

11:54

check it, so it's not that interesting.

11:55

Test is more interesting. This is

11:56

basically the verifier for the the agent

11:59

run.

12:01

The test scripts can do anything. They

12:02

can run code, they can run unit tests,

12:05

they can run another LLM as a judge,

12:06

they can run an agent as a judge. You

12:08

basically define how the agent is scored

12:10

in this test. And then instruction.md is

12:12

the prompt that the agent is given. And

12:15

that's kind of like the core of Harbor.

12:17

You define these tasks, which are

12:19

bundled up things that can be run in a

12:20

sandbox, and then you run a bunch of

12:21

them against agents. And agents again

12:24

consist of models and harnesses, and you

12:25

score how how they do.

12:29

When you do all of that, what do you

12:30

get? You get some nice results that you

12:31

can compare. So, this is LangSmith, the

12:33

the platform that we build for evals and

12:35

observability. And so, you can see here

12:37

a bunch of different experiments. Uh we

12:39

have a great integration with Harbor.

12:40

You can see the the feedback scores. In

12:42

this case, it's a single reward

12:44

function. You can also track latency and

12:45

tokens. So, when you're benchmarking

12:47

agents, you probably don't just care

12:49

about accuracy. You also probably care

12:51

about latency and and and cost. And so,

12:53

you'll want to track all of those.

12:55

And then for a particular experiment

12:57

that you run, these are these would be

12:58

the different tasks that are in a in a

13:00

in a Harbor data set.

13:04

Talking about a little bit about

13:05

observability. Uh observability sounds

13:07

basic, but I think it's really important

13:09

and really underrated for agents,

13:10

actually. So, when agents mess up, they

13:12

mess up because an LLM call goes wrong.

13:13

Why might it go wrong? It might go wrong

13:15

for one of two reasons. One, the model

13:17

is not good enough. Two, the context

13:18

that the LLM received isn't good enough.

13:20

And so, I actually think it's the the

13:21

second one that more often than not

13:23

causes issues. And so, having really

13:25

good observability into what is going

13:27

into the context window of the the model

13:30

and then how that context is

13:32

accumulated, what steps were run, what

13:34

tools were run, how does that context

13:36

get there? All of that is really

13:37

important for debugging your agent when

13:40

it when it goes wrong.

13:43

So this is one view of observability

13:45

that we have. This is intended to be a

13:46

more kind of like user-friendly view

13:49

where we actually represent it. This is

13:50

similar to what you might see in kind of

13:52

like Claude code. We we kind of like

13:54

hide some of the tool calls so you can

13:55

see seven tool calls up there.

13:57

And so we try to make it really easy to

13:59

kind of like skim through this. Most

14:01

agent paths these days come in the form

14:03

of trajectories. Trajectories are

14:05

basically you can think of them as the

14:06

list of messages that you see kind of

14:08

like Claude code running. So when you

14:10

run Claude code or another agent, you

14:12

type in a human message, it then makes a

14:14

bunch of tool calls. Those are all

14:15

messages under the hood and then it

14:17

responds and then you type in another

14:18

human message. That's kind of like this

14:20

message trajectory that is becoming more

14:22

and more of a central part of of these

14:24

agents. But that's not enough to fully

14:26

debug it and so we also have this full

14:28

kind of like trace and you can click

14:30

into particular things and see exactly

14:32

what goes on inside the model. And this

14:34

type of observability is pretty

14:35

important for knowing what's going on.

14:39

Evals and observability really let you

14:40

set up this data flywheel and compound

14:43

the intelligence as you as you start to

14:46

use the agent, as your users start to

14:48

use the agent and you start to get

14:49

feedback.

14:50

So this is this is a slide that one of

14:53

our team members presented at Swyx's AI

14:56

engineering fair actually around a

14:58

recipe for continuously improving

15:00

agents.

15:01

At a high-level it's really simple. You

15:03

build an agent, you start running it,

15:04

you collect lots of traces, you then

15:06

curate the trace data, and then you run

15:08

experiments on on that data that you

15:10

create. And so it's really simple,

15:12

but of course there's a lot of

15:13

complexity under the hood. So so one

15:16

thing that's really important for this

15:17

is is feedback. Getting feedback either

15:20

from the environment or from synthetic

15:22

source. So from the environment, one

15:24

thing that I think is really

15:25

underestimated in agent design is

15:26

actually UX design of how you present

15:28

the agent to your users. If you present

15:30

it in a really intelligent way, you can

15:31

actually end up getting a lot of

15:33

feedback from them. They may not click

15:34

thumbs up or thumbs down explicitly. No

15:36

one really doing that. But if you if you

15:39

design the UX in a clever way, you can

15:40

get some of that feedback. The other

15:42

thing you can do is you can start to get

15:45

synthetic feedback. So you can run what

15:47

we call kind of like online evaluators

15:49

over these traces to judge things. So

15:52

Gabe was talking about an experiment

15:53

that we did with Harvey where we we

15:55

significantly reduced the cost of some

15:58

of these LLM as a judge type thing. So

16:00

if you imagine running Opus over every

16:02

single trace that comes into your

16:04

system, that's going to rack up a big

16:05

bill. And so you want a really cheap and

16:07

fast way of doing this. So we've

16:08

fine-tuned some SLMs for actually doing

16:10

this, but you can of course use

16:11

off-the-shelf models with custom

16:13

prompting to do it. Or you can just use

16:14

code if some of the things that you want

16:16

to test are are simple enough.

16:20

Um so this is the the the full a part of

16:22

it. Um the curating the trace data,

16:25

feedback is a big part there. And then

16:27

the other thing is is when you use that

16:29

data to update what happens, you can

16:32

update any part of the agent with this

16:34

with this kind of like system. Um so you

16:36

can update the harness by doing harness

16:39

engineering. You can update the model by

16:41

do a by doing fine-tuning on that. You

16:42

can update the context by doing memory.

16:45

Um and and so the part that we are that

16:47

we think most about at LangChain is the

16:50

harness engineering part of that. And so

16:51

I want to show a really quick demo of of

16:53

one of the things that we added to help

16:54

with that. But I I think Trajectory is

16:57

talking next on some fine-tuning that

16:59

can be done. Uh and and so it's a very

17:01

similar process where you run the agent,

17:02

get some traces, use that data in some

17:05

way to improve the system. What is the

17:06

system? It's these three pieces. Any of

17:08

these can be updated in some way.

17:11

Um and so yeah, this is the full

17:13

end-to-end um

17:15

uh uh flow that you might want to do.

17:18

One of the things that we think about is

17:20

how can you automate this as much as

17:22

possible because this is tricky and

17:24

takes a lot of time.

17:25

Um and so that's one of the things that

17:27

we've been thinking about for the past

17:28

few months. I want to do a quick demo of

17:30

what we call LangSmith Engine, uh which

17:33

is basically an agent that sits on top

17:35

of your traces and does all this work.

17:37

So if we look at what that work was, you

17:39

know, you've got these traces, it's it

17:41

the work from there is curating the

17:43

traces and running some experiments,

17:45

suggesting fixes to one of the three

17:46

things. And as I mentioned, we mostly

17:47

focus on the harness engineering bit. Um

17:50

so uh in the demo I want to show uh what

17:54

this looks like and how it represents

17:55

that. So hopefully this will work. If

17:58

not, it's not that big of a deal.

17:59

Perfect. Okay. So this is LangSmith.

18:01

This is a bunch of traces we have coming

18:03

in. Um we have this tab called engine

18:05

over here. Um this is an agent. It runs

18:08

in the background. It creates what we

18:10

call kind of like issue boards. So this

18:11

is the part of curating data. It will

18:13

look for It will It will It will

18:14

basically under the hood is a coding

18:16

agent that has access to our LangSmith

18:17

CLI. The LangSmith CLI, you can filter

18:20

traces for feedback and other things

18:22

like that. So we give it a nice big

18:24

prompt and some sub-agents that help it

18:25

basically go out and explore this data

18:27

and identify issues and see what common

18:29

things are. And then it will create

18:31

these issues right here. And so here um

18:34

it's created an issue. It gives a

18:35

description of it. It has It links to

18:37

the traces so I can go see some

18:39

supporting evidence. And then down here,

18:41

I guess this is very simple changes to

18:43

the prompts. Um but here it's updating

18:45

part of uh of the context in this case.

18:49

Um here it's also updating some

18:50

instructions. Um and we can see here

18:53

that it's adding uh some code to go into

18:55

the harness as well. And so this is uh

18:58

something we launched in the past few uh

19:00

months and I think speaks to this data

19:03

flywheel, which again is a very simple

19:05

thing. Run agent, get traces,

19:08

see patterns, fix. Um and and this is

19:11

our attempt at automating it. Um, that's

19:15

all I've got. Happy to take any

19:16

questions on harnesses or evals.

19:19

>> Um, this is great, by the way. Really

19:21

appreciate the whole whole presentation.

19:23

Uh, Engine itself is an agent, right?

19:26

That's given a prompt and go search over

19:28

things. Uh, have you run Engine on

19:30

Engine?

19:31

>> We have it running, yeah. So, we got

19:32

slight So, Engine also hooks up to Slack

19:34

and sends it kind of like reports about

19:36

itself. Um, and yeah, that's how we

19:38

that's how we dogfood it. Yeah.

19:41

We also uh we also created uh

19:44

uh what we call kind of like issue bench

19:45

for Engine, which again is like a harbor

19:47

a harbor formatted uh

19:49

uh

19:51

benchmark, basically, that we're

19:52

constantly benchmarking different models

19:54

and different harnesses on.

19:56

Um, and so, it's

19:58

I think Gabe talked about this a little

19:59

bit, but one of the benefits of having a

20:00

benchmark is you can you can benchmark

20:02

it on a bunch of different harnesses and

20:04

see what they're good and bad at. So, we

20:06

we uh I think a few weeks ago we ran our

20:09

our own kind of like deep agents and

20:10

then Codex and then Claude Code on this.

20:13

And we saw that Codex was doing a really

20:15

interesting thing, where it would write

20:16

itself a bunch of small scripts to run

20:19

against these traces, and it was doing

20:20

that really aggressively and actually

20:21

allowing it to perform really well. So,

20:23

we we did a sprint to do what we call

20:25

the kind of like codis- codexification

20:28

of Engine and basically take that

20:29

learning and and bring it into kind of

20:31

like the the core Engine harness. And

20:33

so, I think that's another uh a benefit

20:35

of having a benchmark is you can just

20:36

run a bunch of different things on it

20:38

and see how they actually perform and

20:39

then bring those things back into your

20:41

core kind of like agent harness.

20:45

>> Super cool talk. Um, to which extent do

20:48

you think that like harnesses will

20:50

converge into one thing and users will

20:52

be educated to do that and the models

20:54

will be best for that versus

20:55

diversifying here, every company has

20:57

their own

20:58

uh way of doing things uh optimized for

21:01

them?

21:02

>> Yeah. Yeah, really good question, one

21:03

that we think a lot about. And um, I I

21:05

chatted with Eno from Factory, who also

21:08

kind of like thinks a lot about this.

21:10

Um, and and I think there's some stuff

21:11

we talked about this.

21:12

Um,

21:13

I I think

21:15

uh

21:17

I think there's

21:19

I I think the model I I don't know is

21:22

the is the honest answer. I think uh

21:24

some things that I've seen is that the

21:26

general purpose harnesses have gotten

21:29

good enough to work for a lot of basic

21:32

tasks at least when you're getting

21:33

started. So, I would recommend getting

21:35

started with like an off-the-shelf

21:36

harness, whether it's Deep Agents or

21:38

Codex or Cloud Code or something like

21:39

that. Because I think the models are now

21:41

good enough and the things that we've

21:42

learned about what these makes these

21:44

models good, access to file systems,

21:46

sub-agents, things like that, those are

21:48

those those are kind of like good

21:49

enough. Um, I think we often see that

21:54

the more out of distribution you get,

21:56

the more you're going to want to

21:57

customize the harness. And it's a scale,

21:59

right? So, like it uh it it it it at the

22:03

extreme end of a scale, you might want

22:05

to build a complete kind of like

22:06

cognitive architecture that that is

22:08

really focused on things. A A reason

22:10

Another reason you might want to do

22:11

that, by the way, is kind of like for

22:12

predictability and control. And so, we

22:13

have a lot of customers in financial

22:15

services where they want where they need

22:16

kind of like predictability. And so,

22:18

they we show them something like Deep

22:20

Agents and they're like, "Woah, woah,

22:22

woah. That's way too like scary an agent

22:24

for us. We want like more of this kind

22:25

of like custom cognitive architecture

22:27

where we can really control things." Um,

22:29

but but then on the other end, uh you

22:31

know, you could just use an

22:32

off-the-shelf harness and there's things

22:33

in the middle like hooks or middleware

22:35

that you can use to kind of So, so it's

22:36

a spectrum as well. The more out of

22:38

distribution you get, the more custom

22:39

harness you're going to want to have.

22:41

Um, and then there's other like weird

22:43

things where like again, like um, I I I

22:45

think uh both OpenAI and Anthropic are

22:48

getting really good at coding, but

22:49

they've landed on different ways to kind

22:51

of like edit files um that are like, you

22:53

know,

22:54

that are like actually pretty different.

22:57

Um, you know, I I think they have some

22:59

benchmark and I think he was uh he he

23:01

thought that one way was just better

23:03

than the other way just like strictly

23:04

superior

23:06

and and so that's like like

23:08

so I think the model labs will kind of

23:10

converge and that they all seem to be

23:11

kind of like really good at coding the

23:13

harnesses will converge to to kind of

23:15

like being really good at coding if they

23:16

keep on going down that path but they're

23:18

at the same time there are these like

23:19

really small differences and I don't

23:21

really know how to explain those either

23:22

and and

23:24

right now I think those show up most

23:25

concretely in small things but you could

23:28

imagine what what if one lab really goes

23:30

down kind of like bio and those

23:33

harnesses become really good at kind of

23:34

like bio agent things then then then the

23:37

harnesses themselves start to diverge

23:39

and so

23:40

I I I don't know is the answer to the

23:42

fast moving space that's why evals and

23:43

observability are important and I think

23:45

and and I think we

23:47

to measure all of that.

23:49

Cool. Awesome. Thank you guys.

23:52

>> [applause]

Interactive Summary

In this presentation, Harrison Chase, CEO of LangChain, explores the architecture of agent harnesses, emphasizing that a harness is essential for orchestrating context and tool use within an LLM-based system. He discusses the importance of owning your 'intelligence' by balancing the model, context, and harness. Harrison highlights that while off-the-shelf harnesses are effective for standard tasks, custom harnesses become necessary as use cases move 'out of distribution.' He introduces Harbor, an evaluation framework, and argues that robust observability, combined with a continuous data feedback loop, is critical for debugging, benchmarking, and improving agent performance over time.

Suggested questions

4 ready-made prompts