DEVOURED
We built three memory systems. The most expressive one wasn't the most useful
Tiger Data abandoned complex agent memory graphs in favor of a simpler tree-based structure using PostgreSQL’s ltree, integrated via their new searchgres.js library.
What: Tiger Data tested list-based, graph-based, and tree-based memory for a Slack agent. The tree structure, built with Postgres ltree, proved most effective for summarizing conversation threads, reducing the process from dozens of agent turns to one tool call. They released searchgres.js to combine BM25, semantic search, and hierarchical filters in one query.
Why it matters: Developers are finding that LLM agents often struggle with the overhead of navigating complex, abstract data structures; structured, hierarchical storage allows for more predictable tool usage and faster retrieval.
Takeaway: If your agent is struggling with graph-based memory, consider mapping the state hierarchy to a path-based tree structure in PostgreSQL.
Decoder
- ltree: A PostgreSQL extension that implements a data type for representing labels of data stored in a hierarchical tree-like structure.
- BM25: A ranking function used by search engines to estimate the relevance of documents to a given search query.
Original article
Introducing searchgres.js: Composable Search in PostgreSQL
searchgres.js composes BM25, semantic ranking, and filters for hierarchy, metadata, and time in a single Postgres query. Open-source TypeScript, Apache-2.0.
Explore all 69 articles in today's digest
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi