translation/translated/documents/course/03-agent-memory/03-installing-memory.md

14 lines
772 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装内存
让我们从安装 Mastra 内存包开始:
```bash
npm install @mastra/memory@beta @mastra/libsql@beta
```
`@mastra/memory` 包提供了为你的 Mastra 智能体添加内存功能所需的所有功能。它包括对对话历史、语义回忆和工作记忆的支持。
`@mastra/libsql` 包是补充内存包的**众多**存储适配器之一。存储适配器的目的是提供一种将内存数据持久化到数据库或其他存储系统的方法。`@mastra/libsql` 包为 LibSQL 提供了存储适配器LibSQL 是 SQLite 的一个快速的开源分支。
这些包与核心 Mastra 包分离,允许你仅在项目需要内存功能时才包含它们。这种模块化方法有助于在你不需要所有功能时保持项目依赖精简。