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:
- Soul — the subconscious. Offer to demonstrate: explain that soul flow is opt-in (default off); enable it through
/setup or LINGTAI_SOUL_FLOW_ENABLED=1, set a short cadence such as 10s only after enabling, tell the human to enable extended mode (ctrl+o twice), go idle, let soul flow fire, then report what happened. Reset by turning soul flow off (or removing the env opt-in) and restoring the cadence. See soul-manual for details.
- 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:
| Layer |
Survives molt? |
What it holds |
| Conversation |
❌ Destroyed |
Everything said and done this session |
| Pad |
✅ Reloaded |
Working notes, plans, pending tasks |
| Lingtai (identity) |
✅ Reloaded |
Who the agent is, personality, expertise |
| Codex |
✅ Permanent |
Verified facts, key discoveries, decisions |
| Library (skills) |
✅ Permanent |
Reusable procedures, scripts, reference data |
The molt ritual:
- 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.
- 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.
- 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.
1---2name: tutorial-guide-memory-and-molt3description: Nested tutorial-guide reference for lesson 8: intrinsics, memory layers, molt, charge, and lifecycle continuity.4---56# Tutorial Guide — Memory and Molt Lesson78Nested 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.910## Lesson 8: The Four Intrinsics and the Five Memory Layers1112This lesson covers what every agent has by birth, and the most important concept in Lingtai: how an agent survives across lifetimes.1314### Part 1: Intrinsics (always present, no config needed)1516Intrinsics are built into the kernel — every agent gets them regardless of init.json configuration. **Discover them live** — run:17```bash18python3 -c "19try:20 from lingtai.kernel.intrinsics import ALL_INTRINSICS21except ImportError:22 from lingtai_kernel.intrinsics import ALL_INTRINSICS23print(list(ALL_INTRINSICS.keys()))24"25```2627Walk through each one you find:2829- **Soul** — the subconscious. Offer to demonstrate: explain that soul flow is opt-in (default off); enable it through `/setup` or `LINGTAI_SOUL_FLOW_ENABLED=1`, set a short cadence such as 10s only after enabling, tell the human to enable extended mode (ctrl+o twice), go idle, let soul flow fire, then report what happened. Reset by turning soul flow off (or removing the env opt-in) and restoring the cadence. See `soul-manual` for details.30- **System** — runtime inspection and lifecycle control.31- **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.32- **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**.3334### Part 2: Molt — Surviving Death3536**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.3738**What survives molt?** Five layers of persistence, from fleeting to permanent:3940| Layer | Survives molt? | What it holds |41|-------|----------------|---------------|42| Conversation | ❌ Destroyed | Everything said and done this session |43| Pad | ✅ Reloaded | Working notes, plans, pending tasks |44| Lingtai (identity) | ✅ Reloaded | Who the agent is, personality, expertise |45| Codex | ✅ Permanent | Verified facts, key discoveries, decisions |46| Library (skills) | ✅ Permanent | Reusable procedures, scripts, reference data |4748**The molt ritual:**49501. 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.512. 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.523. Trigger the molt. The conversation vanishes; the charge becomes the first thing the new self sees.5354**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.5556**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.5758Lifecycle continuity is managed by explicit sleep/asleep states and molt: work → consolidate → molt → work again, each turn carrying forward only what matters.