DeepSeek publishes paper on self-evolving AI framework Cordis

icon MarsBit
Share
AI summary iconSummary
DeepSeek has published a new paper on its self-evolving AI framework, Cordis, titled *A Programming Paradigm for Spatiotemporal Composability*. The framework enables dynamic loading and recombination of components without interrupting the host process. It was tested within the Koishi chatbot ecosystem, which supports over 4,000 plugins. This is DeepSeek’s seventh paper this year, co-authored with Peking University. The release contributes to the latest AI + crypto developments and underscores ongoing innovation in on-chain applications.

DeepSeek The latest paper in collaboration with Peking University has unveiled the Harness version of the whale.

Titled "A Programming Paradigm for Spatiotemporal Composability," translated into Chinese as "A Programming Paradigm for Handling Spatiotemporal Composability."

It might sound a bit confusing, but just remember one thing—

The entire text revolves around Cordis, the core of the Black Whale, a modular "Lego baseplate" that can be freely plugged and unplugged.

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

This also explains why the "Black Whale" is so open, and why the official team actively encourages users to create plugins and modify the Harness.

A paper packed with information, and also DeepSeek The Harness team has been building up to this masterwork for so long, and they ultimately delivered a brilliant performance in the form of a massive whale.

It is worth noting that this is DeepSeek The seventh paper this year, and the Nth collaboration with Peking University.

DeepSeek

Over eighty pages total, I went through the paper from start to finish and distilled a few key takeaways—

1. Cordis provides a set of universal dynamic composition semantics. Components managed by Context can be dynamically loaded and unloaded, and their managed side effects are automatically cleaned up.

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

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

DeepSeek

And all of this serves the same ambition—

Self-evolving.

Time and space, the two hurdles of Harness's self-evolution

There is a counterintuitive reality in the software world: most applications with plugin systems require a full restart of the host process after uninstalling a plugin.

This means that what gets deleted might be just one plugin, but all loaded plugins will restart along with it.

Yes, the "plug" actually goes in and can't be pulled out.

VSCode is a typical example.

The paper states that as of June 9, 2026, 87 of the top 100 extensions on the VSCode Marketplace contain executable code that cannot be individually uninstalled, disabled, or removed at runtime—restarting the entire extension host is required after disabling or removing them.

This is not an issue unique to VSCode. The paper points out that nearly all plugin architectures have similar flaws, differing only in degree.

This would already be troublesome in a regular plugin system, but if the cost is just a restart, it’s still acceptable.

But in the context of an Agent, it's an entirely different matter.

A typical saddle is usually packed with a variety of components: a toolset, execution environment, permission controls, sandbox, session state, memory system... it is itself an extremely complex engineering system.

Now, with the arrival of this "self-evolving AI" like Sun Wukong, you might accidentally erase yourself without even noticing.

DeepSeek

This is also how DeepSeek approaches this paper from an evolutionary perspective:

Future agents may generate their own tools based on tasks, install them into the runtime themselves, and replace them autonomously if issues are detected.

If you have to restart the entire process every time you change a line of code, all the previously accumulated context and cache could be lost.

This is called time composability.

If dependencies between modules are patched individually by each module—checking today for A, guessing tomorrow for B—you’ll inevitably introduce circular dependencies, which will cause serious issues upon reload.

This is called spatial composability.

These two challenges are precisely the two issues Cordis aims to solve.

DeepSeek's solution

First, let’s cover two mathematical concepts, which are the two theoretical pillars of this paper—

Effects and side effects.

In simple terms, effects describe "the impact of a program on the world," while co-effects describe "the constraints of the world on a program." They are dual concepts: effect systems enrich types, while co-effect systems enrich contexts.

But there's an issue: under self-evolving AI context, the framework is dynamically loaded.

The classic effect/effect system is a static type system tool.

To overcome both time and space simultaneously, the team adapted and upgraded these concepts for the Agent runtime—“reversible effects” and “reactive side effects.”

Reversible effects target the dimension of time.

The core definition is just one sentence: Every modification to the context must be accompanied by an explicit inverse function, so that side effects are reversible.

Each time the state is modified while loading the plugin, the corresponding inverse function is recorded and chained sequentially to form a "rollback chain".

When uninstalling the plugin, the chain is executed in reverse, allowing the system state to be precisely restored to how it was before the plugin was loaded.

Think of it as a stack of plates—the last one placed on top is the first one taken off.

This way, the timeline won't get mixed up.

Reactive coeffects handle the spatial dimension.

In Cordis, components can declare which dependencies they require, enabling dependencies to be resolvable.

