New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@tekmemo/ai-sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tekmemo/ai-sdk

Vercel AI SDK integration for TekMemo memory tools and context building.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
5
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

@tekmemo/ai-sdk

npm License: MIT Types CI Status

Vercel AI SDK integration for TekMemo. This package enables AI agents to interact with their own memory through structured tools and automated context injection.

Features

  • Context Building: Automatically assemble Core, Archival, and Recall memory into a prompt-ready string.
  • Structured Tools: Ready-to-use memoryTool for the AI SDK generateText and streamText functions.
  • Retrieval Planning: Configurable retrieval logic to decide which memory layers to read for a given call.

Installation

# pnpm
pnpm add @tekmemo/ai-sdk tekmemo

# npm
npm install @tekmemo/ai-sdk tekmemo

# yarn
yarn add @tekmemo/ai-sdk tekmemo

Usage

Using the Memory Tool

import { generateText } from "ai";
import { buildMemoryToolDefinition } from "@tekmemo/ai-sdk";
import { store } from "./my-store";

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools: {
    manage_memory: buildMemoryToolDefinition({ store })
  },
  prompt: "Remember that my birthday is tomorrow."
});

Injecting Memory Context

import { buildPrepareCallMemoryText } from "@tekmemo/ai-sdk";

const context = await buildPrepareCallMemoryText({
  stores: { workspace: store },
  retrievalPlan: { readUserMemory: true, readArchivalMemory: true },
  baseInstructions: "You are a helpful assistant with access to the following memory:"
});

// Pass `context` to your system prompt
  • tekmemo: Core memory models and logic.

FAQs

Package last updated on 06 May 2026

Related posts