Persistent Memory for Mastra - Unison Integration
Give Mastra agents persistent team memory with the Unison TypeScript SDK: recall into instructions, ingest on completion.
Learn how to give Mastra agents persistent team memory with Unison.
Official adapter
The fastest path is @unisonlabs/mastra — attach Unison as a Mastra Agent memory provider; it injects recalled brain context before each turn and persists after:
npm i @unisonlabs/mastra @mastra/coreimport { Agent } from '@mastra/core/agent';
import { UnisonMastraMemory } from '@unisonlabs/mastra';
const agent = new Agent({
name: 'assistant',
instructions: '…',
model,
memory: new UnisonMastraMemory({ token: process.env.UNISON_TOKEN }),
});Also exported: UnisonMemory (a standalone facade with recall()/persist()) and UnisonMemoryProcessor for the processor pattern. Mastra's own memory handles the live thread; Unison persists what the whole team's agents learned across projects and machines. For multi-user products, use a brain:act-as service key with per-user actors (details).
Persistent Memory for Vercel AI SDK - Unison Integration
Give Vercel AI SDK agents persistent team memory: contextMd into the system prompt, conversation ingest after each generation.
Persistent Memory for Pipecat Voice Agents - Unison Integration
Give Pipecat voice agents persistent memory: recall before the call primes the system prompt, the transcript is ingested when the call ends - via the pipecat-unison integration.