Skip to content

feat(memory): add configurable read-only toolset for memory extraction#1

Open
heaoxiang-ai wants to merge 1 commit intomainfrom
codex/develop-memory-feature-for-openviking
Open

feat(memory): add configurable read-only toolset for memory extraction#1
heaoxiang-ai wants to merge 1 commit intomainfrom
codex/develop-memory-feature-for-openviking

Conversation

@heaoxiang-ai
Copy link
Copy Markdown
Owner

Motivation

  • Make the set of read-only tools available to the memory extraction LLM configurable so different deployments can trade off cost vs recall quality without code changes.
  • Ensure safety by restricting available tools to read-only operations and preventing the LLM from attempting edits without first reading existing files.
  • Align extraction prompt text with actual runtime capabilities to avoid model confusion when prompt and behavior diverge.

Description

  • Added a new memory.llm_tools field to MemoryConfig in openviking_cli/utils/config/memory_config.py with a safe default of ["read", "search"] and allowed values read, search, ls.
  • Implemented validation that deduplicates tools, preserves order, enforces allowed values, and requires read to be present for safety in validate_llm_tools.
  • Updated SessionExtractContextProvider in openviking/session/memory/session_extract_context_provider.py to source allowed tools from get_openviking_config().memory.llm_tools and to inject the configured tool list into the extraction system instruction.
  • Updated examples/ov.conf.example to show "llm_tools": ["read", "search"] and added unit tests in tests/test_config_loader.py to cover defaults, dedup behavior, invalid tool rejection, and the requirement that read be present.

Testing

  • Compiled the modified modules with python -m compileall openviking_cli/utils/config/memory_config.py openviking/session/memory/session_extract_context_provider.py tests/test_config_loader.py, which succeeded.
  • Verified basic behavior of the MemoryConfig logic locally, but running the full test suite or pytest in this environment failed due to missing runtime dependencies (yaml, json_repair) and the test bootstrap, so the new tests were not executed under pytest here.
  • Changes were committed with message feat(memory): make extraction LLM tools configurable and include the modified example and added tests.

Codex Task

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Failed to generate code suggestions for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant