docs(agent): remove stale BuiltinMemoryProvider references from memory module docstrings

The BuiltinMemoryProvider class was removed from the codebase but its
name lingered in the module-level docstrings of memory_manager.py and
memory_provider.py, creating false expectations:

- memory_manager.py docstring showed example code doing
  add_provider(BuiltinMemoryProvider(...)) which ImportError at runtime
- memory_provider.py docstring listed BuiltinMemoryProvider as
  'always present, not removable' — misleading for new contributors

The regression test (test_memory_user_id.py) already passes without
any reference to BuiltinMemoryProvider; it uses RecordingProvider
instances directly. The stale references were docs-only drift.

Update both docstrings to reflect the actual current architecture:
MemoryManager accepts external plugin providers only (one at a time).

Closes #14402
This commit is contained in:
Bartok9 2026-04-23 14:38:57 +07:00
parent d1ce358646
commit 09ec4a7012
2 changed files with 11 additions and 15 deletions

View file

@ -1,17 +1,14 @@
"""MemoryManager — orchestrates the built-in memory provider plus at most """MemoryManager — orchestrates memory providers for the agent.
ONE external plugin memory provider.
Single integration point in run_agent.py. Replaces scattered per-backend Single integration point in run_agent.py. Replaces scattered per-backend
code with one manager that delegates to registered providers. code with one manager that delegates to registered providers.
The BuiltinMemoryProvider is always registered first and cannot be removed. Only ONE external plugin provider is allowed at a time attempting to
Only ONE external (non-builtin) provider is allowed at a time attempting register a second external provider is rejected with a warning. This
to register a second external provider is rejected with a warning. This
prevents tool schema bloat and conflicting memory backends. prevents tool schema bloat and conflicting memory backends.
Usage in run_agent.py: Usage in run_agent.py:
self._memory_manager = MemoryManager() self._memory_manager = MemoryManager()
self._memory_manager.add_provider(BuiltinMemoryProvider(...))
# Only ONE of these: # Only ONE of these:
self._memory_manager.add_provider(plugin_provider) self._memory_manager.add_provider(plugin_provider)

View file

@ -1,17 +1,16 @@
"""Abstract base class for pluggable memory providers. """Abstract base class for pluggable memory providers.
Memory providers give the agent persistent recall across sessions. One Memory providers give the agent persistent recall across sessions.
external provider is active at a time alongside the always-on built-in The MemoryManager enforces a one-external-provider limit to prevent
memory (MEMORY.md / USER.md). The MemoryManager enforces this limit. tool schema bloat and conflicting memory backends.
Built-in memory is always active as the first provider and cannot be removed. External providers (Honcho, Hindsight, Mem0, etc.) are registered
External providers (Honcho, Hindsight, Mem0, etc.) are additive they never and managed via MemoryManager. Only one external provider runs at a
disable the built-in store. Only one external provider runs at a time to time.
prevent tool schema bloat and conflicting memory backends.
Registration: Registration:
1. Built-in: BuiltinMemoryProvider always present, not removable. Plugins ship in plugins/memory/<name>/ and are activated via
2. Plugins: Ship in plugins/memory/<name>/, activated by memory.provider config. the memory.provider config key.
Lifecycle (called by MemoryManager, wired in run_agent.py): Lifecycle (called by MemoryManager, wired in run_agent.py):
initialize() connect, create resources, warm up initialize() connect, create resources, warm up