docs/design/agent-evolution-global-switch-design.md
Agent Evolution is controlled by one deployment-level switch for the entire OpenViking server instance. All accounts and users served by the same process share the same effective value.
The switch controls whether session commits may generate or update these memory types:
casestrajectoriesexperiencesDisabling the switch does not delete existing files and does not prevent existing experiences from being searched or read.
Add the switch directly to ServerConfig:
{
"server": {
"agent_evolution": {
"enabled": false
}
}
}
The default is false.
server.user_config_defaults remains responsible only for existing per-user
defaults such as add targets. Agent Evolution is no longer part of active
UserConfig resolution.
This setting belongs to the HTTP server deployment surface. Embedded/local SDK
clients do not load ServerConfig, so they preserve the historical enabled
behavior instead of becoming permanently unable to produce Agent memory.
SessionService passes the deployment-level Agent Evolution configuration into
each Session. A commit applies the global value after validating the
session-level memory_policy:
cases, trajectories, or experiences.memory_policy.Phase 1 stores the effective boolean and skip reason in archive metadata. Asynchronous Phase 2 reads that snapshot, so normal queue processing and direct recovery of that archive use the value accepted at commit time.
When a later commit rolls earlier failed archives into one recovery batch, the entire batch uses the triggering archive's snapshot. OpenViking keeps one extraction policy per batch instead of splitting the merged conversation across different Agent Evolution settings. Therefore, changing the deployment setting before a later recovery commit can affect replayed messages from earlier failed archives.
Archives created before the snapshot field existed preserve the historical enabled behavior during recovery.
Remove Agent Evolution from the active per-user configuration and resolution
logic. Retain a deprecated parse-only schema field so existing
user_config.json files remain loadable; its value is ignored.
Remove the user-level management surfaces introduced by the current branch:
GET /api/v1/user-settings/memoryPATCH /api/v1/user-settings/memoryov user-settings memoryov user-settings set-memoryExisting stored agent_evolution fields are ignored after upgrade. They do not
override the deployment-level setting.
agent_evolution continue to parse,
preventing an upgrade from breaking users that already wrote the branch-era
configuration.memory_policy remains supported as an allow-list below the
global switch.Tests cover:
memory_policy.