Glossary
A concise reference for the AI agent memory, vector search, and programmable-memory terms used across the Liath site — and how Liath implements each. New to the model? Start with why agents need programmable memory.
Core model
- Programmable memory
- A model in which an AI agent queries its memory by writing a program rather than calling a fixed API. In Liath, the agent generates a sandboxed Lua program that runs search, filtering, ranking, and shaping in one execution, so the retrieval strategy lives where the reasoning is.
- Embedded database
- A database that runs inside the application process as a single dependency, with no separate server or cluster to operate. SQLite is the classic example; Liath applies the same embedded, zero-infrastructure model to AI agent memory.
- Agent memory
- The information an AI agent retains and recalls across steps and sessions — conversation history, tool state, tagged facts with importance, and semantically searchable memories. Good agent memory is not just vectors; it also needs structured state and custom recall strategies.
- Sandboxed execution
- Running code in a restricted environment that blocks file system, network, and system access. Liath executes agent-generated Lua in a sandbox, so an agent gets full programmability over retrieval while the code stays contained to the memory store.
- Local-first
- An application model that keeps data on the user's device and treats the network as optional. Liath supports local-first AI by running embedded and generating embeddings and vector search locally, so memory works offline and stays private by default.
Search & storage
- Vector search
- Finding the items whose embedding vectors are most similar to a query vector, usually by nearest-neighbor search. Liath provides vector similarity search over embeddings using the USearch index, callable from inside a Lua program.
- Embedding
- A numeric vector that represents the meaning of a piece of text, so that semantically similar text produces nearby vectors. Liath generates embeddings locally with FastEmbed, turning plain text into searchable memory with store_with_embedding().
- Semantic search
- Retrieval by meaning rather than exact keywords, implemented by embedding the query and finding the nearest stored vectors. In Liath, semantic_search() returns the most similar memories and can be composed with filtering and ranking inside a Lua program.
- Key-value store
- A store that maps keys to values for fast, direct lookups. Liath includes a persistent, namespaced key-value store backed by Fjall, used for agent state, configuration, and structured memory alongside vector search.
Agent & integration
- RAG (Retrieval-Augmented Generation)
- A technique where relevant documents are retrieved and added to an LLM prompt so the model answers from that context. Liath can run a full RAG pipeline in one embedded engine: index documents with embeddings, then retrieve and assemble context with a programmable Lua query.
- MCP (Model Context Protocol)
- A standard protocol that lets AI assistants and agent frameworks connect to external tools and data sources. Liath can run as an MCP server, exposing its memory to agents through this standard interface.
- Namespace
- An isolated data context inside one engine. Liath uses namespaces to separate memory per agent, tenant, or environment, so many agents can share a single embedded engine without overwriting each other.
- Importance scoring
- Attaching a weight to a memory that reflects how significant it is, so recall can favor important facts. Liath stores memories with tags and importance scores, which a Lua program can combine with similarity to re-rank results.
- Tool state
- Durable working memory that an agent persists and retrieves between steps of a task. Liath exposes set_tool_state() and get_tool_state() so long-running agents keep state across a multi-step task.