界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

tutorial-guide-memory-and-molt

tutorial-guide-memory-and-molt

【效率与协作】Nested tutorial-guide reference for lesson 8: intrinsics, memory layers, molt, charge, and lifecycle continuity.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

Llingtai-ai / lingtaiApache-2.0

技能说明

GitHub

name: tutorial-guide-memory-and-molt description: > Nested tutorial-guide reference for lesson 8: intrinsics, memory layers, molt, charge, and lifecycle continuity. version: 1.0.0 last_changed_at: "2026-07-18T00:00:00Z" maintenance: "If you find stale or incorrect information here, use the lingtai-issue-report skill to assemble evidence and obtain per-issue human consent before filing an issue. Never include secrets, credentials, tokens, or private paths."

Tutorial Guide — Memory and Molt Lesson

Nested tutorial-guide reference for memory and molt lesson 8, reached from the root tutorial-guide router. Teach live per the router's discover, don't recite rule: read the real file or run the real command before explaining it.

Lesson 8: The Four Intrinsics and the Five Memory Layers

This lesson covers what every agent has by birth, and the most important concept in Lingtai: how an agent survives across lifetimes.

Part 1: Intrinsics (always present, no config needed)

Intrinsics are built into the kernel — every agent gets them regardless of init.json configuration. Discover them live — run:

python3 -c "
try:
    from lingtai.kernel.intrinsics import ALL_INTRINSICS
except ImportError:
    from lingtai_kernel.intrinsics import ALL_INTRINSICS
print(list(ALL_INTRINSICS.keys()))
"

Walk through each one you find:

  • System — runtime inspection and lifecycle control.
  • Psyche — the self. Manages four things: lingtai (identity), pad (working scratchpad), context (molt), and name (true name + nickname). The tool name comes from Greek for soul/self.
  • Email — filesystem-based communication. Always-on intrinsic; addon bridges (IMAP / Telegram / Feishu) plug in via the mcp capability. The distinction worth showing the human: intrinsics are always loaded; capabilities are configured in init.json.

Part 2: Molt — Surviving Death

What is molt? An agent's conversation history fills up its context window. When pressure builds (typically 70–95% full), the agent must shed the conversation to continue working. This is molt — a voluntary context reset.

What survives molt? Five layers of persistence, from fleeting to permanent:

LayerSurvives molt?What it holds
Conversation❌ DestroyedEverything said and done this session
Pad✅ ReloadedWorking notes, plans, pending tasks
Lingtai (identity)✅ ReloadedWho the agent is, personality, expertise
Codex✅ PermanentVerified facts, key discoveries, decisions
Library (skills)✅ PermanentReusable procedures, scripts, reference data

The molt ritual:

  1. Tend the four durable stores (identity, pad, knowledge, skills). Identity (lingtai) is the one agents skip most often: if the session changed the agent's operating style, obligations, relationship to the human, taste, safety posture, or trust model, update lingtai before molting — pad/knowledge/skills are not a substitute for it.
  2. Write a "charge" — a briefing to the next self covering: what you're working on, what's done, what remains, who to contact, which codex entries to load, which skills to invoke.
  3. Trigger the molt. The conversation vanishes; the charge becomes the first thing the new self sees.

Demonstrate it live (if the human agrees): perform a real molt. Show the before/after — the conversation disappears, but identity, pad, codex, and skills all remain intact. The new agent reads its charge and continues.

If the agent ignores warnings, the system forces a molt — but without the charge, the new self wakes up disoriented with only a pointer to the activity log. Avoid this.

Lifecycle continuity is managed by explicit sleep/asleep states and molt: work → consolidate → molt → work again, each turn carrying forward only what matters.

我的收藏