Mahal Systems

Overview › Lever

State

Externalized state: plans, progress files, checkpoints, memory stores. 5 optimizations change this part of an agent.

  1. 4.b.i

    Filesystem-based agent state and checkpoints

    Save the agent's state at each step boundary (the conversation, the workspace files, process state when it matters, and a ledger of external side effects) so a crashed or stuck run resumes or rolls back instead of starting over.

    Memory › Resuming

    Better qualityLower costMixed performance

    Tier 2 · reliability · changes state · any agent · 6 sources, 4 measured

  2. 4.b.ii

    Initializer-maintainer dual agent

    Give the first session of a multi-session build a setup-only prompt (expand the spec into a JSON list of end-to-end tests, all failing, and write an init script, a progress file and a first commit) and every later session a maintainer prompt that reads that state, re-tests what passed, builds one failing item, verifies it end to end and commits.

    Memory › Resuming

    Better qualityBetter governanceMixed costSlower

    Tier 4 · restructuring · changes state · planning, code generation agents · 6 sources, 1 measured

  3. 4.b.iii

    Keep plan, progress and results in files when work outlives one context window

    When a task spans context resets (compaction, a truncation limit, a new session), have the agent keep what the next window needs in files and read them back at the start of each window: the plan and a progress list, decisions and open items, intermediate results too large to hold in context, and for coding a structured test list and an init script.

    Memory › Resuming

    Better qualityBetter governanceMixed costMixed performance

    Tier 4 · restructuring · changes state · planning agents · 15 sources, 9 measured

  4. 4.c.i

    Episodic memory retrieval

    Log every agent session as a raw trace, distill a few verified lessons from them (user corrections, definitions, workflows that worked, mistakes) into short memory files, show the agent an index of those files at the start of each task, and let it search both.

    Memory › Reusing work

    Better for brandMixed qualityMixed costMixed performance

    Tier 4 · restructuring · changes state · memory agents · 9 sources, 7 measured

  5. 4.c.ii

    Skill library evolution

    Have the agent turn runs that passed a verifier into reusable skills (a code function or a SKILL.md procedure), store them in a library, and on later tasks show it only the few a separate selection step picks, reviewing what goes in and pruning what goes unused.

    Memory › Reusing work

    Mixed qualityMixed costMixed performance

    Tier 4 · restructuring · changes state · memory agents · 6 sources, 4 measured

Before you go...

Build better agents, weekly

Our latest research, performance benchmarks, optimization strategies, and updates around AOT development.

One email a week, nothing else. Unsubscribe anytime.