Skip to content

💭 feat: Require Explicit Auto-agent Enablement for Memories#12886

Merged
danny-avila merged 1 commit into
devfrom
codex/phase1-memory-agent-opt-in
May 1, 2026
Merged

💭 feat: Require Explicit Auto-agent Enablement for Memories#12886
danny-avila merged 1 commit into
devfrom
codex/phase1-memory-agent-opt-in

Conversation

@danny-avila

@danny-avila danny-avila commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep memory/manual personalization enabled without requiring a memory agent
  • add explicit memory.agent.enabled: true opt-in for automatic memory-agent updates
  • keep memory context primary-only by default; automatic opt-in preserves parallel-agent fan-out
  • consolidate memory config helpers through @librechat/data-schemas and warn on old agent config without explicit enablement

Tests

  • npm run build -w @librechat/data-schemas
  • npm run build -w @librechat/api
  • cd packages/api && npx jest src/memory/config.spec.ts src/app/permissions.spec.ts --runInBand
  • cd api && npx jest server/controllers/agents/client.test.js --runInBand

Copilot AI review requested due to automatic review settings April 30, 2026 01:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the memory feature so manual memories/personalization can remain enabled without implicitly enabling the legacy “automatic memory-agent” pipeline, requiring an explicit opt-in flag to run the memory agent and to fan memory context out to parallel agents.

Changes:

  • Changes “memory enabled” semantics to only depend on memory.disabled, and adds isMemoryAgentEnabled() gated by memory.agent.enabled === true.
  • Updates agent run context so memory context is primary-only by default; legacy opt-in restores parallel-agent memory fan-out.
  • Updates schema, tests, and example YAML to document/verify the explicit enablement behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/data-schemas/src/app/memory.ts Updates enablement logic and introduces isMemoryAgentEnabled() for explicit auto-agent opt-in.
packages/data-schemas/src/app/interface.ts Aligns UI-disable comment/logic with “explicitly disabled only” semantics.
packages/data-provider/src/config.ts Extends memory.agent schema to accept optional enabled.
packages/api/src/memory/config.ts Mirrors data-schemas memory enablement changes and adds isMemoryAgentEnabled().
packages/api/src/memory/config.spec.ts Adds tests covering manual-memory enabled vs. auto-agent explicit opt-in behavior.
packages/api/src/app/permissions.ts Updates wording to reflect “configured” vs. “valid agent” semantics.
packages/api/src/app/permissions.spec.ts Updates expectations to match new “no agent required” memory config behavior.
librechat.example.yaml Documents that auto memory-agent flow requires memory.agent.enabled: true.
api/server/controllers/agents/client.test.js Updates/extends tests for primary-only memory context by default and legacy opt-in fan-out; adds getFormattedMemories mocking.
api/server/controllers/agents/client.js Gates memory processing on isMemoryAgentEnabled; loads existing memories without auto-processing when not enabled; keeps memory context primary-only unless legacy opt-in.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-12886 index is now live on the MCP server.
Deploy run

@danny-avila

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila danny-avila force-pushed the codex/phase1-memory-agent-opt-in branch from cfb6b59 to 5f4ec36 Compare April 30, 2026 05:32
@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-12886 index is now live on the MCP server.
Deploy run

@danny-avila danny-avila force-pushed the codex/phase1-memory-agent-opt-in branch from 5f4ec36 to 024efe1 Compare April 30, 2026 05:43
@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-12886 index is now live on the MCP server.
Deploy run

@danny-avila danny-avila changed the title feat(memory): require explicit auto-agent enablement feat: require explicit auto-agent enablement May 1, 2026
@danny-avila danny-avila changed the title feat: require explicit auto-agent enablement 💭 feat: Require Explicit Auto-agent Enablement for Memories May 1, 2026
@danny-avila danny-avila merged commit 74307e6 into dev May 1, 2026
15 checks passed
@danny-avila danny-avila deleted the codex/phase1-memory-agent-opt-in branch May 1, 2026 14:56
fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request May 3, 2026
jcbartle pushed a commit to jcbartle/LibreChat that referenced this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants