Tag: python
All the articles with the tag "python".
The AI Memory Funnel: Triaging and Crystallizing Agent Context
Updated: at 06:00 AMAI memory isn't just dumping logs into a vector DB. It's a lifecycle. We built a three-tier funnel in membox—Trace to Unit to Crystal—that automatically decays noise, consolidates facts, and crystallizes high-frequency context without ever explicitly deleting anything.
Decoupling LLM Extraction: Building an Async Ingestion Queue in SQLite
Updated: at 07:00 AMLLM extraction is brutally slow. We solved it without a message broker: a single SQLite table acts as a durable async queue, a transient worker process drains it, and a lease in the meta table guarantees only one worker runs at a time, with built-in crash recovery.
Concurrency in Local-First AI: Making SQLite Multi-Agent Safe
Updated: at 08:00 AMHow to fix SQLite database locks when multiple AI agents write to memory simultaneously, using WAL mode, threading.local, and application-layer RLocks.
Graph Traversal Without a Graph Database: BFS in Pure Python
Updated: at 07:00 AMWhy Neo4j is overkill for a personal AI agent's memory, and how to implement fast, multi-hop context retrieval using BFS in pure Python over SQLite.
Building a Deduplication Pipeline for Local Knowledge Graphs
Updated: at 06:00 AMWhy LLM extraction fails at knowledge graphs, and how a cascade of exact aliases, embeddings, and string fallback keeps local SQLite graphs clean.
Setting Up a Python Project Skeleton That Scales
Published: at 09:00 AMHow membox chose its libraries, organized its modules, and used typing.Protocol to keep the core dependency-free while staying testable and extensible.
