[KongchangAI]
· 2 min read· 1,383 words

Cortico Open-Source Kernel: The Architecture Behind an AI Secretary and Desktop Pet

Cortico Open-Source Kernel: The Architecture Behind an AI Secretary and Desktop Pet

Cortico uses event-driven design and a four-module architecture to derive both a desktop pet and an AI secretary from one kernel.

This article introduces the design philosophy of the open-source AI framework Cortico. Unlike traditional conversational AI, Cortico adopts an event-driven architecture that turns desktop interactions, group messages, and danmaku into an event stream, and by default takes no action—letting the AI decide whether to respond. Its architecture has four modules: Word handles perception and action, Core handles event dispatch without understanding content, Persona determines decision style, and Memory carries the AI's identity continuity. By reassembling modules, the same kernel can support both an entertainment desktop pet and a productivity AI secretary that splits tasks and dispatches them to Agents like Claude across multiple machines.

Introduction: When AI Goes From "You Ask, I Answer" to "I'll Figure It Out"

Most people still picture an AI assistant as a chat window—you type a sentence, it replies with a paragraph. But a demo video on Bilibili showed a completely different mode of interaction: the user said just one sentence, and the AI secretary split the task apart and dispatched it to Claude, completing cross-machine collaboration. Even more surprising: this AI secretary that can get work done for you shares the same open-source kernel as that big fat fish desktop pet you keep poking around—Cortico.

Ordinary Chat AI

This contrast is interesting in itself: the same skeleton, hooked up to a desktop, becomes a pet that plays with you; hooked up to a phone, computer, and chat interfaces, it becomes a secretary that dispatches work for you. What did Cortico get right that lets one framework grow two completely different AI forms?

The Core Difference: Event-Driven, Not Conversation-Driven

The logic of ordinary chat AI is "you ask, it answers; if you don't speak, it waits." This is a passive response mode—the AI's presence depends entirely on user input.

Cortico does the opposite: it turns everything happening in the external world into a stream of events. You poke the desktop pet, someone speaks in a QQ group, a danmaku flies across a livestream, a character in a game gets hit by a monster—none of these are "conversations," but Cortico captures all of them as events.

A danmaku flies across a livestream

This shift in design philosophy is crucial. Traditional AI assistants require users to explicitly express intent, whereas an event-driven AI faces environmental changes themselves and must judge whether those changes are worth responding to.

The Most Counterintuitive Design: Do Nothing by Default

Once an event arrives, Cortico's most unexpected behavior is—by default, it takes no action at all. Whether to pay attention to you is left to the AI to decide.

This sounds like laziness, but it's actually a rather restrained architectural decision. If every danmaku and every poke triggered a response, the AI would become extremely noisy and resource-intensive. Giving the AI the ability to "ignore" actually makes its proactive behavior more meaningful. This also explains why the same kernel can support both an entertainment desktop pet and a productivity secretary: the difference between them isn't response frequency, but judgment logic.

Event-Driven Architecture is a mature pattern in software engineering, centered on organizing a system around the production, propagation, and consumption of "events" rather than around a request-response loop. In traditional conversational AI, user input is the sole trigger source; under an event-driven architecture, the system can listen to multiple sources simultaneously (sensors, message queues, user actions, etc.), with changes from each source encapsulated as an event and fed into a unified event bus. This pattern is naturally suited to scenarios requiring real-time response to environmental changes, such as game AI, IoT control, and automated workflows. Cortico brings it into the AI assistant space, meaning the AI's input is no longer limited to text conversations but extends to the entire digital environment—providing an architectural foundation for "proactivity."

Four-Module Breakdown: Cortico's Architectural Philosophy

Cortico's architecture can be understood through four modules, and the video uses vivid analogies:

Just delivers events

Word: Senses and Hands

Events enter through Word, and actions are output through Word. This layer handles interaction with the external world—it's the AI's perception and action interface. Pokes on the desktop pet, group messages, and danmaku all become internal events through this layer.

Core: The Nervous System

