Proposing a kernel layer to enforce memory constraints in LLM agents
Implement a kernel layer that records events and enforces memory constraints.
Prototype a kernel layer to reject agent actions that violate state.
Summary
Current agent setups treat memory as context, allowing the agent to read and contradict it freely. The author proposes treating memory as part of the system state and routing all interactions through a kernel layer. The kernel records events in an append‑only log, controls memory writes, accepts only specific event types, and can reject actions that do not satisfy mission criteria. For example, if an agent claims a task is complete but only logged an observation, the kernel rejects it; if a real event occurs, it accepts it. This approach turns memory from passive context into an enforceable constraint, preventing agents from making contradictory or undesired actions. The author asks the community whether memory should be a constraint rather than just context.
Key concepts: memory as system state, kernel records events, controls writes, accepts specific event types, rejects incomplete actions, example of vegetarian preference conflict.
The post explores a new architectural pattern for agent systems that could improve reliability and safety.
Key changes
- Memory treated as system state instead of context
- Kernel records events in an append‑only log
- Kernel controls memory writes
- Kernel accepts only specific event types
- Kernel rejects actions that do not satisfy mission criteria
- Example: vegetarian preference conflict leads to rejection