For example, a chat plugin says it needs a message adapter and a database. Both dependencies must be satisfied before it becomes ACTIVE. If one is missing, it remains INACTIVE—it doesn’t rush to start or attempt to run and crash due to a null reference.

When the provider appears, the dependent automatically activates. When the provider leaves, the dependent first pauses and waits to retract its effect before the provider completes unloading.

When a dependency is uninstalled, the dependent component is automatically disabled; when the dependency comes back online, the dependent component is automatically restored. This topology orchestration is not manually written by developers but automatically inferred from declarations.

Together, they form the core of Cordis.

The intuitive meaning of "spatial-temporal composability" in the paper title is right here.

Koishi

So, have these previously mentioned points been verified through practice?

Yes.

And the volume is not small.

The paper uses a chatbot framework called Koishi for experimental validation.

DeepSeek

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

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 the Touhou Project.

Komeiji Koishi is a character who makes unconscious gestures; the name symbolizes the theme of the chatbot and embodies the developer’s deep passion.

It's also quite an interesting README.

DeepSeek

What is Cordis?

The author of Koishi said that the name Cordis comes from the Latin word for heart, and everything about Koishi begins with Cordis.

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

The capability it provides—plugin systems—is not uncommon among most frameworks, but behind this system lies a goal unachieved by most frameworks: reversibility.

Left this message behind:

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

DeepSeek

Four years have passed, DeepSeek This paper provides verification.

First, verify the time dimension.

In Koishi, administrators can disable a plugin from the console, and the plugin’s impact on the system will be immediately reversed, while other plugins continue to function.

During development, after modifying and saving a plugin, the updated plugin is reapplied while keeping the cache and connections unchanged.

Next is spatial verification.

In the Koishi ecosystem, the IM adapter enables integration with messaging platforms, the database driver provides persistent storage, and functional plugins declare these as dependencies for direct access.

During actual operation, when switching the storage backend or reconnecting the adapter, only plugins whose dependencies have actually changed are reactivated; plugins with unchanged dependencies remain unaffected.

Keep in mind that these plugins are typically developed independently by different authors, with the only coordination being the reactive side effect emphasized by Cordis.

This shows that a dynamic composition rule can indeed work within an open plugin ecosystem contributed by different authors.

But the paper did not present this case as a perfect demo.

The team acknowledges that, currently, validation data is limited to the single Koishi ecosystem and the single TypeScript language, lacking controlled comparisons with alternative architectures...

But most importantly, it points to a new direction: a foundational framework serving self-evolving Agent Harness.

Now released DeepSeek Harness is the upgraded version of Koishi Cordis.

Author bio

Finally, let’s talk about the paper’s authors.

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

DeepSeek

The first author is Yifan Shi, from Peking University, and also DeepSeek Member.

After digging deeper, it turns out that as early as DeepSeek His name appeared in the V3 Technical Report.

DeepSeek

The project used for verification in this new paper—Koishi—was also created by him.

It's clear you have a strong attachment to "shi"—your real name is Yifan Shi, the project is called Koishi, and your GitHub username is Shigma.

(doge)

DeepSeek

Back to the topic.

Koishi is a repository from four years ago, now with 5.7K stars. It can be said to be the origin of it all.

Because the concept of Cordis was also introduced in Koishi.

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

DeepSeek

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

The college website shows that Zhang Wei's research areas primarily include software engineering and programming languages.

DeepSeek

In 1999, he graduated with a bachelor’s degree in Engineering Thermophysics from Nanjing University of Aeronautics and Astronautics. He then shifted to computer science and earned a master’s degree in Computer Science from Nanjing University of Aeronautics and Astronautics in 2002.

After completing his master’s degree, Zhang Wei enrolled at Peking University to pursue his Ph.D. and earned his Ph.D. in Computer Software and Theory in 2006.

After earning his doctorate, he remained at Peking University, where he has continuously conducted research and taught in areas such as software engineering and programming languages.

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

DeepSeek

In 2024, the two of them co-authored the ICSME paper "Focused: An Approach to Framework-oriented Cross-language Link Specification and Detection."

DeepSeek

Finally, it’s an old familiar face.

Cui Tianyi, DeepSeek Head of the Harness team. Undergraduate alumnus of the Computer Science Department at Zhejiang University, and junior to Liang Wenfeng.

DeepSeek

During school, Cui Tianyi was admitted to Zhejiang University through a direct admission program based on his performance in the NOIP/Informatics Olympiad, and he won gold medals six times at the ACM International Collegiate Programming Contest Asian Regional Competitions.

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

DeepSeek

Paper link: https://github.com/cordiverse/paper Koishi: https://github.com/koishijs/koishi

This article is from the WeChat public account "Quantum Bit," authored by Jay.

Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information. Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.