Skip to content

feat: add scoped memory records and knowledge promotion#275

Draft
esafwan wants to merge 16 commits into
developfrom
feature/scoped-memory-core
Draft

feat: add scoped memory records and knowledge promotion#275
esafwan wants to merge 16 commits into
developfrom
feature/scoped-memory-core

Conversation

@esafwan
Copy link
Copy Markdown
Contributor

@esafwan esafwan commented May 27, 2026

Summary

Implements the first two development slices from the scoped memory / knowledge bridge plan:

  1. docs: add scoped memory and knowledge bridge RFC #274 core schema + tools

    • Adds Memory Record DocType as the canonical scoped memory/data layer.
    • Adds Memory Policy DocType for capture/retrieval/projection policy configuration.
    • Adds Desk actions for activating records, queueing knowledge projection, opening the generated Knowledge Input, and removing projection.
    • Adds permission-aware backend APIs/tool handlers for saving, searching, reading, archiving, and promoting memory records.
  2. docs: add scoped memory and knowledge bridge RFC #274docs: RFC for adapting Agno's knowledge/vectordb architecture into HUF #178 promote memory to knowledge

    • Adds optional promote_to_knowledge on Memory Record.
    • Projects active memory records into the existing Knowledge Input flow as Text inputs.
    • Keeps Memory Record as canonical source of truth; Knowledge Input is only the searchable projection.
    • Queues existing Knowledge Input processing so the current Knowledge Source indexing pipeline handles FTS/vector backends.

Key files

  • huf/huf/doctype/memory_record/
  • huf/huf/doctype/memory_policy/
  • huf/ai/memory_tools.py

Architecture note

This intentionally does not implement Hindsight-style learning yet. It creates the stable canonical layer first, then connects it to the existing Knowledge Source / Knowledge Input path.

This PR follows the order discussed in #274:

Memory/Data Record
→ Promote to Knowledge
→ Knowledge Input
→ existing Knowledge Source indexing

Related:

Testing

Not run in this environment.

Recommended validation after checkout:

bench --site <site> migrate
bench --site <site> clear-cache
bench build --app huf

Manual checks:

  1. Create a Memory Record with status = Active.
  2. Set Promote to Knowledge = 1 and choose a Knowledge Source.
  3. Click Queue Knowledge Projection.
  4. Confirm a Knowledge Input is created and queued/processed.
  5. Search the target Knowledge Source for the memory summary.

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.

1 participant