Files
plugin-registry/plugins/topic-memory/README.md
T
ixoblakp 8dec8f6038 Initial Arka plugin registry: Official plugins mirror + Arka-signed index
11 plugins from github.com/librefang/librefang-registry plugins/.
index.json / index.json.sig are signed with Arka's Ed25519 key
(not upstream stats.librefang.ai). Private key is not in this repo.
2026-09-01 10:22:07 +03:00

1.3 KiB

topic-memory

Topic-aware memory recall using keyword clustering. Tracks conversation topics per agent and recalls related context when similar topics arise in future conversations.

How it works

After each turn, the plugin extracts keywords from user and assistant messages, then either merges them into an existing topic cluster (Jaccard similarity > 0.3) or creates a new one. Each cluster stores a keyword set, a summary, a hit count, and a last-seen timestamp.

On ingest, the plugin scores all stored topic clusters against the incoming message keywords using Jaccard similarity and returns the top 3 matches (threshold > 0.15) as contextual memories.

This gives agents cross-conversation topic awareness -- if a user discussed Python async patterns last week, bringing up asyncio today will recall that context.

Hooks

Hook Script Description
ingest hooks/ingest.py Scores stored topics against message keywords, returns top matches
after_turn hooks/after_turn.py Extracts keywords, merges or creates topic clusters

Storage

Topic clusters are stored at ~/.librefang/plugins/topic-memory/{agent_id}.json. Max 50 clusters per agent (lowest hit-count evicted when full).

Usage

Installed automatically when enabled in agent configuration.