Skip to content
UVTR InfoTech Ltd.

Fraction

Long-term memory for AI agents, with no API calls

  • Data & AI Search
  • AI & Automation
Fraction

01

Project introduction

Fraction is an open-source memory layer for LLM agents and AI applications. It stores what an agent learns and finds it again later, and in its default mode it runs fully offline with no API costs.

02

The background

An agent forgets everything between sessions unless something stores and retrieves what it learned. Memory layers such as mem0 call an LLM to extract each memory, so every write carries an API cost and a wait.

03

The challenge

  • Store memories without calling an LLM for every write.
  • Keep ingestion fast enough for live conversations.
  • Answer different kinds of question: by meaning, by exact term, through related people and places, and by date.

04

The approach

  • 1Replaced LLM extraction with learned token compression: LLMLingua-2 keeps the most important 60% of tokens.
  • 2Extracted people, places and organisations with spaCy instead of an LLM.
  • 3Combined four retrieval signals and merged them with Reciprocal Rank Fusion.
  • 4Skipped filler turns with a relevance gate, so only useful content is stored.

05

The solution

  • A Python library (pip install fractionally) with a simple Memory API to add, search, update and delete memories.
  • Memories scoped by user, agent or run, and saved automatically.
  • An optional LLM extraction mode through LiteLLM, for any provider.

06

Key features

  • Zero API cost in the default mode.
  • Deterministic: the same input always produces the same memory.
  • Hybrid retrieval: vector similarity, BM25 keywords, entity graph and temporal boost.
  • Memories persist across restarts.
  • Scoping by user_id, agent_id or run_id.
  • MIT licensed.

07

Technology stack

  • Python
  • LLMLingua-2
  • spaCy
  • Sentence-Transformers (BGE-base)
  • USearch (HNSW)
  • BM25
  • LiteLLM (optional)

08

The outcome

  • $0API cost for memory operations
  • 3×faster ingestion than its own LLM-extraction mode (449 ms vs 1,385 ms median)
  • 0.41BLEU-1, against about 0.35 for mem0
  • 449 msmedian add() time, against 708 ms for mem0
  • Higher LLM-judge score (1 to 5) than mem0 and supermemory: 3.66 against about 3.2 and 3.5.
  • Trails supermemory on F1 (0.44 against about 0.45) and mem0 on the yes/no LLM-judge score (0.62 against about 0.669).

Benchmark figures as reported in the project's README on the LoCoMo benchmark (1,540 questions across 10 conversations), read 19 November 2026. They have not been independently reproduced.

09

Project visuals

How Fraction writes and reads a memory

Write path

  1. 01TextA message or a conversation
  2. 02CompressLLMLingua-2 keeps the top 60% of tokens
  3. 03EntitiesspaCy finds people, places and organisations
  4. 04EmbedBGE-base, 768 dimensions, locally
  5. 05IndexUSearch HNSW index and entity graph

Read path

  1. 01QueryA question from the agent
  2. 02EmbedSame local model
  3. 03Four signalsVector, BM25, entity graph and temporal boost
  4. 04RerankReciprocal Rank Fusion
  5. 05ResultsRanked memories with scores
Write and read paths as documented in the project's README.
All projects

Let's scale together.

Book a demo or start a project.

Phone and WhatsApp
+880 1902-305223
Email
contact@uvtrinfotech.com
Office
Flat 8B, Miahje Tower, House 58, Block B, Road 3, Niketan, Gulshan-1, Dhaka-1217

Tell us what you need

Used only to reply to you.