Skip to content

Cheapest REA Setup YET! (Deepseek V4.1+LeanREA)

Read the Portuguese translation →

Author: AICodeKing · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Cheapest REA Setup YET! (Deepseek V4.1+LeanREA) · Channel: AICodeKing · 07:50 · Watch on YouTube

Topics: AI agents, Cybersecurity and software security, AI developer tools, Markets and economy, AI models

The video presents a low-cost reverse-engineering setup combining Lean REA, DeepSeek V4.1 Flash, and Panda Code. Lean REA replaces REA’s large MCP tool layer with a small skill file that guides an agent to run local commands, reducing context use and, in the creator’s benchmark, improving speed and cost. The creator compares DeepSeek’s token prices with Sonnet and Opus, then demonstrates installing and using the tools to investigate an app’s search feature. DeepSeek is described as capable and inexpensive for routine work, though less strong than Opus on the hardest tasks, and the creator cautions viewers about data privacy and peak-hour pricing.

  • Lean REA is an 18-kilobyte skill file that provides commands and guidance for reverse-engineering tasks, instead of loading REA’s 207 tools.
  • In the creator’s benchmark with Sonnet 5.5, Lean REA was 38% faster, 35% cheaper, and used 56% fewer turns than REA, with the same accuracy.
  • DeepSeek V4.1 Flash is presented as fast and capable for agent work, and as not refusing ordinary reverse-engineering requests.
  • At off-peak rates, DeepSeek V4.1 Flash is quoted at $0.15 per million input tokens and $0.60 per million output tokens; prices double at peak hours.
  • The creator estimates that a Lean REA benchmark run costing $2.17 on Sonnet might cost around 16 or 17 cents on DeepSeek, while noting that this was not tested directly.
  • Panda Code supports DeepSeek through its DSH harness and provides an interface with a Git panel, terminal, task board, and usage and cost visibility.
  • The setup requires installing Panda Code and the DeepSeek harness, adding an API key, installing Lean REA, then selecting DeepSeek V4.1 Flash with maximum thinking effort.
  • In the demonstration, the agent extracts an app archive, searches code and hidden folders, locates native functions and IPC channels, and labels claims as seen, inferred, or unknown.
  • The creator notes that Opus 5.5 performs better on the hardest tasks and advises checking whether sending private company code to DeepSeek is acceptable.
Start Chapter Summary
00:03 Why use Lean REA with DeepSeek The creator explains REA’s growing use and refusals, then introduces a cheaper setup based on Lean REA, DeepSeek V4.1 Flash, and Panda Code.
01:05 The three parts of the setup The video describes Lean REA’s lightweight command guidance, DeepSeek’s agent capabilities, and Panda Code’s support for the model.
03:08 Pricing comparison and estimated cost The creator compares DeepSeek’s token prices with Sonnet and Opus and estimates the cost of a benchmark run, with caveats.
04:43 Installation and live demonstration The video walks through installing the tools and uses Lean REA with DeepSeek to trace an app’s search feature.
06:48 Limitations and final assessment The creator discusses DeepSeek’s limitations, privacy and pricing cautions, and why this setup suits routine reverse-engineering work.

It is 1 8 kilobyte skill file. — 01:35

With LeanRaya, it was about 34,000. — 02:06

So, you go from a setup that refuses the task to a setup that does the task for pennies — 04:43

DeepSeek V4.1 Flash is not the smartest model out there. — 06:48

But for this kind of work, this setup just makes more sense. — 07:18

REA, Lean REA, DeepSeek V4.1 Flash, Panda Code, DSH, Claude Code, Codex, Opus 5.5

00:03 Hi. Welcome to another video. So, if you have been following my channel, you know the REA story by now. REA, which means reverse engineer anything, blew up on GitHub with more than 270,000 stars. Then I made a video saying that it is not that useful. And after that, I built Lean REA, which is one small skill file that does the same job faster and cheaper. But now something else has happened. Claude code and Codex have started blocking REA style prompts. You ask the agent to pull apart an app

00:34 and trace how a feature works. And instead of doing the work, it stops and refuses. And honestly, you know what people were doing with it, so I kind of get why. It got really big, really fast, and the model providers were always going to react at some point. The problem is that a lot of this work is completely normal. You want to understand how an electron app talks to its native add-on. You want to check what version of a library is inside a binary that you ship. You want to debug something that you do not have the source for. And now that kind of request can get

01:05 caught in the same net. So, in this video, I want to show you a setup that still works for this, and it is also way cheaper. That is Lean REA with DeepSeek V4.1 flash running inside Panda code. So, let’s get right into it. There are three pieces to this setup. The first piece is Lean REA. If you did not see that video, here is the short version. REA is an MCP server with 207 tools. Under the hood, it mostly calls tools that are already on your machine, like asar for electron apps, o tool and nm

01:35 for Mac binaries, go version -m for go binaries, and jad jad for Android. Lean REA removes that whole layer. It is 1 8 kilobyte skill file. It tells the agent which command is fastest for each kind of target. It gives it ready commands to paste and run, and it lists the small traps that the model can miss. The agent then just runs the real tools in its normal shell. In my benchmark with Sonnet 5.5, Lean REA was 38% faster than REA, 35% cheaper, and it used 56% fewer turns

