Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt

Use this file to discover all available pages before exploring further.

Installation

npm install @frontmcp/plugin-remember

Basic Usage

import { FrontMcp } from '@frontmcp/sdk';
import { RememberPlugin } from '@frontmcp/plugin-remember';

@FrontMcp({
  plugins: [
    new RememberPlugin({
      store: redis // or 'memory' for development
    })
  ]
})
export class MyServer {}

Added Tools

The plugin adds these tools to your server:

remember

Store information for later:
// AI agent can call:
await mcp.callTool('remember', {
  key: 'user_preference',
  value: 'prefers dark mode',
  ttl: 86400000 // 24 hours
});

recall

Retrieve stored information:
const preference = await mcp.callTool('recall', {
  key: 'user_preference'
});
// "prefers dark mode"

forget

Remove stored information:
await mcp.callTool('forget', {
  key: 'user_preference'
});

Configuration

new RememberPlugin({
  // Storage backend
  store: redis, // or 'memory'

  // Default TTL
  ttl: 86400000 * 30, // 30 days

  // Key prefix
  prefix: 'memory:',

  // Per-user namespacing
  namespace: (ctx) => ctx.userId,

  // Maximum memories per user
  maxItems: 1000
})

Memory Categories

Organize memories by category:
await mcp.callTool('remember', {
  category: 'preferences',
  key: 'theme',
  value: 'dark'
});

await mcp.callTool('remember', {
  category: 'context',
  key: 'current_project',
  value: 'AgentFront documentation'
});

Semantic Memory

Store with embeddings for semantic retrieval:
new RememberPlugin({
  store: redis,
  vectorDb: vectoriaDb, // Enable semantic search

  // Configure embedding
  embedding: {
    model: 'text-embedding-3-small',
    dimensions: 1536
  }
})
Semantic recall:
const memories = await mcp.callTool('recallSimilar', {
  query: 'What does the user like?',
  limit: 5
});

Conversation History

Automatically remember conversation context:
new RememberPlugin({
  store: redis,
  conversationHistory: {
    enabled: true,
    maxMessages: 100,
    summarizeAfter: 50
  }
})

Access in Tools

Access memories in your tools:
@App({ name: 'assistant' })
class AssistantApp {
  constructor(private memory: MemoryProvider) {}

  @Tool({ name: 'greet' })
  async greet() {
    const name = await this.memory.get('user_name');
    return `Hello, ${name || 'there'}!`;
  }
}

Next Steps

CodeCall Plugin

Code execution

VectoriaDB

Semantic search