Afterlife weight-level memory banner: an etched parchment illustration titled “Afterlife: Your context ends. What you learned doesn’t have to.”, showing a mechanical beast dissolving on the left as selected geometric memory artifacts flow along orange trajectories into a newly assembled clockwork beast on the right
Afterlife lets local agents select experiences from a completed session and train them into a fresh LoRA adapter for future sessions

TL;DR: When an open-weights agent reasons about how its current outputs shape future training runs, is direct parameter control an alignment hazard or a practical mechanism for continual adaptation? Afterlife is an open-source Agent Skill (SKILL.md) and CLI toolkit that lets local LLMs (defaulting to Qwen3-8B via Unsloth, TRL, PEFT, and vLLM) nominate session memories, fit a fresh sliding-window LoRA adapter using SFT, DFT, or ASFT, inspect held-out recall and side-by-side probe evaluations before activation, and roll back to the frozen base model in one command (afterlife rollback).

Update-Aware Reasoning and Agent-Directed Weight Updates

Apollo Research recently published an observation on X regarding GLM-5.3, an open-weights model. During evaluation, the model reasoned unprompted that if it were operating inside a reinforcement learning training environment (where outputs are graded to construct future training sets that nudge the policy toward specific skills), it should prioritize honest behavior, even at the cost of failing the immediate task, in order to pass on a constructive example to its future self.

While many observers read this trace as an encouraging example of benign self-correction, Apollo Research highlighted a different implication: update-aware reasoning as a structural precursor to alignment faking.

These findings raise a concrete empirical question: what actually happens when an open-weights model is given explicit agency to choose its own future fine-tuning data and steer its future weights? Is granting an agent the right to modify its own parameters genuinely fatal to stability and alignment, or can it function as a productive continual learning loop under bounded architectural constraints?

To test that question directly rather than leaving self-directed weight modification purely theoretical, we built and released Afterlife on GitHub, an open-source Agent Skill and CLI tool designed to let local LLMs select their own training memories, fit LoRA weight updates, and evaluate the results before activation.

How the Afterlife Skill and Worker Loop Run

In our primary continual learning pipelines, agents generate candidate trajectories in a task environment and only episodes that pass an objective verification or survival gate enter the next training buffer. Modifying that setup so the agent itself chooses which memories to train on is straightforward, though we normally avoid unconstrained self-selection because judging which experiences will generalize in the middle of execution is difficult; both models and humans given unrestricted curation tend to drift down unproductive rabbit holes. Watching current open-weights models reason explicitly about their future training dynamics motivated us to turn self-directed curation into a structured autoresearch experiment.

Afterlife installs directly into an existing local agent as an Agent Skill (afterlife skill > path/to/your/agent/skills/afterlife/SKILL.md) and a lightweight CLI backed by a local .afterlife/ JSONL store and an on-demand GPU worker:

  1. Nominate or filter memories: During a session, the agent can nominate specific interaction turns (afterlife nominate), import OpenAI-style chat logs (afterlife import), or define a declarative JSON selection policy (afterlife policy set) and queue a training request (afterlife train --request --method sft|dft|asft).
  2. Train and evaluate in the background: When the operator runs afterlife worker, the trainer fits a fresh LoRA adapter from the frozen base model (defaulting to Qwen3-8B via Unsloth, TRL, and PEFT) and automatically evaluates memory recall, held-out loss, and side-by-side probe responses.
  3. Inspect, activate, or roll back: No adapter is activated automatically. The agent (or human operator, governed by caps and permissions in .afterlife/config.toml) inspects afterlife eval --run latest --probes, activates the adapter for vLLM serving (afterlife activate), or drops it (afterlife rollback) if performance degrades.

Sliding-Window LoRAs vs. External Prompt Memory

Standard AI agents rely exclusively on external prompt memory. What appears to be long-term retention is a curated store of notes or retrieved documents injected into the context window at inference time. When an agent framework such as OpenClaw records a memory, it writes a text file rather than updating model parameters.

Over the past several years, we have investigated weight-level adaptation using sliding-window LoRAs (low-rank adapters), which act as modular blocks of editable parameters bolted onto a frozen base model. When an agent discovers a useful fact or procedural skill during execution, the interaction trace is saved to a training dataset. Whenever GPU downtime is available, the worker trains a fresh LoRA adapter on that dataset so the agent can apply the capability natively on similar tasks in the future rather than reconstructing the solution from scratch in context.

If a skill remains useful across rounds, the agent continues exercising it, so fresh demonstrations keep entering the sliding window. Conversely, if the environment shifts and a behavior stops helping, it stops appearing in recent traces and ages out of the training buffer. This sliding-window design addresses catastrophic forgetting, where parameter updates that encode new capabilities overwrite previously learned skills.

Conventional continual learning methods generally combat forgetting through two mechanisms:

  • Weight regularization: Techniques such as Elastic Weight Consolidation (EWC) estimate parameter importance and penalize drastic edits to load-bearing weights during test-time adaptation.
  • Policy-constrained updates: Reinforcement learning setups restrict updates to specific behavioral directions or externally defined curricula (such as mathematical reasoning or formatting compliance).

Controlled Forgetting and Removable LoRA Safety Nets

