Remove memory_enabled from LLM agent config — make all actors stateless by design #21
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/actors-spec#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove the
memory_enabledandmax_historyfields from the LLM agent configuration. All conversation history management should be the responsibility of the caller, injected per-invocation viacontext.conversation_history. This makes actor behaviour predictable across all deployment targets and eliminates a class of subtle production bugs.Problem
memory_enabled: truestores conversation history inside the agent object on the server. This creates deployment-dependent behaviour from the same configuration:memory_enabled: trueThe same YAML produces four different behaviours depending on how it is deployed. A developer who builds a working chatbot locally with
memory_enabled: trueand then deploys it behind a load balancer will encounter a bug that is invisible in the configuration and difficult to diagnose.This is also in tension with §10.2 of the spec, which explicitly delegates cross-invocation persistence to the host environment.
memory_enabledputs persistence inside the agent, contradicting the spec's own stated philosophy.Proposal
memory_enabledandmax_historyfrom the LLM agent configuration fields (§4.4).context.conversation_historyinjection mechanism (§4.4.4) as the sole way to supply history to an LLM agent.messageslist (§6.3.1) untouched — this is a different concept (within-execution coordination between nodes, not cross-invocation persistence) and is unaffected by this change.max_historylogic themselves.The §4.4.4 clause — "if
conversation_historyis in context, use it for the current invocation without persisting it" — already exists and already does exactly what is needed. This proposal makes it the only path rather than a secondary one.Impact Analysis
No functional loss. Every capability provided by
memory_enabled: trueis fully replicable via context injection.CLI tools — the simplest affected use case — require approximately four lines of caller code:
A library-level
Sessionwrapper can reduce this to a single call for the common case.Multi-agent pipelines are actually improved. Currently each agent silently maintains its own separate history, so agents in the same pipeline cannot see each other's exchanges. With external history via
context.conversation_history, all agents in a pipeline share the same view of the conversation — which is almost always the correct behaviour.Graph-based actors are unaffected. Agent nodes inside a graph already receive
conversation_historyinjected from the graph state'smessageslist (§6.2.2), independently ofmemory_enabled.Stateless HTTP endpoints are improved. The current spec encourages a pattern that is incompatible with stateless deployment. Removing
memory_enabledmakes the spec honest about what a stateless endpoint requires.Spec Consistency Improvement
Removing
memory_enabledmakes the LLM agent configuration fully consistent with how other time-varying inputs work. Every value that changes at invocation time flows throughcontext:context._temperature_overridecontext.conversation_history(after this change: the only path)context.<key>This is a uniform model.
memory_enabledis the one exception to it, and removing it eliminates the exception.Migration
Existing configurations using
memory_enabled: truewould need updating. The migration is mechanical:Before:
After:
Calling code adds history management (or uses the provided
Sessionwrapper).What Is Not Proposed
messageslist (§6.3.1) is not being changed.context.conversation_historyinjection mechanism (§4.4.4) is not being changed — it is being promoted.