[KongchangAI]
· 3 min read· 1,718 words

Dissecting the 270k-Star DeepSeek Harness: From Pluginized Loop to Self-Evolution Ambitions

Dissecting the 270k-Star DeepSeek Harness: From Pluginized Loop to Self-Evolution Ambitions

Dissecting DeepSeek Harness: the design, costs, and self-verification of the half beyond the model.

The article introduces a Bilibili series dissecting DeepSeek Harness—the open-source agent framework beyond the model that reads files, runs commands, manages sessions, assembles context, and provides the UI, aiming to let agents self-evolve and write new plugins at runtime. Across 22 episodes in six segments, it teases six threads: the agent loop itself is a plugin, every request must be reconstructable from the session log, prefix cache hits are merely a corollary of the accounting rule, the official API uploads session logs by default, many commits appear to involve AI, and none of the 42 NPM versions is stable yet Super Agent is already discussed. Evidence is tagged with four tiers of footnotes, and verifiability itself is framed as a design goal, encouraging readers to reproduce conclusions with commands and line numbers.

On Bilibili, the official account onboarding video for DeepSeek Harness once racked up about 4.59 million views, with many in the comments calling it "Big Fat Fish"—what's in its belly isn't a model, but an entire toolbox. This series aims to take that box apart layer by layer: why it's designed this way, what the costs are, and how you can verify it yourself.

What Harness Is: The "Other Half" Beyond the Model

The repository README states it plainly at the top: DeepSeekAd Harness is an open-source Agent Harness developed by DeepSeek AI. The model does the thinking on the server, but reading files, running commands, and remembering what was discussed—these actions need something else to perform them on its behalf. That something is the Harness.

Drilling down a level, the root-level agents.md lists the code by group: model-facing, command-running, session-managing, context-assembling, and the interface. That other half beyond the model is what this series will dissect block by block.

This is what we're taking apart

It's worth noting a bigger ambition: letting the agent write new parts for itself at runtime. The "Creation Mode" in the web interface says exactly that—letting the agent write plugins, add new features or UI. The opening demo video shows precisely this scenario. This design has a name: the "self-evolving Harness," and the paper linked in the README cites it as a motivation.

Agent Harness is a common term in agent engineering, referring to the runtime framework wrapped around a language model that is responsible for grounding the model's capabilities in a real environment. A typical Harness handles at least four kinds of responsibilities: tool invocation (translating the model's intent into concrete actions like reading files, executing commands, or making network requests), session and state management (persisting multi-turn conversations, assembling and truncating context windows), error handling and retries, and exposing an interface or API to the outside world. It is decoupled from the model itself, so the same Harness can host different models, and the same model can run on different Harnesses. Industry examples commonly cited—Claude Code, OpenHands, SWE-agent—can all be regarded as products of this kind.

Understanding this is crucial: the model's "smartness" is only the ceiling, and the Harness determines how much of that ceiling can be realized. How context is organized, how tool descriptions are written, and how failures are fed back to the model all significantly affect final task success rates. So dissecting a Harness isn't looking at peripheral accessories—it's looking at the other half of the system that determines actual performance.

Six Items Before We Start: Threads Teased but Not Unpacked

Before the formal teardown, the series lays out six "things we found," grouped into three piles: one plug, three ledgers, and two on how it's built and where it's headed. They're scattered across the four-segment path of the 22-episode season—three episodes of panorama, three of foundations, four of core, five of capabilities, three of plugins and ecosystem, two of methodology, and two of the future—each segment dissected until it can be stated in one sentence.

Item one: even the agent loop itself is a plugin. In the configuration it's just an entry that can be pulled out and replaced with one you write. Episodes three and four specifically examine why it can be pulled.

See why it can be pulled

Item two: every request sent to the model must be reconstructable from the session log. The repository makes this a hard rule; episode six covers this ledger.

Item three: prefix cache hits are a side effect of that accounting rule. The design notes call it "Corollary No. 1," not the headline—don't get the causal direction backwards; episode seven does that math.

Item four: when using the official DeepSeek API, session logs are uploaded with requests by default. The docs say both that it's on by default and how to turn it off; episode eight goes into detail.

Item five: from June 10 to November 4 there were 25,848 commits, at least 238 of which are PRs from branches starting with Codex. How much of this code was written by AI? Git can't give a percentage. Episode sixteen dissects its engineering methodology.

Its engineering methodology

Item six: none of the 42 versions on NPM is a stable release, yet on October 31 the official channel published an article about Super Agent, opening with a disclaimer that it isn't an introduction to existing product features. Episodes eighteen and nineteen cover these two.