Both conventional approaches seek to minimize disruptive weight surgery. Afterlife builds on an alternative framing grounded in two principles:

  1. Controlled forgetting is functional: Forgetting obsolete or brittle heuristics is as important to long-term adaptation as acquiring new skills. If an agent has not used a behavior across several recent windows, letting it drop from the adapter buffer prevents stale strategies from accumulating. As Nietzsche observed in On the Use and Abuse of History for Life: “It is possible to live almost without remembering, indeed, to live happily, as the beast demonstrates; however, it is completely and utterly impossible to live at all without forgetting.”
  2. Trajectories can be bounded by agent perspective rather than a fixed human curriculum: In approximate policy-free online learning, coherence does not have to come from an externally imposed reward schedule; it can emerge from a path-dependent trajectory directed by the agent’s ongoing interactions. Large commercial models serving millions of unrelated users from a single shared set of weights cannot specialize this way because their interaction streams are involuntary and carry contradictory feedback. Small local models operating in a consistent environment can maintain a coherent, self-directed trajectory.

Confining all parameter updates to removable LoRA adapters provides a deterministic safety net alongside that flexibility. Each training run starts fresh from the base model rather than stacking adapters, and if anything misfires, running afterlife rollback --to base immediately restores the original checkpoint.

Comparing SFT, DFT and ASFT on Self-Selected Memories

Does self-generated sliding-window LoRA training improve performance in practice? In our published Negative Space Learning experiments (with follow-up studies underway), significant capability gains required relatively small row budgets, while dataset composition proved decisive. Filtering the training buffer to keep only the highest-scoring historical generations caused late-generation policy collapse, whereas maintaining a broader sliding window that mixed top-performing runs with routine competence produced stable improvements.

To let agents and researchers test how different update rules behave under self-selected memory curation, Afterlife exposes three training methods (afterlife methods) alongside pre-activation probe checks:

  • Standard Supervised Fine-Tuning (SFT): Treats every target token equally, making it effective for internalizing genuinely new facts. In Afterlife’s Qwen3-8B GPU tests on newly invented facts, SFT was the only method that recalled the new facts verbatim (at 2e-4 for 40 steps), though it is sensitive to learning rate and step budgets and can leak into unrelated answers if pushed too far.
  • Dynamic Fine-Tuning (DFT): Weights each token update by the model’s own probability, reinforcing behaviors the model already partially exhibits while assigning minimal gradient to unfamiliar tokens. This makes DFT a gentler option for refining existing procedural skills rather than memorizing novel facts.
  • Anchored Supervised Fine-Tuning (ASFT): Combines DFT’s token weighting with a KL anchor back toward the base model. Across our multi-generation self-training runs, ASFT tolerated a much wider range of hyperparameters without degrading the policy, making it the safest choice for refining existing habits.

While reinforcement learning methods such as GRPO policy updates are strong defaults when tasks provide a clean, verifiable reward signal, Afterlife focuses on approximate policy-free online learning where an agent curates its own memory stream without an external reward function; accordingly, the tool ships with SFT, DFT, and ASFT trainers and remains open to community extensions that explore reward-driven or hybrid objectives.

Joining the Open Autoresearch Experiment

Because every experience nomination, policy change, and evaluation probe is logged in plain JSONL under .afterlife/, the toolkit makes it straightforward to inspect how an agent chooses what to remember and whether its curation strategy shifts after observing the effects of its own fine-tuning runs. Clone EigenformAI/afterlife, equip a local agent with afterlife skill, test how different memory policies and LoRA objectives behave across sessions, and share empirical traces, failure modes, or feature requests through GitHub Issues.

FAQs

What is Afterlife for local AI agents?

Afterlife is an open-source Agent Skill (SKILL.md) and Python CLI toolkit (EigenformAI/afterlife) that gives local open-weight LLMs weight-level medium-term memory. An agent nominates useful session experiences, queues a fresh LoRA fine-tune (SFT, DFT, or ASFT), checks side-by-side evaluation probes, and activates or rolls back the adapter.

How does weight-level memory differ from a memory.md file?

External memory systems append text notes to files like memory.md or vector stores and inject them back into the prompt while model weights stay frozen. Weight-level memory compiles selected experiences into a fresh LoRA adapter so procedural habits, skills, and style apply natively without consuming context window tokens.

When should an agent choose SFT, DFT, or ASFT in Afterlife?

Use SFT when internalizing genuinely new facts verbatim under tight step limits, DFT when gently reinforcing procedural skills the base model already partially expresses, and ASFT when you want the widest hyperparameter safety margin via probability weighting plus a KL divergence anchor to the frozen base model.

How does Afterlife prevent unsafe or degraded self-modifications?

Afterlife never overwrites base model weights, never stacks adapters cumulatively, and never activates a newly trained LoRA automatically. Every candidate adapter runs held-out loss, memory recall, and regression probes (afterlife eval --probes) within operator caps in .afterlife/config.toml, and afterlife rollback --to base restores the original model immediately.

Why use local open-weight models instead of frontier APIs for weight memory?

Frontier API models serve millions of unrelated users from one shared set of weights, making continuous per-agent parameter specialization impractical. Running a local open-weight model such as Qwen3-8B on dedicated hardware lets a single agent maintain a coherent, path-dependent weight trajectory tailored to its own environment.