BẢN CHÉP ÂM THANH 🔗
WEBVTT
00:00:00.040 --> 00:00:08.179
Your coding agent is probably slower than it needs to be, and you don't have to switch to a faster, less capable model to fix that.
00:00:08.480 --> 00:00:15.519
We had multiple agents working in parallel, but every time they ran their end-to-end tests, they were eating up all the resources.
00:00:15.640 --> 00:00:31.339
So, how do you make your agents faster without sacrificing the verification that makes them reliable? Today we'll show four ways to do that, from simple changes you can make right away to some more involved techniques.
00:00:27.579 --> 00:00:32.899
So, Brandon, what exactly was happening with your project?
00:00:34.259 --> 00:00:46.740
So, I was working on an Electron app and I had set up strong verification loops because that's what you need to do to build successfully these days, including lots of end-to-end tests.
00:00:47.380 --> 00:01:00.280
And what was happening is when I was running these tests with just one agent, Electron keeps popping up over and over again over my work. I'm using tons of RAM.
00:01:01.320 --> 00:01:02.679
My computer locks up.
00:01:03.500 --> 00:01:05.719
It's so frustrating.
00:01:03.500 --> 00:01:05.719
It's so so frustrating.
00:01:05.959 --> 00:01:07.180
So I had to do something about it.
00:01:07.180 --> 00:01:18.180
Right. So instead of, you know, the agents doing the work so you can be productive elsewhere, actually you couldn't use your machine for anything else.
00:01:20.540 --> 00:01:22.879
And the agent's barely doing any thinking.
00:01:23.200 --> 00:01:25.400
It's just waiting. Just waiting on tool calls.
00:01:25.959 --> 00:01:26.819
So frustrating.
00:01:27.040 --> 00:01:38.060
OK, there are probably ways to optimize this process, but before we dive into that, let's first look at what's actually slowing the agent down.
00:01:38.680 --> 00:01:42.939
So, when we talk about speeding up coding agents, where does their time go?
00:01:43.560 --> 00:01:46.239
Well, let's pull up my favorite chart.
00:01:46.799 --> 00:02:08.680
OK. I'm showing my favorite diagram for those that can't see it, this is a diagram that illustrates Amdahl's law applied to agents as inference time speeds up, the total time that it takes to work with agents doesn't speed up as fast. That's what this chart is showing.
00:02:09.360 --> 00:02:29.560
This bar chart is broken up into three different chunks. There's one chunk that's model inference, one chunk that's tool calls, and one chunk that is called you. When you're waiting for your agent, you're waiting for the intelligence to happen, the actual inference. So that's the part that we can't really control if we wanna use smart models.
00:02:30.280 --> 00:02:31.599
Then there's the tool calls.
00:02:32.319 --> 00:02:49.039
And this is maybe building, testing, running things. OK? And then that last part is the time it takes as a human to understand what the agent's doing and to decide if it's going the right direction or to steer it.
Load full transcript
00:02:49.300 --> 00:03:33.560
As we add more guardrails, if we increase the amount that we verify, and if we have really strong end-to-end tests, and a lot of them, the part of the time that's for tool calls grows, and the part that is how often the human needs to be in the loop to make sure that it's going in the right direction shrinks because you can trust the agent more. Now, hopefully you're starting to see the point here. If we can't change the inference time, we've already shrunk the human time, but this tool call time is the problem. This is the problem.
00:03:34.020 --> 00:03:36.219
This is how we can make agents faster.
00:03:36.219 --> 00:03:38.939
If we make the tool call time faster, we make the agent faster.
00:03:39.419 --> 00:03:47.919
Right. So there's definitely a trade-off when you add more verification steps. On one hand you're like, whoa, and now I make it more reliable.
00:03:47.919 --> 00:03:51.479
There's more verification whether the agent really implemented the thing right.
00:03:52.139 --> 00:03:55.300
But it also makes the whole process longer.
00:03:56.000 --> 00:04:00.099
Yeah, maybe can you like talk like when this could be really impactful?
00:04:02.039 --> 00:04:09.300
Well, firstly it's getting more and more of a problem because that's what this chart is showing the frontier models are getting faster.
00:04:09.319 --> 00:04:19.180
You can run Codex in fast mode, you can run Opus is faster than it used to be but that doesn't mean that your tests speed up.
00:04:19.699 --> 00:04:23.259
In fact, your tests are probably slowing down as your project is getting more complex.
00:04:24.920 --> 00:04:32.579
What are the situations when this is really impactful, when you really have to pay attention to your tool call time?
00:04:32.779 --> 00:04:35.160
Big, big culprits for tool calls.
00:04:35.439 --> 00:05:04.879
If you're having your agent do some kind of verification with judgment. So the agent is thinking and clicking around. That's the slowest thing. There's also if you're building a project in Rust or some other language that has a build process then you're waiting for the compilation time and that gets slower as the project grows in complexity.
00:05:02.319 --> 00:05:04.879
And then there's also testing.
00:05:05.480 --> 00:05:23.519
And what I think the community is sort of aligning on is that the kinds of tests that are very valuable that are the most helpful are black box end-to-end testing. Your test suite can get out of control if you don't pay attention to it.
00:05:23.920 --> 00:05:26.720
Mine definitely ran out of control.
00:05:26.800 --> 00:05:37.259
At some point it just built new features within a few minutes, but then it took an hour for me to wait until the tests were done.
00:05:34.120 --> 00:05:37.259
Yeah, I can see that happening.
00:05:39.399 --> 00:05:40.939
Yeah, unacceptable, yeah.
00:05:43.459 --> 00:05:45.720
So let's dive into how I could solve that.
00:05:46.439 --> 00:05:53.879
If I have
a coding agent session right now, how would I find out which steps are taking the most time? What would I do?
00:05:54.980 --> 00:06:20.100
I think a really easy thing you can do is ask your agent to review the recent sessions and specifically you're gonna wanna ask what parts of my tool calls are taking a long time so once you determine, is it the build, the tests is it like running review agents, then you can drill down more, right?
00:06:20.100 --> 00:06:28.000
You can say, OK, it's something in my test suite and then you can maybe add more instrumentation to figure out exactly what parts of your tests are being slow.
00:06:28.879 --> 00:06:39.279
OK, so let's say once you know that verification and the test are the bottleneck, what can you actually change?
00:06:35.540 --> 00:06:41.860
Like, do agents need to run the entire test suite after every code change?
00:06:41.959 --> 00:06:42.819
What do you think?
00:06:42.839 --> 00:06:53.300
No. So this is a pretty like relatively easy step to take but there's some risks, I would say.
00:06:54.040 --> 00:07:22.101
So yeah, so you can talk to your agent and say, well which test do I need to run when I make these kinds of changes or these kinds of changes. So you can set up your test using tools that can track these dependencies very neatly with your code, like Bazel or Nix. You can use regular expressions to filter for tests that are connected to certain parts of your code.
00:07:22.540 --> 00:07:31.000
You can even have an agent decide, like Jev, to choose which tests need to be run based on the changes you're making to your code base.
00:07:31.500 --> 00:07:33.759
How would we do that?
00:07:31.500 --> 00:07:33.759
How would you do it?
00:07:34.779 --> 00:07:41.920
I'm pretty interested in, like, how we can decide which tests are relevant to a particular change that you're making?
00:07:42.100 --> 00:07:46.771
Yeah. So this is like an experiment that we ran when we were first playing with Jev.
00:07:47.180 --> 00:08:13.139
Basically the input is the diff the changes. And then you can ask Jev, should I run this test for each test and you can just ask Jev in parallel on all your tests. And then Jev or any decision model will tell you, OK, I think you should run this with seventy percent probability or I think this one you don't have to run with some probability.
00:08:14.079 --> 00:08:20.677
And then you can pick a threshold and run the ones that you need to run and skip the ones that Jev says you're allowed to skip.
00:08:21.600 --> 00:08:26.879
So you use a decision model to decide whether a test is relevant to a change.
00:08:27.079 --> 00:08:31.879
Right. Right. But it's not always gonna be correct.
00:08:33.059 --> 00:08:34.960
So that's something that might be scary.
00:08:35.580 --> 00:08:55.980
And in fact, the exact tests that are the most helpful for keeping your agents on track, which are end-to-end tests, they're the most far away from the code change and so it's the hardest to decide whether it's safe to skip a particular end-to-end task given just the code change.
00:08:56.019 --> 00:09:09.500
Right. Because sometimes you could be like, OK, only these files are changed during this change, so we're only going to do tests that relate to these files. But now you're saying, but you know, that doesn't work for end-to-end tests.
00:09:10.779 --> 00:09:15.620
Right. Unit tests are like testing specific functions which live in certain files, so that's easy.
00:09:16.820 --> 00:09:27.559
End-to-end tests are like open the application, click around, do all these things, and attaching that to specific code changes, especially ones deep within the foundations of your application, sometimes are really difficult.
00:09:27.820 --> 00:09:34.779
I guess there's also been quite some debate around that, right? About agent-written tests and which ones are necessary.
00:09:35.720 --> 00:09:37.700
There's nuance here, which I'll just quickly
00:09:37.700 --> 00:09:43.559
if the LLM
00:09:43.559 --> 00:09:54.059
is choosing its own tests so it's deciding what test it wants to write and you haven't steered it in any way, those are probably unhelpful. Those aren't gonna help you.
00:09:55.100 --> 00:10:11.822
If you work with an agent to figure out the right testing strategy for some part of your project and you steer your worker to make those kinds of tests, it's probably a little bit more helpful even if you're making unit tests, integration tests.
00:10:13.139 --> 00:10:25.299
However, what is the most helpful is these end-to-end tests. They're the best feedback loop to the agent. It's what a person would do when they're QAing the product or service.
00:10:25.720 --> 00:10:27.419
They would use it and see if it works.
00:10:27.919 --> 00:10:29.039
And if it works, you're done.
00:10:29.039 --> 00:10:33.417
And if it doesn't work, then you know, you can go back and do the loop again.
00:10:33.620 --> 00:10:51.360
So when you said like, how do you work with the agent on testing strategy, do you mean like you would work on a testing strategy every time a change happens? Or like would you work on a testing strategy, a high-level testing strategy before a particular change happened?
00:10:52.019 --> 00:10:56.200
This is one of those things that's like, you get a feel for it.
00:10:56.679 --> 00:11:20.340
It's like, OK, small bug fixes, you don't need to say anything. Or maybe a one line of like, hey, like prove that this is failing before you fix it or something for huge new features in the application, using new modules, new tech, then yeah, I will sit down and be like, OK, let's figure out how to test this, like what are these different options what about like these kinds of tests?
00:11:20.340 --> 00:11:21.259
What if we fuzz it?
00:11:21.620 --> 00:11:23.327
What kind of end-to-end tests can we use?
00:11:24.220 --> 00:11:25.636
Can we use property-based testing?
00:11:25.919 --> 00:11:47.340
And then this is kind of a sliding scale if the task is
small enough or if it's an incremental addition to some feature that I've already mapped out how to test it, I can just let the agent kind of follow the patterns. And even this isn't enough I think it's important to periodically go and review your verification step.
00:11:47.500 --> 00:11:54.820
That totally makes sense. I'm just wondering what is a good, like, default pattern to use?
00:11:55.159 --> 00:12:16.840
In my own projects I see that the agent just writes test every time I've built a new feature or after there's a change And then the number of tests just grows over time and it just keeps testing every previous test that it wrote before So what is a good, like, simple default heuristic maybe?
00:12:16.919 --> 00:12:20.919
Don't let your agent make tests if you don't understand why it's making the tests.
00:12:21.080 --> 00:12:22.559
I think that's like a good direction.
00:12:22.559 --> 00:12:37.159
But even if you do understand it's only I guess the default approach, what I've noticed my agents do is they just keep track of all the tests they've ever written and for every change they just test all the tests that they've ever written.
00:12:37.279 --> 00:12:47.350
And even if those you understand those tests and it made sense for that particular change their default approach is to just test everything.
00:12:48.440 --> 00:13:04.466
I actually don't think it's that bad it is something that you should look at as your project gets really big But your unit tests should be fast and so it might be more expensive to figure out which one to run than to just run all of them.
00:13:05.059 --> 00:13:10.700
And your end-to-end tests, it's too dangerous to decide which one is relevant or not.
00:13:10.740 --> 00:13:16.460
And so it's safer just to run all of them now this isn't true forever.
00:13:16.460 --> 00:13:24.860
As the project gets really big then you can take one of these steps and you can start with just using regular expressions that's really easy.
00:13:24.860 --> 00:13:32.000
You just tell your agent use regular expressions to filter tests based on which files we're touching.
00:13:32.779 --> 00:13:49.179
And then it'll work it'll start filtering tests. It might be slightly incorrect but that's not something I would recommend that you do until your test suite starts to get out of control but there's other things we can do first to speed this up.
00:13:49.179 --> 00:13:52.840
How would you define the test getting out of control?
00:13:53.799 --> 00:13:58.460
Like, if it takes an hour? If it takes fifty minutes?
00:14:00.580 --> 00:14:15.139
I think if you've exhausted the other ways to speed it up that we haven't talked about yet and your test suite is taking more than a few minutes, then you should start digging into this.
00:14:15.379 --> 00:14:32.740
Gotcha. So maybe this is cutting down your test is not the first solution you should grab towards because it's it might affect the reliability of the thing that you're building.
00:14:29.899 --> 00:14:32.740
So, yeah.
00:14:32.860 --> 00:14:37.179
So what else what are less disruptive solutions?
00:14:37.179 --> 00:14:53.360
Yeah. While choosing specific tests amongst tests that are good is something that you should not do too quickly what you should do quickly is talk to your agent to figure out if the tests that you have are good.
00:14:53.820 --> 00:14:55.779
Because probably there's lots of shitty ones.
00:14:56.299 --> 00:15:11.759
So what is a bad test a test that's unnecessarily slow, a test that is testing something that another test already covers. Or a test that is testing something stupid, which LLMs love to write.
00:15:12.059 --> 00:15:18.419
So for example LLMs love to write tests that, like, a function has a certain name.
00:15:19.860 --> 00:15:28.000
Those kinds of tests are just plain stupid so and it's really as easy as just a conversation with your agent to identify those.
00:15:28.120 --> 00:15:36.899
Cool. Yeah, I've definitely also seen tests for old features that I've already removed that are still there. Gotcha.
00:15:33.879 --> 00:15:38.299
So those are like the type of tests that you should remove.
00:15:38.899 --> 00:15:42.159
OK. That makes sense.
00:15:38.899 --> 00:15:50.230
And let's say we've already removed the unnecessary checks and we still have a large test suite, what's next?
00:15:51.419 --> 00:15:55.299
If my conclusion is I need all these tests, what else can we do?
00:15:55.659 --> 00:15:57.580
You can run them in parallel.
00:15:58.259 --> 00:16:07.659
So maybe not all of them, but you should be able to run most of them in parallel By default, your agents are gonna be running your tests sequentially.
00:16:07.659 --> 00:16:19.159
So what that means is first your unit tests run, and then this integration test, then this integration test, and then one, two, three, four, five, each end-to-end test.
00:16:19.779 --> 00:16:36.759
Whereas what you can do is run your unit tests at the same time as your end-to-end tests, and your end-to-end tests all run at the same time and your integration tests all run at the same time, subject to the resources you have available on the machine that you're running the tests and that highlights the next issue that comes up.
00:16:40.659 --> 00:16:47.039
Yeah. I'm just curious, like how would you tell your agent to run them simultaneously?
00:16:47.759 --> 00:16:54.120
Is it just telling them, run the tests that you can simultaneously, or are there more specific instructions we can give?
00:16:55.759 --> 00:17:05.700
No. Yeah. Say make my test suite run the things in parallel that can and then it'll work.
00:17:06.759 --> 00:17:27.569
And it's a little harder So it's just not something that, gets set up automatically. But on a recent project that I, jumped on, I noticed the test suite was taking like eight minutes and then I removed some bad tests and parallelized the rest and I got it down to one minute.
00:17:28.220 --> 00:17:29.019
So.
00:17:29.039
--> 00:17:31.799
Oh, yeah. That's quite a difference.
00:17:33.660 --> 00:17:42.220
And you. Were talking about another solution before I stopped you.
00:17:43.180 --> 00:17:55.420
Yeah. So, well, I was hinting at the problem, I guess and this is the problem that I most recently ran into So, you have the tests.
00:17:56.140 --> 00:17:57.220
You want to run them.
00:17:57.880 --> 00:18:01.940
You've parallelized them, but your computer can't handle it.
00:18:03.200 --> 00:18:05.200
You're exhausting the resources on your machine.
00:18:05.380 --> 00:18:11.960
I guess the solution is run them on other machines, right but how do you do that?
00:18:12.640 --> 00:18:39.777
So, the like the kind of easy thing that people think of first is, OK, well, if I have another machine somewhere, like I have another computer in my house or a cloud machine I'll just run some of my agents over there. But it's kind of annoying to do that because then you have to think like, OK, what agent is running where which machine is more full than the other one?
00:18:40.680 --> 00:18:45.200
You're as a human becoming like an operating system trying to balance resources.
00:18:45.880 --> 00:18:48.099
And a computer is good at that.
00:18:48.200 --> 00:18:49.366
So let the computer do that.
00:18:49.980 --> 00:19:00.240
And I don't wanna have to think like of where my agent is running. I just wanna run my agents where my computer is, It's nice.
00:18:56.160 --> 00:19:04.779
I like running agents on my laptop. I have all my tools set up, I have browsers that are logged in as me.
00:19:05.059 --> 00:19:07.160
I have everything the way that I want it.
00:19:07.700 --> 00:19:10.519
And I want my agents running on my laptop.
00:19:10.519 --> 00:19:12.061
And actually, that's not the problem.
00:19:12.400 --> 00:19:22.500
Like if even when I'm running lots of agents I can run a hundred agents at the same time on my computer. It's fine.
00:19:20.000 --> 00:19:24.619
The problem is when the agents actually do something, it's the tool calls.
00:19:25.799 --> 00:19:32.359
So what would be nice is what if we just offload the tool calls to another machine to speed it up?
00:19:33.980 --> 00:19:35.400
Without moving the agents.
00:19:36.079 --> 00:19:37.163
Without moving the agents.
00:19:37.680 --> 00:19:38.680
Cool. What is it?
00:19:39.019 --> 00:19:52.579
So, there's this tool called Crabbox so Crabbox was made by Peter Steinberger and the OpenClaw team, that's why it's called Crab.
00:19:53.920 --> 00:19:55.759
And it literally does this.
00:19:56.480 --> 00:20:25.551
So Crabbox handles pushing your local state over to a remote machine to do expensive work and then bringing that state back to your local machine. And it keeps track of which machines are, like, full of work and queues the work as needed and it does everything that you'd wanna do.
00:20:26.039 --> 00:20:27.759
And it's great. I started using it.
00:20:27.940 --> 00:20:34.859
It solved this problem that I ran into in my Electron project. And now, I can run my test suite in peace.
00:20:34.859 --> 00:20:36.339
It actually runs faster than before.
00:20:36.339 --> 00:20:38.200
I'm running it on my DGX Spark.
00:20:38.200 --> 00:20:44.079
I have just like little mini computer that's like sitting in my house.
00:20:40.539 --> 00:20:52.519
And when I push my test suite to there, I can run more tests in parallel than on my laptop because there's more resources.
00:20:53.180 --> 00:21:01.400
And most importantly, my machine doesn't get bombarded with like things exploding, my RAM doesn't fill up. It just solves the problem.
00:21:01.539 --> 00:21:10.039
Right. Is Crabbox only useful if you have like a DGX Spark at home or could you use old computers or cloud machines for it too?
00:21:10.859 --> 00:21:17.240
Yeah. Any old computer you have you can set up, you can spin up cloud machines you can have a cluster.
00:21:17.240 --> 00:21:20.839
You can have all your computers, you can mark which ones of them are Mac or Linux.
00:21:21.200 --> 00:21:26.200
You can have some jobs that you like prefer to send to Macs. You can have jobs where you don't care.
00:21:26.660 --> 00:21:32.940
So all of this is sort of built into Crabbox I think practically there's no limit.
00:21:32.940 --> 00:21:39.440
I'm sure like no no human is gonna use more than Peter is. So if it's working for Peter...
00:21:40.319 --> 00:21:41.778
Do you know how many Peter's using?
00:21:42.920 --> 00:21:53.000
No, but probably a hundred plus. This will scale, and it'll also scale across teams, which is cool.
00:21:53.400 --> 00:22:10.799
So if you have a team of people working together on something, You can have a pool of machines that are shared amongst people. Like a mix of cloud machines and local machines. Yeah
00:22:11.380 --> 00:22:22.519
Couldn't I just tell my agent without Crabbox, like, oh here's my if I had one, DGX Spark, use DGX Spark for the tool calls, the tools.
00:22:23.859 --> 00:22:42.319
You can. But a good design of this thing is using a mix of Git to like clone the project and rsync which is another like tool for syncing data it's doing stuff over SSH.
00:22:42.519 --> 00:22:48.599
You have to keep track of which resources are in use it ends up growing in complexity.
00:22:48.599 --> 00:23:06.240
So your agents can build anything, right but there will be little bugs, I think, if you build it yourself so it's nice to use open source tools that a lot of people are using because the bugs will have been ironed out. So.
00:23:06.240 --> 00:23:18.920
Right. Because if you want to orchestrate the additional execution capacity, like the additional machines, there may be more things than meets the eye.
00:23:19.940 --> 00:23:26.980
More things to monitor, more things to take into account OK, and Crabbox helps with it.
00:23:27.539 --> 00:23:28.900
How do you set up Crabbox?
00:23:29.819 --> 00:23:37.759
Just install it on all the machines and then tell your agent use Crabbox to offload my
tests.
00:23:35.380 --> 00:23:52.660
And that's it what will happen is you know your agent will kind of change the way that tests are run or your build is run depending on what you wanna offload so that it, runs things through Crabbox.
00:23:54.579 --> 00:23:55.859
And it'll work.
00:23:56.180 --> 00:23:59.339
So I guess offloading can give you more resources.
00:23:59.779 --> 00:24:07.642
Are there also any other approaches for minimizing the tool call time outside of the things that you've already mentioned?
00:24:07.960 --> 00:24:24.480
Yeah. So the other thing you can do if you wanna keep your build, your tests is you can use or create faster tools that do the same work.
00:24:27.140 --> 00:24:29.599
Do you have examples?
00:24:27.140 --> 00:24:29.599
It sounds very high effort.
00:24:34.140 --> 00:24:35.900
It requires one extra prompt.
00:24:37.160 --> 00:24:41.960
OK, so all these things depend on the tech stack you're using.
00:24:41.960 --> 00:24:45.607
But if you're building a web app, that's like the default that people are doing these days.
00:24:45.980 --> 00:24:59.559
By default, your agents probably pick ESLint because it's more popular or it's more kind of well-known and established. But Oxlint is way faster, a hundred times faster, as a linting tool.
00:25:00.039 --> 00:25:23.200
So you should use Oxlint for example, there's like Bun versus Node.js, there's different React bundlers, so there's all these things if you just add something to your prompt when you're discussing the tech stack with your agent and say hey use the fast tools instead of the slow ones for my lints, my tests, my bundles, whatever
00:25:24.299 --> 00:25:32.339
This is for JavaScript, but you feel we should prioritize speed over popularity or the size of an ecosystem.
00:25:32.339 --> 00:25:33.400
Yeah, I do.
00:25:34.299 --> 00:25:49.200
And I think this even extends to there was a very experimental recent work from both Theo and Bun, like within the same week.
00:25:49.960 --> 00:25:56.180
They rewrote TypeScript in Rust, and it's like two to five times faster.
00:25:57.180 --> 00:25:58.721
And you know what? You should use it.
00:25:59.200 --> 00:26:14.579
If it works in your code base, it'll speed up your agents. But like, building a linter is actually not that much work I actually built my own fast linter for Swift, like in February this year.
00:26:11.000 --> 00:26:17.480
Basically, the Swift ecosystem doesn't have a robust linting story.
00:26:17.480 --> 00:26:28.339
It's just not many people are using it, I guess there hasn't been effort in making a linting ecosystem with a fast lint tool.
00:26:28.720 --> 00:26:39.680
And so I was able to just, work with my agent to say, OK, figure out what Oxlint did that sped up JavaScript linting so much, and let's do the same thing for Swift Linting.
00:26:40.559 --> 00:26:43.740
And what was the performance difference after you built that tool?
00:26:45.480 --> 00:27:09.250
So the linter I don't wanna, like, shame existing Swift linters, but I'll just say, like, typical mainstream Swift linters take, like, five to ten seconds on the order of that to like lint, files in your project which is like really unacceptable for linting because it should happen really often.
00:27:09.759 --> 00:27:33.740
And my linter works more like a hundred milliseconds. So it's Yeah. So it sounds crazy you know it's something that you would very rarely attempt in the olden days before agents but now it's not crazy to try these things anymore.
00:27:34.839 --> 00:27:38.579
Especially if that linter or something you could re-use across projects.
00:27:40.720 --> 00:27:42.019
I assume.
00:27:42.960 --> 00:27:45.119
Yeah, I can use it for all my Swift projects now.
00:27:45.119 --> 00:27:56.019
So, do you have like more examples of things that people could try to speed up the tool call phase?
00:27:52.960 --> 00:28:11.380
So I guess you could build faster tools, maybe there's ways to increase the performance specifically on your hardware Do you have, like, more examples of things that people could do?
00:28:12.019 --> 00:28:18.599
Yeah, I guess that's sort of another I think an interesting point just to like double-click on.
00:28:18.880 --> 00:28:43.579
Like you can optimize for your specific machine so like lot of these tools might be optimized for like any arbitrary Mac or Linux machine but you can probably squeeze extra juice out of it if you fork it and optimize it for like my M5 Mac I think anytime you have something slow.
00:28:43.579 --> 00:28:53.220
So another good example is like if you have any ML inference in your, in your tool stack.
00:28:53.720 --> 00:29:28.180
So for example in our podcast editing workflow we run a transcription step over our audio files. And I took an open source transcription tool and I just told my agent, like, make it fast with MLX and it sped up five X, and that saves real time. So for example kernel optimizations, would also fall under this.
00:29:30.160 --> 00:29:37.740
How would you decide whether spending time on doing kernel optimizations or rewriting a tool is really worthwhile?
00:29:38.220 --> 00:29:41.099
I think tokens are more abundant than ideas.
00:29:41.559 --> 00:29:58.220
By that I mean, for many folks if you have any extra tokens you should be using them on these crazy ideas because maybe one out of five of them will work.
00:30:00.500 --> 00:30:03.539
Probably one out of five of my crazy ideas work, I would say.
00:30:03.539 --> 00:30:09.680
Oh, you mean like crazy ideas in general, not like these faster tools.
00:30:10.619 --> 00:30:13.720
You're not saying like, OK, I build five tools and only one out of five works?
00:30:15.420 --> 00:30:17.200
Or is that what you mean?
00:30:17.420 --> 00:30:23.019
I'd say one out of five of my crazy tooling ideas are working. Something like that.
00:30:24.279 --> 00:30:29.599
That sounds more effort than what you said, like, OK, just tell the agent one sentence and it'll build it.
00:30:31.079 --> 00:30:39.279
It's not quite one. If you're building your own, my fast linter was not a one sentence prompt.
00:30:39.279 --> 00:30:44.980
It was like hour session planning with my agents and like coming up with the design and all that.
00:30:45.099 --> 00:30:52.099
Yeah. And if you're using a normal mature ecosystem, there's already gonna be fast tools.
00:30:52.380 --> 00:30:59.420
And then it's really a one sentence prompt because it's just like, hey, prefer the fast versions of these tools.
00:31:00.420 --> 00:31:11.440
It's pretty interesting. So if we take a step back and make this actionable, suppose I'm using coding agents and I'm noticing I'm spending a lot of time waiting for feedback.
00:31:12.859 --> 00:31:18.240
What is a good order to approach the optimizations?
00:31:18.819 --> 00:31:30.559
Discover, cull bad tests, parallelize, use fast tools, offload, and then build.
00:31:32.380 --> 00:31:38.680
Right. That makes sense. I wonder how much, especially the last few steps, are overengineering.
00:31:39.599 --> 00:31:41.099
When would it be overengineering?
00:31:41.259 --> 00:31:50.460
I guess if I'm working on a hobby project, maybe it doesn't matter. Maybe we don't need to, like, make it a whole project to create a faster checker.
00:31:51.019 --> 00:31:53.119
If you have tokens, you should do it.
00:31:53.539 --> 00:31:55.500
Be wild.
00:31:53.539 --> 00:31:55.500
Overengineering is dead.
00:31:55.559 --> 00:31:58.920
There is no overengineering because your agents work tirelessly.
00:31:59.940 --> 00:32:01.359
Any idea you have, you should do.
00:32:02.079 --> 00:32:03.519
OK, until you run out of tokens.
00:32:03.900 --> 00:32:06.480
And then prioritize them, I guess.
00:32:07.740 --> 00:32:12.480
OK, thank you, Brandon. This was a fun conversation to have.
00:32:09.660 --> 00:32:17.140
So, I guess for the listeners, your coding agent might be spending more time verifying code than writing it.
00:32:17.440 --> 00:32:22.579
So, next time your agent is taking a long time, take a look what it's actually waiting on.
00:32:22.579 --> 00:32:29.880
And then you might find that the biggest speed improvement has nothing to do with the model that you're using, but it's actually the engineering feedback loop.
00:32:30.700 --> 00:32:33.079
So, now you have ways to solve that.
00:32:33.259 --> 00:32:45.079
All right, so we're Superlinear and every week we share emerging practices for building with coding agents. And next week we'll share some other insights with you again that can improve your workflows. See you then.
00:32:46.279 --> 00:32:47.154
Thanks for listening.