Home/Journal

After a restart, do you still know me?

Design notes on kin and silt: an agent that keeps a single continuous session with no "new chat", using sleep / merge / recall and self-editing context tools instead of one-shot compaction.

· Chiffonwind · 清凤 · 1,455 words
AI AgentMemoryContext Management

Three months into building Arkloop, I had written 350,000 lines of code. Late one night, after finishing an edge case in a COP renderer, something hit me — I hadn’t written code just because it was “cool” in a long time.

Arkloop is a real product. It has a storage abstraction layer, parallel multi-agent execution, and a dual-contract event system. Behind every design decision there’s a real engineering constraint forcing me to compromise. In this era, features and elegance always conflict, like an impossible triangle — if you’re Manus, you can’t use a minimal architecture like pi-mono; if you’re Claude Code, maybe you can drop everything SaaS-related.

Most of my ideas about agents had been held down by Arkloop for too long.

So I wanted to build the exact opposite.


A person has only one session

You sit in a café, post on social media, chat with a friend, then write code. Do these happen in the same session?

It seems they do.

From birth until now, a person keeps continuing the same session. You’ve never pressed “new chat” at some point. Your Telegram DMs, WeChat group chats, face-to-face conversations — all handled by the same “you.” Not context switching, not routing to different agent instances. Just one consciousness, living serially and continuously.

Yet none of the agents we build work like this.

They have sessions. They have a “new chat” button. Click it and they forget everything. Even with a memory system, it’s just piecing together, from fragmented notes, a version of itself that pretends to know you. You think it remembers you; really it’s reading a few distilled snippets of text. That isn’t memory. That’s a file.

Why can’t an agent be like a person? Whether it’s a Telegram channel or a Discord DM, a CLI or a group chat — keep one shared context, all mixed together?

That’s where kin starts. An agent that never opens a new session. Input from every channel flows into a single stream. It doesn’t run in parallel — a person can’t clone two brains at the same moment. It just exists, serially and continuously.

Compaction isn’t compression, it’s dreaming

Every agent today does the same thing: the context got too long, so compress it. 200K down to 2K. One cut, irreversible. It’s like squeezing a person’s whole life onto a one-page résumé — you keep the name and title and lose everything that made you who you are.

I don’t want compression. I want sleep.

People sleep every day. Not because memory is full, but because you’re tired. You naturally feel overloaded and need to sort things out. What the brain does during sleep isn’t “deleting unimportant memories” — it settles the day’s experiences, sorts them, and merges them with existing memories. When you wake up, you don’t remember the exact words of every sentence from yesterday, but you remember the direction you were heading.

That’s kin’s compaction mechanism. I don’t call it compact. I call it silt — sediment.

Picture a river. Water flows on top; that’s your active context. Sediment slowly settles onto the riverbed; that’s information you’ve already digested. The sediment isn’t deleted. It rests there, and when the water rises it gets stirred back up.

Concretely, silt has three operations:

A misunderstanding about memory

A long time ago I misunderstood RAG. I thought RAG turned text into vectors and stuffed them into the LLM request — so you wouldn’t need compaction at all, just good vector retrieval.

Later I realized every LLM call is based on text. Vectors are only a retrieval tool, not memory itself.

But that misunderstanding led me to a deeper question: when a person recalls “what did I do yesterday,” what comes to mind isn’t text. Not a transcript. It’s a feeling — “oh right, I was working on that memory system yesterday.” That “oh right” moment isn’t retrieval. It’s consciousness.

RAG does retrieval, not consciousness.

So silt doesn’t try to create consciousness. It does something plainer: write everything to disk, let the agent know where its files are, and let it look things up itself when needed. It isn’t elegant, but it’s honest.

An agent should be able to edit its own context

This is something most people haven’t done.

Today every agent’s context is append-only — once a message comes in, it stays there forever until compaction cuts it all at once. The agent has no control over its own context.

kin is different. It has two special tools:

Work in this direction shows up more in frontier research on the model side than on the harness side. KV cache limits, the inertia of append-only, the assumption that “models don’t know how to manage themselves” — these are why most people gave up on this path.

But I want to try.

Full history on disk, lossy recall

kin keeps a complete, append-only history on disk. Never deleted. That’s your whole life.

But the active context sent to the model can be trimmed. During sleep, details in the active context are distilled into conclusions and settle into silt files. The active context gets cleaner, but the history is always there.

This means sleep is allowed to fail. The agent might wake up and find it forgot something important — that’s fine, the full history is still on disk and it can go back and look. Just as people often can’t remember what they did yesterday, but can check their chat history or git log.

A failed sleep is normal. People are like that too.

Why now

This used to be hard, partly because of token billing — the longer your context, the higher the API bill. Carrying 200K of context on every turn is catastrophic for cost.

But now many subscriptions have moved to counting model calls instead of tokens. That’s the breakthrough. Even if you still pay API prices, I think this research is worth doing.

The other reason is that models themselves have gotten stronger. Two years ago, if you asked a model to manage its own context, it would make a mess. Today’s models have enough meta-cognition to judge “should I tidy up now?” Not perfect, but good enough.

What kin is

A single-stream agent based on pi-mono. Six tools. One session. No MCP.

Its memory isn’t vectors in a database but markdown files under ~/.kin/silt/. You can open, edit, or delete them in any editor. If you think the agent remembered something wrong, just edit the file.

Its personality is defined in ~/.kin/soul.md. It learns about you during conversations and updates that file itself.

It isn’t a product. It’s research — into whether an agent can exist continuously, without breaks, like a person. Into whether compaction can become sleep. Into whether context can be controlled by the agent itself.

Arkloop proves I can build complex systems. kin proves I know when complexity isn’t needed.

When the agent sleeps, it extracts conclusions from the active context, writes them into the matching markdown files in the silt directory, and updates the index. On recall, it reads the index to decide which files relate to the current topic and pulls them back into the active context.

Categories aren’t hard-coded. The agent can create new category directories on its own.

The project is open source under the MIT license.


kin is still in development. This post puts the idea first — figure out why before writing the code. If you’re interested in this direction, follow @qqqqqf_.

Most agents get to know you all over again at the start of every conversation. kin doesn’t.