Files
librefang-registry/plugins/keyword-memory
Evan Hu 5e4fc2ccf3 chore(plugins): add [integrity] SHA-256 hashes for all hook scripts
The daemon's `manifest_missing_integrity_hooks` check (#3804) hard-fails
any registry install whose plugin.toml declares hooks but lacks an
[integrity] entry for each one. All 11 plugins under plugins/ had the
[hooks] table but were missing [integrity], so `librefang plugin install
<name>` would error after download with "missing [integrity] hashes for
hook script(s): ...".

Compute and pin SHA-256 over each `hooks/*.py` under every plugin dir.
The mempalace-indexer entries were already present and are unchanged
(reordered alphabetically by the regenerator).

Verified each plugin.toml still parses (Python tomllib).
2026-05-05 00:29:39 +09:00
..
2026-03-21 02:51:58 +09:00

keyword-memory

Extracts keywords and named entities from user messages and returns them as contextual memories. Gives agents awareness of conversation topics without requiring external NLP libraries.

Extraction Techniques

  • Plain keywords: Splits words, filters English stopwords (~50 words), removes short tokens
  • Capitalized phrases: Detects multi-word proper nouns and mid-sentence capitalized words
  • Emails and URLs: Regex pattern matching
  • Numbers with units: e.g. 500ms, 10GB, 3.5GHz
  • Dates: YYYY-MM-DD, MM/DD/YYYY, DD.MM.YYYY formats
  • Technical terms: camelCase, snake_case, dotted identifiers (e.g. os.path)

Results are deduplicated and capped at 10 keywords.

Hooks

Hook Script Description
ingest hooks/ingest.py Extracts keywords from the user message and returns them as a memory fragment

Example Output

{"type": "ingest_result", "memories": [{"content": "[keyword-memory] Key topics: GPT-4, machine_learning, data pipeline, https://example.com"}]}

If no meaningful keywords are found, returns an empty memories list.

Usage

Installed automatically when enabled in agent configuration. No external dependencies required (stdlib only).