memoria

TotalClaw 作者 totalclaw

人工智能代理的结构化记忆系统。当用户想要存储、调用或搜索记忆、管理会话生命周期(唤醒/睡眠/检查点)、同步到 Notion 或当用户共享应记住的重要信息(事实、决策、偏好、课程、承诺、关系、项目)时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~kitakitsune0x-memoria
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~kitakitsune0x-memoria/file -o kitakitsune0x-memoria.md
## 概述(中文)

人工智能代理的结构化记忆系统。当用户想要存储、调用或搜索记忆、管理会话生命周期(唤醒/睡眠/检查点)、同步到 Notion 或当用户共享应记住的重要信息(事实、决策、偏好、课程、承诺、关系、项目)时使用。

## 原文

# Memoria

## Environment

Set the vault path so all commands work:

```bash
export MEMORIA_VAULT=~/memory
```

If not set, pass `-v ~/memory` on every command.

## Session Lifecycle

Run at the start and end of every session:

```bash
memoria wake                                          # start session, restore context
memoria checkpoint --working-on "<task>"               # mid-session save
memoria sleep "<summary>" --next "<next steps>"        # end session, write handoff
```

## Storing Memories

```bash
memoria remember <type> "<title>" --content "<details>"
memoria sync --push                                    # always sync after storing
```

Types: `fact`, `decision`, `preference`, `lesson`, `commitment`, `relationship`, `project`

### What to capture (proactively, without being asked)

| Signal | Type |
|--------|------|
| Human shares personal info (name, location, health, settings) | `fact` |
| A decision is made with reasoning | `decision` |
| Human says "I prefer / always / never..." | `preference` |
| An insight or lesson emerges | `lesson` |
| A promise, goal, or deadline is set | `commitment` |
| A person is mentioned with context | `relationship` |
| An ongoing project is discussed | `project` |

**If in doubt, store it.** Better to have a memory you never look up than to forget something.

### Proactive capture triggers

Listen for these patterns and store immediately:

- "I always...", "I never...", "I prefer..." -> `preference`
- "Let's go with...", "We decided...", "The plan is..." -> `decision`
- "I learned that...", "Turns out...", "The trick is..." -> `lesson`
- "My name is...", "I take...", "I live in...", "I work at..." -> `fact`
- "I need to...", "I promised...", "By next week..." -> `commitment`
- "Talk to Alice about...", "Bob said..." -> `relationship`
- "We're building...", "The project is..." -> `project`

### Examples

```bash
memoria remember fact "Human lives in Tokyo" --content "Mentioned during onboarding"
memoria remember preference "No emojis in code" --content "Explicitly requested"
memoria remember decision "Use Fly.io" --content "Chosen over Vercel for APAC latency"
memoria sync --push
```

## Searching

Before making decisions or giving advice, check existing memories:

```bash
memoria search "<query>"
```

## Other Commands

```bash
memoria store <category> "<title>" --content "<body>"  # store in explicit category
memoria list [category]                                 # list documents
memoria get <id>                                        # get specific document
memoria status                                          # vault stats + session state
memoria sync --pull                                     # pull Notion changes to local
```

## Notion Setup

One-time configuration:

```bash
memoria setup-notion --token <token> --page <page-id>
```

After setup, always run `memoria sync --push` after storing memories.