pacifio

Fraction — AI skill for Claude Code

AI community

Persistent memory layer for LLM agents and AI applications.

How to install Fraction

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pacifio/fraction and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Fraction does

Persistent memory layer for LLM agents and AI applications. Zero API costs, sub-100ms ingestion, fully offline.

Alternatives in AI

  • Osaurus — Own your AI. The native macOS harness for AI agents -- any model, persistent memory, autonomous execution, cry 5.1k ★
  • Manifest — Real-time cost observability for OpenClaw agents — track tokens, costs, messages, and model usage 4.1k ★
  • Memmy Agent — 🍙 A personal AI agent & local memory hub for all AI agents, gives every AI one shared, fully controlled memor 1k ★

README

Fraction

Persistent memory layer for LLM agents and AI applications. **3x faster** than LLM-based extraction — zero API costs, sub-100ms ingestion, fully offline.

Outperforms **mem0** on BLEU-1 (+17%), F1 (+10%), and LLM Judge (+14%). Outperforms **supermemory** on BLEU-1 (+8%) and LLM Judge (+5%). All with **zero LLM calls** and **1.6x faster ingestion** than mem0.

Fraction supports two extraction modes:

  • LLMLingua-2 (default) — learned token compression, zero API cost, fully offline
  • LLM extraction — any LLM provider via litellm (OpenAI, Anthropic, Ollama, etc.)

Both modes use the same hybrid retrieval layer: vector similarity + BM25 + entity graph + temporal boost, merged via Reciprocal Rank Fusion.

Installation

pip install fractionally

# Download the spaCy model for entity extraction
python -m spacy download en_core_web_sm

# Optional: install litellm for LLM-based extraction (supports any provider)
pip install fractionally[llm]

Quick Start

from fraction import Memory

m = Memory()

# Add memories
m.add("I love hiking in the Rocky Mountains.", user_id="alice")
m.add("My favorite book is Dune by Frank Herbert.", user_id="alice")
m.add("I'm allergic to peanuts.", user_id="alice")

# Search memories
results = m.search("outdoor activities", user_id="alice")
for r in results["results"]:
    print(f"{r['memory']} (score: {r['score']:.3f})")

# Memories auto-persist to ~/.fraction/

Features

  • Two extraction modes — LLMLingua-2 (free, offline) or LLM-based (any provider via litellm)
  • Zero API cost (default mode) — compression + embedding + retrieval run locally
  • Sub-100ms ingestion — LLMLingua-2 compression + USearch indexing
  • Deterministic — same input always produces same memory (LLMLingua mode)
  • Hybrid retrieval — vector similarity + BM25 keywords + entity graph, merged via Reciprocal Rank Fusion
  • Auto-persistence — memories survive process res