feat(memory): complete external memory provider integration - #3690
Draft
JasonW404 wants to merge 9 commits into
Draft
feat(memory): complete external memory provider integration#3690JasonW404 wants to merge 9 commits into
JasonW404 wants to merge 9 commits into
Conversation
…call Squash merge of feat/final-answer-based-memory (2 commits): - feat(memory): post-final-answer memory extraction via standalone LLM call - fix(test): update memory_tool_prompt assertions for new action-steps-only policy Adds automatic memory extraction after final_answer in _stream_agent_chunks(), with a standalone LLM-based extractor service and updated memory tool prompt policy.
…ut to memory config system - Add external_provider_top_k (default: 20) and external_provider_timeout (default: 30s) fields to MemoryUserConfig - Add getter/setter functions in memory_config_service.py with validation (top_k: 1-100, timeout: 1-120s) - Add API endpoints in memory_config_app.py for setting these configurations - Add UI controls in MemoryManager.tsx with input fields and validation - Update frontend memoryService.ts to load/save these configurations - All changes respect memory_switch setting (disabled when memory is off)
- Query external providers at session start using configured top_k and timeout - Convert MemorySearchResult to ExternalMemoryItem format - Pass external_results to memory_context_service.build_context() - Add graceful error handling (failures don't break session start) - Respects memory_switch and external provider enabled settings - Logs external provider search results and failures
- Test full flow with multiple external providers - Test provider timeout with partial results - Test all providers fail gracefully (session continues) - Test MMR dedup of duplicate content - Test token budget enforcement - All tests use mocks and follow existing integration test patterns
Backend: - Add memory_provider_config_t and memory_provider_config_param_t tables for EAV configuration - Add memory_external_ingest_event_log_t for audit logging - Implement MemoryProviderConfigService for CRUD operations with validation - Implement MemoryExternalProviderService for provider lifecycle management - Implement MemoryIngestionEventService for ingest event handling - Implement MemoryProviderPluginLoader for dynamic plugin loading - Add memory_provider_app.py with REST API endpoints - Add transparent proxy integration in memory_backend_adapter.py - Add per-turn supplement hook in agent_service.py - Add content hash dedup in normalizer.py - Add elastic MMR candidate pool in mmr.py - Add ExternalMemoryItem and related models to SDK Frontend: - Add ProviderConfigCard component for provider list display - Add ProviderConfigDialog for provider configuration - Add providerService for API integration Deployment: - Add SQL migration v2.5.0_0814_external_memory_provider.sql - Update docker-compose.yml with plugin volume mapping - Update k8s manifests with plugin directory configuration - Update .env.example with new environment variables Tests: - Add comprehensive unit tests for all backend services - Add integration tests for transparent proxy - Add integration tests for per-turn supplement hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
httpx.MockTransport.external-memory-pluginrepository skill.Validation
Known limitations
OTEL_EXPORTER_OTLP_ENDPOINTis absent.shared-storage.yaml:145parse error.