Search

PythonReactSEOPDF
OpenClaw

agent-memory-patterns

永続エージェント向けメモリアーキテクチャパターン

byron-mckeeby0 source installs☆ 0 Repository starsv1.0.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install byron-mckeeby/agent-memory-patterns

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

エージェント・メモリパターン

永続AIエージェントのための効率的なメモリ管理システム。日次ファイル、長期記憶、検索最適化、外部コンテンツ段階的処理の実装ガイドです。

アーキテクチャ概要

メモリ階層
workspace/
├── MEMORY.md              # 長期記憶(手動キュレーション)
├── memory/
│   ├── YYYY-MM-DD.md     # 日次ログ
│   ├── pending-memories.md  # 外部コンテンツ段階処理
│   ├── heartbeat-state.json  # ハートビート状態
│   └── queued-messages.json # メッセージキュー
└── skills/
    └── memory-tools/     # メモリ管理ツール群

日次ファイル管理

自動日次ファイル作成
#!/bin/bash
# daily-memory-init.sh

create_daily_memory() {
    local date="$(date -I)"
    local memory_dir="/home/bot/.openclaw/workspace/memory"
    local daily_file="$memory_dir/$date.md"
    
    mkdir -p "$memory_dir"
    
    if [[ ! -f "$daily_file" ]]; then
        cat > "$daily_file" << EOF
# Daily Memory: $date

## セッション開始
$(date): メモリシステム初期化

## 主要な出来事

## 学習したこと

## 次回への引き継ぎ

## 外部リンク・参考資料

EOF
        echo "日次メモリファイル作成: $daily_file"
    fi
}

create_daily_memory
日次ログ構造化
#!/bin/bash
# memory-logger.sh

log_memory() {
    local event_type="$1"
    local description="$2"
    local importance="${3:-normal}"
    
    local date="$(date -I)"
    local time="$(date '+%H:%M')"
    local memory_file="/home/bot/.openclaw/workspace/memory/$date.md"
    
    # ファイル存在確認・作成
    if [[ ! -f "$memory_file" ]]; then
        create_daily_memory
    fi
    
    # 重要度マーカー
    local marker=""
    case "$importance" in
        "high") marker="🔴 " ;;
        "medium") marker="🟡 " ;;
        "low") marker="⚪ " ;;
        *) marker="📝 " ;;
    esac
    
    # ログエントリ追加
    echo "" >> "$memory_file"
    echo "### $time - $event_type" >> "$memory_file"
    echo "$marker$description" >> "$memory_file"
    
    echo "メモリログ追加: $event_type [$importance]"
}

# 使用例
log_memory "...

Source information

Source
github
Repository
openclaw/skills
Path
skills/byron-mckeeby/agent-memory-patterns
Version
1.0.0
Commit
63605e67bd68f2747b7a95b4cb18c5d5e4fef759
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# エージェント・メモリパターン

永続AIエージェントのための効率的なメモリ管理システム。日次ファイル、長期記憶、検索最適化、外部コンテンツ段階的処理の実装ガイドです。

## アーキテクチャ概要

### メモリ階層

```
workspace/
├── MEMORY.md              # 長期記憶(手動キュレーション)
├── memory/
│   ├── YYYY-MM-DD.md     # 日次ログ
│   ├── pending-memories.md  # 外部コンテンツ段階処理
│   ├── heartbeat-state.json  # ハートビート状態
│   └── queued-messages.json # メッセージキュー
└── skills/
    └── memory-tools/     # メモリ管理ツール群
```

## 日次ファイル管理

### 自動日次ファイル作成

```bash
#!/bin/bash
# daily-memory-init.sh

create_daily_memory() {
    local date="$(date -I)"
    local memory_dir="/home/bot/.openclaw/workspace/memory"
    local daily_file="$memory_dir/$date.md"
    
    mkdir -p "$memory_dir"
    
    if [[ ! -f "$daily_file" ]]; then
        cat > "$daily_file" << EOF
# Daily Memory: $date

## セッション開始
$(date): メモリシステム初期化

## 主要な出来事

## 学習したこと

## 次回への引き継ぎ

## 外部リンク・参考資料

EOF
        echo "日次メモリファイル作成: $daily_file"
    fi
}

create_daily_memory
```

### 日次ログ構造化

```bash
#!/bin/bash
# memory-logger.sh

log_memory() {
    local event_type="$1"
    local description="$2"
    local importance="${3:-normal}"
    
    local date="$(date -I)"
    local time="$(date '+%H:%M')"
    local memory_file="/home/bot/.openclaw/workspace/memory/$date.md"
    
    # ファイル存在確認・作成
    if [[ ! -f "$memory_file" ]]; then
        create_daily_memory
    fi
    
    # 重要度マーカー
    local marker=""
    case "$importance" in
        "high") marker="🔴 " ;;
        "medium") marker="🟡 " ;;
        "low") marker="⚪ " ;;
        *) marker="📝 " ;;
    esac
    
    # ログエントリ追加
    echo "" >> "$memory_file"
    echo "### $time - $event_type" >> "$memory_file"
    echo "$marker$description" >> "$memory_file"
    
    echo "メモリログ追加: $event_type [$importance]"
}

# 使用例
log_memory "...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.