DeepSeek's "Self-Evolution" Blueprint, Revealed

marsbitPublished on 2026-08-14Last updated on 2026-08-14

Abstract

DeepSeek, in collaboration with Peking University, has unveiled a new research paper titled "A Programming Paradigm for Spatiotemporal Composability," which outlines the core architecture behind its "Harness" agent platform. The paper introduces **Cordis**, a foundational "Lego-like baseboard" that enables a highly modular and composable system where **everything is a plugin and everything can be reassembled**. The core innovation addresses two major challenges for self-evolving AI agents: **temporal composability** (the ability to dynamically load, unload, and update plugins at runtime without restarting the entire process) and **spatial composability** (managing complex, dynamic dependencies between components). Cordis solves these using two key theoretical concepts adapted for dynamic environments: **revertible effects** (which allow state changes to be cleanly rolled back) and **reactive coeffects** (which enable automatic, declarative dependency resolution). This design is not merely theoretical. It has been validated over four years in the **Koishi** chatbot framework, which is built on Cordis and hosts over 4,000 community plugins. The framework demonstrates live plugin management—enabling, disabling, or updating plugins without disrupting others—and robust handling of dependencies across a decentralized ecosystem. The paper represents DeepSeek's vision for a foundational infrastructure that supports true **self-evolution** in AI agents, allowing them to dynamically...

DeepSeek 's latest collaborative paper with Peking University has lifted the veil on the Harness version of "Whale."

It's titled "A Programming Paradigm for Spatiotemporal Composability," translated into Chinese as "一套处理时空可组合性的编程范式".

It sounds a bit convoluted, but you just need to remember one sentence—

The entire text revolves around Cordis, the core of the black whale, a detachable "Lego baseplate."

Here, everything is a plugin, and everything can be reorganized.

This also explains why "Black Whale" is so open and why the official team actively encourages everyone to develop plugins and customize Harness.

It's a paper packed with information, also the culmination of the DeepSeek Harness team's long-term efforts, ultimately making a spectacular debut in the form of the Great Black Whale.

It's worth noting that this is DeepSeek 's seventh paper this year and the Nth time collaborating with Peking University.

Over eighty pages long, I went through the paper from start to finish and roughly compiled a few takeaways—

1. Cordis provides a set of universal dynamic composition semantics. Components managed through Context can be dynamically loaded, unloaded, and have their managed side effects automatically reclaimed.

2. The mathematical foundation comes from two classical concepts in type theory: effects and coeffects.

3. Not just a lab toy. This design has been running on the Koishi chatbot framework for four years, validated in production environments by over 4,000 community plugins.

And all of this serves the same ambition—

Self-Evolution.

Time and Space: The Two Hurdles for Harness Self-Evolution

There's a counterintuitive reality in the software world: most systems supporting plugins require restarting the entire host process after uninstalling a plugin.

This means that while only one plugin might be deleted, all other loaded plugins have to restart along with it.

Yes, a "plug-in" is actually plugged in and can't be pulled out.

VSCode is a typical case.

The paper states that as of June 9, 2026, among the top 100 extensions in the VSCode Marketplace, 87 contain executable code. Once activated, they cannot be individually unloaded at runtime; disabling or deleting them requires restarting the entire extension host.

This isn't a problem unique to VSCode. The paper points out that almost all plugin architectures have such defects, just to varying degrees.

In ordinary plugin systems, this is troublesome enough, but if the cost is just a restart, it's somewhat acceptable.

But in the context of Agents, it's a completely different problem.

A conventional harness is typically packed with a bunch of things: toolkits, execution environments, permission controls, sandboxes, session states, memory systems... It's an extremely complex engineering system in itself.

And now, it's met with the "Self-Evolving AI"—a mischievous Sun Wukong (Monkey King) who might accidentally modify itself out of existence.

This is also the angle from which DeepSeek 's paper approaches self-evolution:

Future Agents might generate a tool based on a task, install it into the runtime themselves, and if problems are discovered, replace it themselves.

If every time a single line of code is changed, the entire process has to be restarted, the accumulated context, cache—everything could crash.

This is called Temporal Composability.

If dependencies between modules rely on each module patching itself—checking for A today, guessing about B tomorrow... it's easy to inadvertently introduce circular dependencies, which will explode during reloading.

This is called Spatial Composability.

And these two difficulties are precisely the two problems Cordis aims to solve.

DeepSeek's Solution

First, let's supplement two mathematical knowledge points, which are also the two main theoretical pillars of this paper—

Effects and Coeffects.

Simply put, effects characterize "the program's impact on the world"; coeffects characterize "the world's constraints on the program." The two are dual concepts: effect systems enrich types, while coeffect systems enrich contexts.

