SuperAPIAI Directory

furui

github.com · Other AI tools

furui is an MCP long-term memory server for AI agents, whose core feature is "knowing what to forget". It lets memories decay by half-life, be reinforced when recalled, be pruned when below a threshold, while pinned memories remain unchanged. The project runs entirely locally, using Python and the standard library sqlite3, with no API keys, network, or embedding vectors.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWindows · API

About this tool

Purpose

furui is an MCP server that provides filtered long-term memory for AI agents. The core problem it solves is not "what content is similar" but "what content is still worth remembering". Memories decay over time, are reinforced when used, and are pruned when no longer important; pinned memories remain unchanged. The name furui (篩) means "sieve" in Japanese and is also a pun on "古い" (old), echoing its purpose: determining which old content is still worth keeping.

Main capabilities

  • Decay: Each memory's strength decreases along a half-life curve; the default half-life is 30 days.
  • Reinforcement: Recalling a memory resets its decay clock and increases its strength.
  • Pruning: prune can list or delete memories that have decayed below the threshold.
  • Pinned memories: Pinned memories use max(recency, FURUI_PIN_FLOOR) and are not listed as pruning candidates.
  • Fully local: Based on Python and the standard library sqlite3, with no API keys, network, or embedding vectors.

Scoring mechanism

Each memory's current score is computed at read time and never stored:

score = importance × recency × reinforcement

  • importance: A 1–5 value given at remember time; a brand-new memory's score equals its importance.
  • recency: The number of days since the last recall (or creation time if never recalled) decays by half-life: recency = 0.5^(idle_days / half_life).
  • reinforcement: Rewards memories that remain useful, with diminishing returns: reinforcement = 1 + 0.5 · ln(1 + recall_count). Recall both increases recall_count and resets the decay clock.
  • relevance (used for recall): Based on keyword overlap. The query and memory text and tags are lowercased and split on whitespace and punctuation; common stop words and single-letter fragments in the query are discarded; relevance = |query words ∩ memory words| / |query words|. Memories with zero overlap are not returned; the rest are sorted by relevance × score.

Results will include each memory's score, eachFactors (recency, reinforcement), idle_days, as well as relevance and rank at recall time, so the agent can understand the reasons for the ordering.

Usage

Requires Python 3.11+. The demo does not need the MCP SDK; it uses an in-memory database and a simulated clock, so memory decay, reinforcement, and cleanup can be observed.

furui can be added to any MCP client that starts a stdio server (such as Claude Desktop, Cursor, Antigravity, etc.) by pointing command at the furui script in the virtual environment. On Windows the command is C:\path\to\furui\.venv\Scripts\furui.exe; alternatively use "command": "python", "args": ["-m", "furui.server"] with the correct interpreter.

Suggested agent loop: recall before answering questions that depend on past context; remember persistent facts and decisions; occasionally run prune(0.5) (dry run), review the list, then run with dry_run=false.

Use cases and limitations

Suitable for AI agents that need long-term memory lifecycle management, especially scenarios that want to automatically retire outdated information and retain frequently useful information. Compared with common append-only memory servers, furui emphasizes lifecycle rather than mere retrieval.

Limitations and notes: v1 scores all memories in Python on every recall, which suits a scale of thousands of memories; at larger scale, FTS5 pre-filtering is the natural next step. Embedding vectors may be added in the future as an optional relevance signal, but the current core is lifecycle management. Regarding the cleanup threshold, a brand-new importance-1 memory scores 1.0, and an importance-3 memory scores 0.375 after three half-lives untouched, so a threshold between 0.25 and 1.0 is appropriate; stats() reports how many memories each of 0.25 / 0.5 / 1.0 would remove. The project uses the MIT license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools