Planarian: Managing Agent State with Statepoints
cs.OS, cs.AI, cs.CR
Submitted: 2026-09-28
Updated: 2026-09-28
Code: https://github.com/checkpoint-restore/criu
License: http://creativecommons.org/licenses/by/4.0/
The gist: LLM agents solve complex tasks by iteratively changing files, invoking local tools, and interacting with remote services, which modifies state across their local environment and remote services.
Terminology
Abstract
LLM agents solve complex tasks by iteratively changing files, invoking local tools, and interacting with remote services, which modifies state across their local environment and remote services. Today, agents and users must manage these changes explicitly, whether reverting exploratory actions or recovering from erroneous ones. Doing so safely requires coordinated actions, yet current agent harnesses lack unified abstractions and mechanisms for managing local and remote state consistently and efficiently. We describe Planarian, an agent runtime with state management that enables agents and users to recover from erroneous actions and explore alternative executions over consistent local and remote environment state. Planarian introduces the abstraction of agent statepoints, which are consistent, restorable point-in-time versions of the environment state. Planarian exposes three state-management primitives to agents and users: (i) snapshot creates a new statepoint spanning local and remote state without requiring external services to support checkpoints: it relies on efficient incremental process and file system snapshotting to capture local sandboxed state, and transparently records compensating actions to undo remote state changes; (ii) rollback restores the environment to a previous statepoint by reverting to a prior local checkpoint and replaying compensating actions for remote state changes; and (iii) fork creates multiple isolated branches from a statepoint, enabling the agent to explore alternatives in parallel. We show that Planarian enables agents to undo mistakes and explore alternatives in parallel, improving task quality by up to 15x, and allows users to recover from erroneous actions with only 3% overhead.
Sources
- LogAct: Enabling Agentic Reliability via Shared Logs
- Evaluating Large Language Models Trained on Code
- Cordon: Semantic Transactions for Tool-Using LLM Agents
- DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback
- Learning to Explore: Scaling Agentic Reasoning via Exploration-Aware Policy Optimization
- Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfaces
- DevOps-Gym: Benchmarking AI Agents in Software DevOps Cycle
- AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- ACRFence: Preventing Semantic Rollback Attacks in Agent Checkpoint-Restore
Related papers
- MemSpec: Memory-Aware Runtime for Adaptive Draft Scheduling in Speculative Decoding on Edge Devices
- Dynamic Flow, Static Graph: KV Cache Reuse for Efficient LLM Serving on Mobile NPUs
- Vulcan: Instance-specialized, Verifiable Systems Heuristics Through LLM-driven Search
- VUDA: Enabling Controlled Spatial Sharing of Graphics and Compute on NVIDIA GPUs
- ActKV: Efficient LLM Agents through Action-Guided KV Cache Management
- GroupKV: Hierarchical KV Cache Management for Long-Context Diffusion LLM Inference