02:06 with the same accuracy. And because it has no tools, it barely touches your context. With all of REA’s tools loaded, one simple reply okay message used about 400,000 tokens. With LeanRaya, it was about 34,000. That last part matters a lot for this video. Because when you move to a cheaper model, you do not want to waste it on 400,000 tokens of tool definitions before it even starts. The second piece is DeepSeek V4.1 flash. I have tested it a lot on this channel. It got 81.25%

02:36 on KingBench 3 with thinking at max, which put it above my older V4 Pro result and tied with Gemini 3.8 flash. It is also fast. And it is really good at agent work because DeepSeek trained it across many coding harnesses, including their own. And it does not get scared by normal reverse engineering work. You can ask it to extract an app, search the code, read disassembly, and explain what it finds, and it just does the job. The third piece is Panda Code. That is my desktop app for coding agents. It runs Claude Code, CodeX, Kimmy, Open Code, and a lot more in one window. And

03:08 it also supports DeepSeek directly through DeepSeek’s own harness, which is called DSH. So, you get the nice interface, the Git panel, the terminal, the task board, all of that. But the model doing the work is DeepSeek V4.1 flash. Now, let’s talk about the price difference because this is where it gets kind of crazy. Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens. Cached input is 20 cents per million. Opus 5.5 is double that, $4 for input and $20 for output. DeepSeek V4.1 flash

03:41 at off-peak hours costs 15 cents per million input tokens and 60 cents per million output tokens. And cached input is 3/10 of 1 cent per million. At peak hours, these prices double. So, 30 cents for input and $1.20 for output. So, at off-peak, DeepSeek is about 13 times cheaper than Sonnet on input and almost 17 times cheaper on output. On cached input, it is about 67 times cheaper. And if you compare it to Opus, double all of those numbers, and cached input

04:12 is the big one for agents. An agent sends the same context again and again on every turn. So, most of your tokens end up being cash reads. That is exactly where DeepSeek has the biggest gap. Let me put that in real numbers. My whole Lean RYE benchmark run on Sonnet cost $2.17. Now, I have not run the same benchmark on DeepSeek yet, and a different model will use a different number of tokens, so take this with a grain of salt. But, even if you use the most careful ratio of 13 times, that same amount of work comes to around 16 or 17 cents.

04:43 And because most of it is cash reads, the real number would likely be even lower. So, you go from a setup that refuses the task to a setup that does the task for pennies, which is just amazing. Now, let’s set it up. First, install PandaCode. Go to the PandaCode GitHub page, open the releases, and download the file for your system. I have a full video on it, which will be linked below. Next, install the DeepSeek harness. Open your terminal and run npm install -g @deepseek-ai/dsh. PandaCode finds it and runs it for you in the background. Then, add your

05:14 DeepSeek API key. In PandaCode, go to settings, then providers, and paste your key there. You can also set it as the DEEPSEEK_API_KEY environment variable. Your key stays in your computer’s keychain, and PandaCode only sends it to DeepSeek. Now, install Lean RYE. In your project folder, run npx skills add ai-cocking/lean-rye. It asks which agents you use. If you want it in every project, add the -g flag. Now, open your project in PandaCode, start a new task, and in the

05:46 model picker choose DeepSeek and pick v4.1 flash. Set the thinking effort to max. This matters a lot. When I tested this model with thinking off, the score dropped by almost 30 points. Then, type a slash, and you should see Lean RYE in the list. If your setup does not show it there, that is fine, too. Just tell the agent to read the Lean RYE skill file first. It only 8 kilobytes, so it costs almost nothing. Now, let’s give it a task. I’ll type /linear. How does the search feature in this app work? Show me the evidence. Now, watch this. It checks the file type first, then it

06:16 extracts the app.asr file. It searches the code with Ripgrep using the UU flag, so it also looks in hidden folders. Then it finds the native function, the class that controls it, and the IPC channels. And it marks each claim as seen, inferred, or unknown. It also goes ahead and runs a ton of commands in one go because the skill tells it to batch small checks into one shell call. That is why it finishes in so few turns. And in PandaCode, you can see every command it ran, every file it touched, and how many tokens it used. You can even see an estimate of what the run would cost at

06:48 API prices. So, you’re not guessing. Now, let me be fair here. DeepSeek V4.1 Flash is not the smartest model out there. On the hardest tasks, Opus 5.5 still does better. So, if you have a really deep disassembly problem, you may need more turns, or you may need to guide it a bit more. Also, your code goes to DeepSeek servers. If you’re working on something private for a company, check if that is okay first. There is also peak and off-peak pricing. If you run big jobs, try to run them at off-peak hours because the price is half. So, what do I think? I think this is the best way to

07:18 do this kind of work right now. Linear gives the model the right commands without wasting context. DeepSeek V4.1 Flash is smart enough to use them. It does not refuse normal work, and it costs a tiny fraction of Sonnet or Opus. And PandaCode puts it all in one window with the cost tracking and the file changes right there. Claude Code and Codex are still great, and I still use them for a lot of things. But for this kind of work, this setup just makes more sense. Overall, it’s pretty cool. Anyway, let me know your thoughts in the comments. If you like this video,

07:50 consider donating through the Super Thanks option or becoming a member by clicking [music] the join button. Also, give this video a thumbs up and subscribe to my channel. I’ll see you in the next one. Until then, bye. >> Mhm.