Polign: A Stateless, Typed Database for Edge Agent Memory

Polign is a lightweight, stateless database designed to provide deterministic memory for AI agents running on hardware-constrained edge devices. By moving memory management from the LLM's prompt context into a typed schema, Polign reduces token costs and eliminates the ambiguity associated with semantic retrieval and contradictory information.

Deterministic Memory via Typed Schemas

Polign shifts the responsibility of memory management from the LLM to a structured database schema. In traditional agent memory systems, LLMs must often resolve contradictions—such as a user changing a preference—by rereading old text and guessing which version is current. This process consumes tokens and introduces potential inaccuracies.

Polign utilizes a typed memory store with supersession rules. When a model extracts a fact, the database determines the meaning and validity of that fact based on the schema, rather than requiring the model to figure out if a piece of recalled text is a correction or a contradiction. This allows for structured filtering and precise recall, such as performing numerical comparisons (e.g., checking if a value is above 8000) directly within the database rather than relying on the LLM to interpret a paragraph of text.

Stateless Architecture for Edge Deployment

To minimize operational costs and hardware requirements, polign_db is built as a stateless server that operates on top of a hybrid vector and BM25 engine living in an object store (such as S3).

Key architectural characteristics include:

  • Zero Durable State: The polign_db server holds no durable data, allowing processes to restart or machines to fail without loss of memory.
  • Low Resource Footprint: A demonstration serving 12.5 million passages from S3 can run with a server idling at approximately 37 MiB RSS. The entire stack—including the embedder and web app—can fit on a 2 GB ARM machine.
  • Cold-First Design: The system is optimized for infrequent, cold queries, avoiding the need for expensive hot vector indices in RAM or SSDs.

The Local Agent Stack

Polign proposes a modular "local agent stack" where the intelligence and memory reside entirely on the user's device. This stack consists of three primary layers:

  1. Local LLM: Handles the conversation and high-level logic.
  2. Typed Memory: Manages validation, supersession, structured filtering, and semantic recall.
  3. Durable Local Store: A local directory (e.g., /var/lib/agent) that ensures the user owns their data.

Community Reception and Critiques

While the technical goals of Polign are focused on efficiency and determinism, the project has faced criticism from the developer community regarding its licensing and uniqueness.

Closed Source Concerns

Several users on Hacker News noted that the closed-source nature of the underlying polign_db is a significant barrier to adoption for infrastructure tools.

"There are countless agent memory stores today. Closed source is a non-starter."

Perceived Lack of Differentiation

Some critics argued that the functionality provided—specifically a vector database hosted on S3—is now trivial to implement using existing open-source tools.

"A vector database hosted in S3 is effectively trivial to set up at this point in time. What are you offering that I can't get from prompting a powerful enough model?"

Other users suggested alternatives such as using Litestream with a SQLite vector-based design for those seeking an open-source equivalent for local agent memory.

Sources

Related

  • Project
  • Dispatch
  • Project
  • Dispatch
  • Dispatch