> ## 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.

# Remember Plugin

> Give AI agents persistent memory across sessions. Remember user preferences, conversation context, and learned information.

## Installation

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
npm install @frontmcp/plugin-remember
```

## Basic Usage

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
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:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
// AI agent can call:
await mcp.callTool('remember', {
  key: 'user_preference',
  value: 'prefers dark mode',
  ttl: 86400000 // 24 hours
});
```

### recall

Retrieve stored information:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
const preference = await mcp.callTool('recall', {
  key: 'user_preference'
});
// "prefers dark mode"
```

### forget

Remove stored information:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
await mcp.callTool('forget', {
  key: 'user_preference'
});
```

## Configuration

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
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:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
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:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new RememberPlugin({
  store: redis,
  vectorDb: vectoriaDb, // Enable semantic search

  // Configure embedding
  embedding: {
    model: 'text-embedding-3-small',
    dimensions: 1536
  }
})
```

Semantic recall:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
const memories = await mcp.callTool('recallSimilar', {
  query: 'What does the user like?',
  limit: 5
});
```

## Conversation History

Automatically remember conversation context:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new RememberPlugin({
  store: redis,
  conversationHistory: {
    enabled: true,
    maxMessages: 100,
    summarizeAfter: 50
  }
})
```

## Access in Tools

Access memories in your tools:

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
@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

<CardGroup cols={2}>
  <Card title="CodeCall Plugin" icon="code" href="/frontmcp/plugins/docs/official/codecall">
    Code execution
  </Card>

  <Card title="VectoriaDB" icon="database" href="/frontmcp/vectoriadb/docs/introduction">
    Semantic search
  </Card>
</CardGroup>