But there's a problem: in the context of self-evolving AI, frameworks are dynamically loaded.

Classical effect/coeffect systems are static type system tools.

To overcome both the temporal and spatial hurdles simultaneously, the team adapted and upgraded these two concepts for Agent runtimes—"revertible effects" and "reactive coeffects."

Revertible effects target the temporal dimension.

The core definition is just one sentence: every modification to the context must have an explicit inverse function, making side effects reversible.

When loading a plugin, each state modification records the corresponding inverse function, stacking them sequentially into an "undo chain."

When unloading a plugin, this chain is executed in reverse, allowing the system state to be precisely restored to its state before the plugin was loaded.

Think of it like a stack of plates: the last one placed is the first one removed.

This way, the temporal order doesn't get messed up.

Reactive coeffects are responsible for the spatial dimension.

In Cordis, components can declare which dependencies they need, achieving resolvable dependencies.

For example, a chat plugin states it needs a message adapter and a database. It only becomes ACTIVE when both dependencies are satisfied. If one is missing, it stays INACTIVE—not rushing to start, nor running and then throwing a null reference error.

When a provider appears, dependents automatically activate. When a provider is removed, dependents stop first. After they roll back their own effects, the provider completes its unloading.

If a dependency provider unloads, dependents automatically deactivate; if the dependency comes back online, dependents automatically resume. This topological arrangement isn't manually written by developers but automatically derived from declarations.

The combination of the two constitutes the core of Cordis.

The intuitive meaning of "spatiotemporal composability" in the paper's title lies right here.

Koishi

So, has all this just been discussed been validated in practice?

Yes.

And the scale is not small.

The project used for experimental validation in the paper is a chatbot framework called Koishi.

Koishi is built on Cordis. Over four years, it has accumulated over 4,000 community plugins, covering instant messaging adapters, database drivers, admin consoles, and various user functions.

GitHub shows that Koishi is a cross-platform, extensible, high-performance chatbot framework.

Its name and icon design are inspired by the character Komeiji Koishi from Touhou Project.

Komeiji Koishi is a character known for unconscious actions. This name symbolizes the theme of chatbots and also embodies the passion developers poured into it.

A rather interesting README indeed.

So, what is Cordis?

The author of Koishi states that the name Cordis comes from the Latin word for "heart." Everything in Koishi starts from Cordis.

As a meta-framework, Cordis is not coupled to any specific domain or scenario.

The capability it provides is something most frameworks take for granted—a plugin system. But behind this system lies a goal most frameworks haven't achieved: reversibility.

And this sentence was left:

I hope it can become the core of future software (at least the software I develop).

Four years later, DeepSeek 's paper provides the validation.

First, validation of the temporal dimension.

In Koishi, an administrator can disable a plugin from the console. The plugin's impact on the system is rolled back on the spot, while other plugins continue to work.

During development, when a plugin is modified and saved, the modified plugin is reapplied, while caches and connections remain untouched.

Next, validation of the spatial dimension.

In the Koishi ecosystem, IM adapters provide message platform access, database drivers provide persistent storage, and functional plugins declare these as dependencies for direct access.

During actual operation, when switching storage backends or reconnecting adapters, only plugins whose dependencies have actually changed are reactivated. Plugins with unchanged dependencies remain completely still.

It's important to note that these plugins are typically developed independently by different authors. The only coordination between them is the reactive coeffect emphasized by Cordis.

This shows that a set of dynamic composition rules can indeed work in an open plugin ecosystem contributed by different authors.

But the paper doesn't package this case as a perfect demo either.

The team admits that currently, there's only validation data from the single ecosystem of Koishi and the single language of TypeScript, lacking controlled comparisons with alternative architectures...

But the most important thing is pointing out a new direction—a foundational infrastructure for Agent Harness serving self-evolution.

And now the released DeepSeek Harness is precisely the upgraded version of Koishi's Cordis.

Paper Author Introduction

Finally, let's talk about the paper authors as usual.

There are three in total, spanning Peking University and DeepSeek .

The first author is Yifan Shi, from Peking University and also a member of DeepSeek .

A deeper dive reveals that his name had already appeared in the DeepSeek V3 Technical Report.

The project used for validation in this new paper—Koishi—also originates from him.

Seems to have a strong attachment to "shi": real name Yifan Shi, project named Koishi, GitHub handle Shigma.

(doge)

Back on topic.

Koishi is a repository from four years ago, now with 5.7K stars. One could say this is the origin of everything.

Because the concept of Cordis was also proposed within Koishi.

In 2023, Shigma wrote a design article for the Koishi official documentation titled "Reversible Plugin System," almost the ancestor of this new paper.

