---
title: How to Set Up Lean REA, Agent Browser and DeepSeek in Panda Code
url: "https://goremy.ai/blog/articles/lean-rea-agent-browser-deepseek-setup"
author: Luis Chavez-Mattos
editor: Luis Chavez-Mattos
editor_title: Director, Product
published: "2026-11-29T23:20:16.839Z"
updated: "2026-11-29T23:20:16.839Z"
topic: AI Coding Tools
description: Set up Lean REA, Agent Browser and DeepSeek V4.1 Flash in Panda Code so an AI agent checks what app code says by driving the running app.
---

# How to Set Up Lean REA, Agent Browser and DeepSeek in Panda Code

> Set up Lean REA, Agent Browser and DeepSeek V4.1 Flash in Panda Code so an AI agent checks what app code says by driving the running app.

Edited by Luis Chavez-Mattos, Director, Product · Published 2026-11-29

## How do I set up an AI agent that reads an app's code and then checks it on the running app?

Install four things: Panda Code (the agent app), the DeepSeek harness called DSH (DeepSeek's own agent loop), Agent Browser from Vercel Labs (a command line tool that clicks through a running app and reads its network traffic), and the Lean REA skill (instructions for taking an app apart). Then pick DeepSeek V4.1 Flash with thinking set to max and ask it to find out what a feature does and prove it on the live app. Code findings start as "inferred" and become "seen."

## TL;DR

- **Reading code is not the same as watching it run.** An agent that only reads files can tell you what a button probably does, but it cannot confirm the real request, its order, or its data.
- **Agent Browser closes that gap.** It lets the same agent open the running app, click through it, and list the network requests as they happen.
- **Electron apps can be driven like web pages.** Start one with a remote debugging port and Agent Browser connects to it.
- **Panda Code's skills manager makes setup short.** You add the Lean REA and Agent Browser skills from one settings page instead of copying folders between agents.
- **The cost is cents, not dollars.** DeepSeek V4.1 Flash is priced low enough that a full teardown, per the creator's demo, costs a few cents.
- **Use it only on apps you are allowed to test.** Close the debugging port afterward, and remember your code goes to DeepSeek's servers.

## What problem does this setup solve?

Reverse engineering means working out how software behaves when you don't have the original design documents. A common reason to do it at work: you need to understand a vendor tool, debug your own app, or check what data an app sends out.

An AI agent can already do part of this. A reverse engineering skill called Lean REA reads an app, extracts the code, searches it, and explains how a feature should work. But much of what it reports has to be labeled "inferred." The code says a button calls some endpoint. Does it actually? With what data? In what order?

Adding a tool that can run the app and watch it turns those guesses into evidence. The agent reads, forms a hypothesis, then tests the hypothesis on the live app by itself.

## What does each piece do?

| Piece | What it is | Its job here |
|---|---|---|
| Panda Code | The desktop agent app | Interface with a Git panel, terminal, file changes and cost tracking |
| DSH | DeepSeek's own agent harness | Runs the agent loop the model was trained to work inside |
| DeepSeek V4.1 Flash | The model | Does the reasoning and runs the commands |
| Lean REA | An 8 KB skill file | Tells the agent which real command to run for each kind of target |
| Agent Browser | A Rust command line tool from Vercel Labs | Opens and drives the running app, reads network calls |

A few details on each.

**Lean REA** replaced an earlier approach, an MCP server (a plug-in style connector for AI tools) with 207 tools, most of which just called programs already on your computer. Lean REA drops that layer. It points the agent to the right existing command for each target: asar for Electron apps, otool and nm for Mac binaries, JADX for Android. In the creator's own benchmark it was 38% faster and 35% cheaper than the older version at the same accuracy. That is one person's test, so treat it as a sign of direction rather than a guarantee. Run it on a target you know well before you trust it on one you don't.

**Agent Browser** is a small command line program. The agent calls it the way you would call any other terminal command. It can open a page, take a snapshot of what is on screen, click or type into elements, and list the network requests the page made. Because it is a plain command, any agent that can run a terminal can use it. No special plug-in is needed.

**DSH and DeepSeek V4.1 Flash** are the engine. A model usually behaves best inside the loop it was trained in, which is why Panda Code offers DSH as an option. Flash is the cheaper, faster model in the family. In the creator's test, turning thinking off dropped the score by almost 30 points, so keep it set to max for tasks with many steps, such as unpacking an app, searching it, and then testing a guess.

**Panda Code** ties these together. It gives you one place to see which files changed, what the terminal is doing, and what each run costs, so you are not guessing about spend.

## How do I set it up step by step?

1. **Install Panda Code.** Open it and sign in or add your DeepSeek API key in settings. Your code also goes to DeepSeek's servers, so check that first if the work is private.
2. **Choose the harness.** In the agent or model settings, select DSH so the model runs inside its own loop.
3. **Pick the model.** Select DeepSeek V4.1 Flash and set thinking to max.
4. **Open the skills manager.** In Panda Code's settings, find the skills page. Add the Lean REA skill and the Agent Browser skill from there. This is the step that saves time: you do not copy skill folders from one agent's directory to another.
5. **Install the Agent Browser tool itself.** The skill is only instructions. The command line program must also exist on your machine. Follow the install instructions in the Vercel Labs repository, then run its help command in a terminal to confirm it responds.
6. **Open a project folder.** Point Panda Code at an empty working folder, so the agent has a safe place to put extracted files and notes.
7. **Run a small test first.** Ask the agent to list the skills it can see. If both Lean REA and Agent Browser show up, you are ready.

If a skill does not appear, restart the app and check that the skill file landed where the skills manager says it did. Most setup trouble comes from a missing command line install, not from the skill.

## How do I let the agent drive an Electron app?

Electron apps are desktop apps built on web technology, so they can expose the same debugging hook a Chrome tab does. You start the app with a remote debugging port, and Agent Browser connects to that port.

1. Quit the app completely.
2. Launch it from a terminal with a flag such as `--remote-debugging-port=9222`. On a Mac this usually means running the executable inside the app bundle directly.
3. Tell the agent the port number and that the app is already running.
4. The agent connects, takes a snapshot of the window, and can then click, type and read the network calls.

Some apps block or ignore this flag, and some are packaged in a way that makes launching from a terminal awkward. If the connection fails, ask the agent to report the exact error before it tries workarounds.

## What does a worked example look like?

Say you want to know what happens when you press "Sync" in a desktop notes app you are allowed to test.

**Prompt:** "Use Lean REA to unpack this app and find what the Sync button does. Then use Agent Browser on the running app to confirm it. Mark each claim as inferred or seen."

**What the agent does:**

1. It extracts the app's packaged code with the right tool and searches for "sync."
2. It finds a function that appears to send a request to an endpoint with a token and a list of note IDs. It records this as **inferred**.
3. You start the app with the debugging port. The agent connects, clicks Sync, and reads the network list.
4. It reports that one request went to the endpoint, with the fields it expected, followed by a second request the code reading missed. The first is now **seen**. The second is a new finding.

The second request is the payoff. Code reading alone would have given you a tidy but incomplete story. Watching the app caught the part the static view missed. In the final report, ask the agent to include a short table with each claim, its status, and the evidence, such as the request URL or the file and line.

## How much does it cost, and what are the limits?

The creator's demo put a full teardown at a few cents with Flash. Your number depends on app size and how long the agent explores, so use Panda Code's cost tracking to watch the first few runs.

Limits to keep in mind:

- The agent can still be wrong. "Seen" means it observed something in one session, not that it holds in every case.
- Apps that need a login, a paid account or special hardware may stall the agent. Give it test credentials, never your real ones.
- Network traffic can contain tokens and personal data. Do not paste agent output into public places without checking it.

## What should I do about safety and permission?

Only test software you own or have written permission to examine. Many licenses forbid reverse engineering, and rules differ by country. Close the debugging port when you are finished, because an open port lets any program on your machine control the app. Also remember that code and traffic the agent reads are sent to DeepSeek's servers, so avoid anything confidential unless your company has approved that.

## Where does Remy fit in?

Once you understand how an existing app behaves, you often want to build your own version or a replacement. [Remy](https://goremy.ai) is an AI that builds and deploys business apps from a description, so the findings from a teardown, such as which fields a sync request needs, can go straight into a plain-language brief for a new app.

## FAQ

### Do I need to know how to code to use this?

Not much. You need to be comfortable opening a terminal, running an install command, and reading the agent's report. The agent runs the technical commands for you.

### Why not just read the code and trust it?

Code shows what could happen. It does not show which path runs, what data is real, or what order things happen in. Running the app turns "inferred" claims into "seen" ones.

### Does Agent Browser only work on websites?

No. It works on web pages, and it can also connect to Electron apps that were started with a remote debugging port.

### Why use DeepSeek V4.1 Flash instead of a bigger model?

Flash is cheap and fast, and with thinking set to max it handles multi-step tasks well. The creator reports a full teardown costs a few cents. You can switch models if a task proves too hard.

### Is the 38% faster and 35% cheaper result reliable?

It comes from the creator's own benchmark, so treat it as a single data point. Test it on your own targets before relying on it.

### Is it safe to leave the debugging port open?

No. Close it when you are done. While it is open, other programs on your machine may be able to control the app.

### Where does my data go?

The agent sends prompts and any code or traffic it reads to DeepSeek's servers. Do not use confidential material unless that is allowed in your organization.
