Feature · Context recall
Prism Memory stores what was said in a conversation and retrieves the records that bear on a new question, ranked by meaning and, optionally, by how recent they are.
Use it with a Harness thread or on its own to select context without sending the complete conversation on every turn.
Capabilities
01
Store a whole exchange, including tool steps, then recall by meaning and add the result to the prompt as context.
$memory = PrismMemory::for($user, scope: 'support');
$ids = $memory->remember($response->messages);
$recollection = $memory->recall('billing address', budget: 1500);02
Recall can fill up to a number of estimated tokens instead of a fixed limit. Memories are taken best first; one that does not fit is skipped and smaller ones behind it can still be taken.
03
A weighting mixes relevance and recency, or uses relevance only.
04
Memory is addressed by owner and scope. Recall in one scope never returns another scope’s memories.
05
The PHP package embeds through Prism and stores in your database, with no Redis, vector database or queue worker required. Larger collections can switch to pgvector, and other vector stores can be registered.
06
Memory can act as the Harness eviction sink: turns compaction pushes out of the context window are stored, and the agent gets a recall tool that searches them within the budget Harness passes.
How it fits
The PHP package is a complete memory layer: it embeds through Prism, stores in your database, queues the embedding work and fits recall to a token budget.
The TypeScript and Python packages provide the storage contract, vectors, ranking and an in-memory store. They do not embed text: you supply the vectors from your own embeddings call.
Install
particle-academy/prism-memory PHP
@particle-academy/prism-memory TypeScript
prism-ai-memory Python
Related features
Durable agent sessions
Agent harness
Durable sessions, threads, modes, approvals and subagents with their own budgets, for agents that outlive a request.
Agent file storage
Workspace
A directory of its own for an agent, where every path is checked before it touches the disk.
Provider interface
One API, every provider
One request shape for text, structured output, streaming, embeddings, media, audio, files and batches, in PHP, TypeScript and Python.