Wei Zhang, also from Peking University, is an Associate Professor at the Software Research Institute, School of Computer Science, Peking University.

The school's website shows that Wei Zhang's research areas mainly cover software engineering and programming languages.

In 1999, he graduated with a bachelor's degree in Engineering Thermophysics from Nanjing University of Aeronautics and Astronautics. Subsequently, he shifted towards computer science, obtaining a Master's degree in Computer Science from Nanjing University of Aeronautics and Astronautics in 2002.

After his master's, Zhang Wei entered Peking University to pursue his Ph.D., earning a Doctorate in Computer Software and Theory in 2006.

After his doctorate, he directly took a position at Peking University and has since been engaged in research and teaching in software engineering, programming languages, and related directions.

Notably, as early as 2021 at ASE, Wei Zhang collaborated with Yifan Shi.

In 2024, the two published another ICSME paper together: "Focused: An Approach to Framework-oriented Cross-language Link Specification and Detection."

Finally, an old acquaintance.

Tianyi Cui, DeepSeek Harness Team Lead. Undergraduate graduate from Zhejiang University's Computer Science Department, junior to Wenfeng Liang.

During his studies, Tianyi Cui was admitted to Zhejiang University via NOIP/informatics competition recommendation and won gold medals in the ACM International Collegiate Programming Contest Asian Regional six times.

After graduation, he worked for nine years at Jane Street's Hong Kong and New York offices.

Paper Link: https://github.com/cordiverse/paperKoishi: https://github.com/koishijs/koishi

This article is from the WeChat public account "Qubit," author: Jay

Trending Cryptos

Related Questions

QWhat is the core concept of the Cordis system introduced in the DeepSeek paper, and what does it enable?

AThe core concept of Cordis is a 'Lego baseplate' programming paradigm for spatiotemporal composability. It enables everything to be a plugin and everything to be recombinable. Its central design allows for dynamic loading and unloading of plugins and the automatic reclamation of their side effects, serving as the foundation for agent self-evolution.

QWhat two key challenges for agent self-evolution does the paper identify, and what does Cordis propose to solve them?

AThe paper identifies two key challenges: Temporal Composability and Spatial Composability. Temporal composability refers to the inability to dynamically change code (e.g., update a tool) without restarting the entire process and losing context. Spatial composability refers to the complexity of managing dependencies between modules without creating conflicts. Cordis solves these with 'revertible effects' (for time) and 'reactive coeffects' (for space), providing a framework for safe, dynamic composition.

QWhat is 'Koishi' and what role does it play in validating the Cordis system?

AKoishi is a cross-platform, extensible, high-performance chatbot framework built on Cordis. It serves as the practical validation system for the Cordis concepts. With over 4000 community plugins developed independently over four years, it demonstrates that Cordis's dynamic composition rules for temporal and spatial dependencies work effectively in a large-scale, open-source production environment.

QAccording to the article, what is a major limitation of current plugin systems like VSCode's that Cordis aims to overcome?

AA major limitation is the lack of true runtime uninstallability. In systems like VSCode, once a plugin with executable code is activated, it cannot be individually unloaded at runtime. Disabling or removing it requires a full restart of the extension host process, which impacts all other loaded plugins and loses state. Cordis's revertible effects allow precise, on-the-fly unloading and state reversion.

QWho are the main authors of the paper, and what is their background connection to the project?

AThe three main authors are Yifan Shi (first author, Peking University & DeepSeek), Wei Zhang (Peking University professor), and Tianyi Cui (DeepSeek Harness team lead). Yifan Shi is the original creator of the Koishi framework, which is the practical foundation for Cordis. He and Wei Zhang have collaborated on previous research. Tianyi Cui brings industry experience from Jane Street to lead the Harness team applying these concepts.

Related Reads

Report: Bank of Japan Could Raise Interest Rates as Early as September, with Subsequent Pace Possibly Accelerating

According to Reuters, the Bank of Japan (BOJ) faces mounting pressure to raise interest rates, with a potential hike as early as September. Sources familiar with the internal discussions indicate the central bank is considering accelerating its tightening pace beyond the current schedule of roughly two increases per year. The September 17-18 policy meeting is now viewed as a critical juncture, with market pricing suggesting an approximately 80% probability of a rate hike. This would mark a third increase for 2024, potentially shifting expectations toward a quarterly tightening cycle. Key drivers behind this hawkish shift are multifaceted inflation risks. A persistently weak yen, near a 40-year low, continues to push up import costs. High wholesale prices at a three-year peak signal pending cost pass-through to consumers. Furthermore, inflation expectations among households, businesses, and economists are nearing or exceeding the BOJ's 2% target, raising concerns about de-anchoring. External factors, including energy price volatility from Middle East conflicts and strong global AI-related demand, add further upward pressure. Internal BOJ communications reveal a growing urgency. The July policy meeting summary showed some board members advocating for faster action to avoid "falling behind the curve." Governor Kazuo Ueda acknowledged the need to consider these heightened inflation risks, suggesting the pace of hikes could be increased if financial conditions are deemed too loose. This sentiment underscores a decisive shift within the BOJ toward preemptive monetary tightening.