Core does only one thing—deliver events where they need to go and dispatch tools. It is not responsible for understanding content; it's essentially a dispatch hub. This "content-agnostic" design keeps Core lightweight and general-purpose, leaving the understanding work to the next layer.

Persona: The Brain Circuitry

Persona determines how the AI thinks and how it uses memory. This is the key layer where different AI forms diverge—a Persona hooked to a desktop scenario tends toward interaction and companionship, while one hooked to a work scenario tends toward task decomposition and dispatch.

In the context of AI Agents, Persona (personality/role setting) usually refers to a set of configurations or prompting strategies that define an AI's behavioral style, goal priorities, and decision tendencies. Unlike a plain system prompt, a Persona in Cortico is a pluggable module that determines how the AI interprets events, which tools it calls, and in what tone it responds. For example, an entertainment Persona might be configured with high interaction frequency and a light, humorous style, while a productivity Persona might be configured as task-oriented, concise, and efficient. This design, which decouples personality from core dispatch logic, allows the same underlying engine to quickly adapt to different application scenarios without rewriting core code.

Memory: Identity Itself

The video makes a great point: Memory is the AI itself. Swap the model, turn it off and on again—as long as the memory remains, it's still itself. This means Cortico anchors the AI's "personality continuity" in the memory layer rather than the model layer; the model is a replaceable component.

Memory mechanisms are one of the key topics in current AI Agent research. Large language models are inherently stateless—each inference is independent—so achieving cross-session continuity and personalization requires an external memory system. Cortico elevates Memory to the level of "identity itself," meaning it stores not only conversation history but likely also structured information such as user preferences, task context, and environment state. From an engineering perspective, this typically involves a combination of vector databases, key-value stores, and summarization/compression techniques. The model can be swapped at any time, but the context retained in the memory layer keeps the AI's behavior and cognition coherent—providing a viable path for building long-term companion or long-term collaborative AI.

One Skeleton, Two Forms

Different ways of assembling the four modules produce different AIs.

It just chats with you

Desktop pet form: Word connects to desktop interaction, Persona leans toward entertainment and companionship, Memory records interaction history—the result is a big fat fish that chats with you and lets you poke it around.

Secretary form: Word connects to phones, computers, and chat interfaces, plus a dispatch interface, and Persona leans toward task planning—the result is that when the user says one sentence, it distributes the work to Claude, Codex, and PIA across several machines for execution, then brings the results back when done.

This "skeleton reuse" approach isn't common among open-source AI frameworks. Most frameworks either focus on conversation or on Agent orchestration, while Cortico tries to cover both entertainment/companionship and production collaboration with a single event-driven abstraction. From an engineering perspective, this reduces developers' cognitive burden—learn one architecture, and you can build AI applications of different forms.

Modular Architecture in software engineering emphasizes splitting a system into high-cohesion, low-coupling components, each communicating through well-defined interfaces. Cortico's four-module division (Word/Core/Persona/Memory) embodies this idea: Word handles I/O adaptation, Core handles event routing, Persona handles decision logic, and Memory handles state persistence. This layering lets developers independently replace or extend any module without affecting the others. In AI application development, this composability is especially important, because different scenarios have vastly different needs for perception methods, decision strategies, and memory depth. Cortico's skeleton-reuse approach essentially uses one set of abstract interfaces to cover a broad spectrum from entertainment to productivity.

Food for Thought

Cortico's design raises an interesting question: what should define an AI's "proactivity"? Should it treat all input as commands to execute, or should it have the autonomy to judge whether to respond? The default no-response setting in the video is, in a way, simulating the restraint of a real assistant—a good secretary doesn't interrupt you with every message, but appears at the right moment.

For developers, Cortico's value may lie not in what it can do now, but in the modular thinking framework it provides: senses, dispatch, personality, and memory each doing their job—swap one module and you get a different AI. This composability may have more long-term value than any single feature.

As for what you'll hook it up to, the video ends by throwing that question to the audience. From desktop to workflow, Cortico's imaginative space depends on what kind of "senses" and "brain circuitry" you connect to it.

#Cortico#open-source AI framework#event-driven architecture#AI Agent#desktop pet#AI secretary#modular architecture
Share:

Related articles