mengram-ai-sdk package adds Mengram memory to generateText / streamText agents as tools, plus a Cognitive Profile helper for system prompts.
Installation
Memory tools
getProcedures is the distinctive one — it returns workflows that evolved from failures, with the preconditions that were violated last time, so your agent stops repeating mistakes it already made.
Cognitive Profile as system prompt
One call returns a ready-to-use system prompt built from all three memory types:Save conversations
Extraction runs server-side — pass raw messages, Mengram distills facts, events, and workflows:Multi-user apps
Pass your end-user’s id asuserId — each user gets isolated facts, events, workflows, and profile under one API key. See Memory API for agent builders.