marsbit5m ago

Report: Bank of Japan Could Raise Interest Rates as Early as September, with Subsequent Pace Possibly Accelerating

marsbit5m ago

To Counter Quantum Threat, Ethereum Abandons Poseidon and Switches to Traditional Hashes

On August 13th, Ethereum researcher Justin Drake announced a strategic pivot in the face of the quantum computing threat: the Ethereum Foundation will abandon the SNARK-friendly hash function Poseidon at the L1 level in favor of traditional hash functions like SHA2 or BLAKE2. This decision, informed by eight years of research, represents a major shift in Ethereum's post-quantum cryptography roadmap. Poseidon, introduced in 2019, has been favored for zkRollups and zkVMs due to its efficiency within SNARK circuits. However, its shorter cryptographic history and analysis timeline became liabilities when post-quantum security became a critical requirement. The change is enabled by breakthroughs in SNARK design, particularly the adoption of "binary field" arithmetic. This allows traditional hash functions (which rely heavily on bitwise operations) to be verified efficiently in SNARKs, with recent benchmarks achieving millions of hashes per second on a laptop. Another key driver is the accelerating timeline of the quantum threat. Reports warn that "Cryptographically Relevant Quantum Computers" (CRQCs) could break current public-key cryptography (like ECDSA) as early as the 2030s, risking trillions in on-chain assets. The enhanced cryptanalysis capabilities of AI have also weakened some post-quantum candidates, pushing Ethereum towards hash-based schemes, deemed more quantum-resistant. Ethereum's post-quantum deployment plan aims for a production-ready leanVM by 2027, followed by full deployment across the consensus, execution, and data availability layers by 2028. This leanVM will aggregate numerous large post-quantum signatures into a single compact proof per block. Other major blockchains are also preparing. Solana's core developers have independently chosen the NIST-standardized Falcon signature scheme for their post-quantum roadmap. Starknet has outlined a multi-phase plan, starting with replacing its Pedersen hash with BLAKE2. By moving from the specialized Poseidon to the battle-tested SHA2/BLAKE2, Ethereum is opting for mature, widely analyzed cryptographic primitives, prioritizing long-term security assurance in the quantum era.

marsbit33m ago

To Counter Quantum Threat, Ethereum Abandons Poseidon and Switches to Traditional Hashes

marsbit33m ago

Nomura Research Report Insights: Lumentum's Performance Confirms Continued Shortage of Optical Chips, Chinese Suppliers See Structural Opportunities

Lumentum's Q4 FY26 earnings, with revenue surging 109% YoY to $1.01B, confirm a sustained global shortage of key optical chips like EML and CW lasers. Nomura's analysis indicates this supply-demand imbalance is expected to persist through FY26-FY27, driven by explosive demand from AI data centers. This shortage creates a structural window of opportunity for Chinese suppliers. Lumentum's performance highlights strong demand across laser categories: narrow linewidth laser component shipments grew over 130% YoY, and pump laser shipments grew 80%. EML sales set a quarterly record, fueled by 100G demand, with 200G EML accelerating to over 25% of related revenue. CW lasers are dominating 1.6T silicon photonics applications, while EML is projected to regain share in the 3.2T era. The technological roadmap is clear, with NPO (Near-Packaged Optics) seen as an incremental step before CPO (Co-Packaged Optics) commercialization around 2027-2028. Furthermore, Lumentum's Optical Circuit Switch (OCS) shipments doubled quarter-over-quarter, aligning with AI data center architectural upgrades. Nomura identifies specific Chinese companies poised to benefit: chipmaker Source Photonics for global market share gains, module leader InnoLight from the 800G-to-1.6T upgrade and silicon photonics adoption, and Tianfu Communication from incremental NPO opportunities. The report issues ratings and price targets for these A-share companies. In summary, Lumentum's results signal a structural shift where AI-driven bandwidth demand is outpacing upstream optical chip supply, creating a strategic window for the Chinese optical communication supply chain.

marsbit45m ago

Nomura Research Report Insights: Lumentum's Performance Confirms Continued Shortage of Optical Chips, Chinese Suppliers See Structural Opportunities

marsbit45m ago

Trading

Spot

Hot Articles

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of S (S) are presented below.

活动图片