Memory System
Persistent fact storage that gives your AI agents memory across workflow runs.
Memory System
Linea's memory system gives your AI agents persistent, structured memory across workflow runs. Agents can remember facts, user preferences, and past events — and retrieve them later with natural-language search.
How it works
When you send text to the memory ingest endpoint, Linea:
- Breaks the text into the smallest self-contained facts
- Checks whether any of those facts conflict with existing memories
- If a new fact supersedes an old one, the old memory is automatically retired
- Stores the remaining facts and makes them searchable
This means your agent's memory stays accurate over time — stale facts are replaced, not duplicated.
Memory scopes
| Scope | What it covers |
|---|---|
thread | A single agent conversation |
workflow | All runs of a specific workflow |
user | Persistent facts about a user across all workflows |
Fact types
Memories can be categorized for easier retrieval:
| Type | Examples |
|---|---|
fact | General information |
preference | "User prefers dark mode" |
event | "Deployed to production on 2024-03-15" |
profile | "User's name is Alex" |
system | Internal agent notes |
API Endpoints
| Method | Path | Description |
|---|---|---|
POST | /workspaces/:wId/memories/ingest | Ingest text and extract facts |
POST | /workspaces/:wId/memories/search | Search memories by natural language query |
GET | /workspaces/:wId/memories | List memories |
DELETE | /workspaces/:wId/memories/:id | Delete a memory |
GET | /workspaces/:wId/memories/profile | Get user profile grouped by fact type |
Ingesting memories
Response:
Searching memories
Search uses a combination of semantic similarity and keyword matching to find the most relevant memories.
User profile
Get all memories about a user, grouped by fact type:
Using memory in workflows
The Memory node inside a workflow can read from or write to memory directly — no API calls needed. Facts stored during one run are available in all future runs.
Memory search is powered by semantic embeddings. Queries like "what city is the user in?" will match memories like "Alex is based in London" even without exact keyword overlap.