I built a memory layer for AI chatbots that stores and filters what gets sent
I'm the developer of ChatSorter, a memory API for AI chatbots. I built it to solve a specific problem: most memory tools store everything and dump it all into context, that's the wrong approach. The hard problem isn't storage it's deciding what the AI actually needs at the moment.
How it works technically:
Three layers run in sequence on every message:
Layer 1 is a 5-message rolling buffer, this is what most chatbots use by default.
Layer 2 compresses every X number of messages into a summary via a local Ollama inference. Stored with importance scores, decays over time.
Layer 3 runs confidence scoring (.1-1) on every message. High-signal messages get passed into typed key/value facts name, job, allergies, pets, preferences with confidence scores and a bucket system. Confirmed facts never decay and always surface first in retrieval.
Retrieval uses a composite score: semantic similarity + importance weight + time decay. facts and summaries with an importance > X score, bypass decay entirely.
Benchmarks:
95% recall accuracy over a 1000-message sustained test with checkpoints at messages 200, 600, and 800. Checkpoints 1-3 passed perfectly. The only failure across the full test was a hobby tag not surfacing consistently.
PDF ingestion works. Tested and passing.
Current limitations / things still being worked on:
• Backend is currently Python-only
• JSON file storage works for now but won’t scale forever, eventually needs a proper DB for high concurrency
• Summaries can take a few seconds to generate since I’m not running massive datacenters
• Pinecone, Chroma, and Weaviate support are partially built but not fully implemented yet
• Advanced customization settings (importance thresholds, tuning, etc.) aren’t added yet
Why I built this instead of using existing tools:
Mem0 and Supermemory are the current popular choices. But neither exposes confidence scores, importance gating, or lets you bring your own vector DB. I wanted something transparent you can see exactly why a fact was stored, what confidence it has, and whether it's confirmed or tentative.
Repo: github.com/codeislife12/Chatsorter
Website: chatsorter.com
If you're building a chatbot and dealing with context/memory problems I'd appreciate real-world testing feedback. Right now its demo only you get 20,000 free api calls.