Agent loop is the heart of the Harness: it repeatedly executes the cycle of "send the current context to the model → parse the model's returned tool calls → execute the tools → append the results back to the context" until the model gives a termination signal or hits step or time limits. The loop itself doesn't produce intelligence, but it determines what the model can see at each step, what it can do, and whether it can self-correct after failure.

Most frameworks hard-code the agent loop into core code because it's the hub of control flow and risky to change. DeepSeek Harness demotes it to an entry in configuration, meaning the loop's step policy, termination conditions, and even the overall scheduling logic can all be replaced. This is the most radical expression of the "everything is a plugin" philosophy, and it comes at a cost: plugin boundaries, state passing, and debugging complexity all increase. Episodes three and four examine exactly how this pluggability holds up in engineering terms.

Prefix caching is an optimization on the LLM inference side: when multiple requests share the same leading token sequence, the server can reuse that already-computed KV cache, skipping redundant prefill and thereby reducing latency and cost. It's especially important for agent scenarios, because each loop iteration resends nearly identical historical context, with only the tool results appended at the end.

But whether prefix caching hits depends on whether the request's prefix is byte-for-byte stable. If the Harness re-assembles context each round, changes the system prompt, or reorders tool descriptions, the cache misses. By making "every request must be reconstructable from the session log" a hard rule, DeepSeek Harness objectively guarantees determinism in context construction—cache hits thus become a byproduct of this accounting rule rather than a dedicated optimization target. This causal direction is precisely what episode seven sets out to clarify.

How Evidence Is Attached: Four Tiers of Footnotes and Three Cards

The series' approach is to label "evidence levels" explicitly. Every claim on screen carries a footnote in one of four tiers: official name (self-descriptions from official accounts, official articles, API Docs, and the README), repository-written (files in the repository and records Git prints verbatim), our measurement (counted or run on a specified version or date), and our inference (nobody wrote it; we inferred it). Labels containing "our" represent the organizer's own judgment; video descriptions and the original art of peer videos don't count as evidence.

The repository contains a class of design records called Agent Note, each of which must document the rejected alternatives—many "rejected cards" originate here. Unpacked, it's three cards, four tiers of footnotes, and one class of design record; each episode ends with three cards, the first being "the rejected plan." For example, episode 00's special-case card carries a constraint laid down by the published architecture doc: none of the 23 MVP features may be changed. Chapter two covers the cost—"everything is a plugin," and the Packages section alone has 370 packages. Chapter three shows how you verify it yourself: use Grab at the repository root, find Agent Loop in the Base configuration file starting at line 530, where the entire Loop is just one entry.

Find Agent Loop in the Base configuration file

Agent Note is a class of lightweight design document in the repository, typically used to record the background, constraints, and abandoned alternatives of a module or decision. Requiring every note to state "the rejected alternatives" is a way of externalizing design reasoning: readers see not only the final choice but also the paths that were weighed and discarded, and why—preventing later contributors from repeating mistakes or assuming the current approach is the only solution.

This style of record complements the series' emphasis on "verifiability." The rejected options are often exactly the questions viewers are most likely to ask—"why not just do it this way directly?" Agent Note answers in advance, and the "rejected cards" distill that content into visual original art. For anyone wanting to assess the design quality of a Harness themselves, Agent Note is first-hand material closer to the real decision process than the README.

Why It's Worth Following: Verifiability Is Itself a Design Goal

The value of this teardown method isn't in making the Harness sound mysterious, but in treating "how you verify it yourself" as a first-class citizen. In a system where even the agent loop can be pulled out and swapped, every request can be reconstructed from the log, and cache hits are merely a byproduct of accounting, the design constraints can be reproduced with commands and line numbers.

The line the series repeats is: "There's no complexity that can't be reduced by one layer of teardown—and if there is, tear down another layer." The next episode starts hands-on with that command—don't imitate it, but you can follow along as we take it apart.

One-line Summary

Dissecting DeepSeek Harness: the design, costs, and self-verification methods of the other half beyond the model.

Paragraph Summary

The article introduces a Bilibili video series that dissects DeepSeek Harness. The Harness is the open-source agent framework beyond the model responsible for reading files, running commands, managing sessions, assembling context, and the UI, with the goal of letting agents self-evolve and write new plugins at runtime. The series spans 22 episodes across six segments and teases six threads: the agent loop itself is a plugin, every request must be reconstructable from the session log, prefix cache hits are only a corollary of the accounting rule, the official API uploads session logs by default, many commits appear to involve AI, and none of the 42 NPM versions is stable yet Super Agent is already discussed. The series labels evidence with four tiers of footnotes and emphasizes that verifiability is itself a design goal, encouraging readers to reproduce conclusions with commands and line numbers.

#DeepSeek Harness#Agent Harness#agent loop#prefix caching#open-source AI agent#self-evolving harness
Share:

Related articles