agent-memory-setup-v2

Create a 3-tier memory directory structure (HOT/WARM/COLD) for OpenClaw agents and configure the built-in memory-core plugin to use Google Gemini Embeddings 2 (gemini-embedding-2-preview) for semantic memory search. Creates memory/ directories and stub files only — no code execution or external API calls from the setup script. After setup, the agent's memory_search tool uses Gemini's cloud embedding API to index memory files. Requires a free Google Gemini API key. Use when setting up a new agent's memory system or asked about semantic memory search. Triggers on "set up memory", "memory setup", "agent memory", "gemini memory", "semantic search memory", "onboard new agent".

3,891 stars

Best use case

agent-memory-setup-v2 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create a 3-tier memory directory structure (HOT/WARM/COLD) for OpenClaw agents and configure the built-in memory-core plugin to use Google Gemini Embeddings 2 (gemini-embedding-2-preview) for semantic memory search. Creates memory/ directories and stub files only — no code execution or external API calls from the setup script. After setup, the agent's memory_search tool uses Gemini's cloud embedding API to index memory files. Requires a free Google Gemini API key. Use when setting up a new agent's memory system or asked about semantic memory search. Triggers on "set up memory", "memory setup", "agent memory", "gemini memory", "semantic search memory", "onboard new agent".

Teams using agent-memory-setup-v2 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/agent-memory-setup-v2/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/autosolutionsai-didac/agent-memory-setup-v2/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/agent-memory-setup-v2/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How agent-memory-setup-v2 Compares

Feature / Agentagent-memory-setup-v2Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create a 3-tier memory directory structure (HOT/WARM/COLD) for OpenClaw agents and configure the built-in memory-core plugin to use Google Gemini Embeddings 2 (gemini-embedding-2-preview) for semantic memory search. Creates memory/ directories and stub files only — no code execution or external API calls from the setup script. After setup, the agent's memory_search tool uses Gemini's cloud embedding API to index memory files. Requires a free Google Gemini API key. Use when setting up a new agent's memory system or asked about semantic memory search. Triggers on "set up memory", "memory setup", "agent memory", "gemini memory", "semantic search memory", "onboard new agent".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Agent Memory Setup v2 — Gemini Embeddings 2

Create a 3-tier memory directory structure for OpenClaw agents and configure semantic
search using **Google Gemini Embeddings 2**.

## What This Skill Does

1. **Creates directory structure and stub files** via a bash script (no network calls, no env reads, no dependencies)
2. **Provides configuration instructions** for openclaw.json to enable Gemini-based memory search

## Privacy Notice

⚠️ **After setup**, the agent's `memory_search` tool sends memory file content to
Google's Gemini embedding API for vectorization. This is how semantic search works —
files must be embedded to be searchable. The setup script itself makes no external calls.

## Prerequisite

Google Gemini API key — free at https://aistudio.google.com/apikey

## Setup

### Step 1: Create directory structure

```bash
bash scripts/setup_memory_v2.sh /path/to/agent/workspace
```

Creates: `memory/`, `memory/hot/`, `memory/warm/`, stub `.md` files, `heartbeat-state.json`.

### Step 2: Configure openclaw.json

Add under `agents.defaults`:

```json
"memorySearch": { "provider": "gemini" },
"compaction": { "mode": "safeguard" },
"contextPruning": { "mode": "cache-ttl", "ttl": "1h" },
"heartbeat": { "every": "1h" }
```

Set API key: `export GEMINI_API_KEY=your-key`

Enable plugin: `"lossless-claw": { "enabled": true }`

### Step 3: Restart

```bash
openclaw gateway restart
```

## Memory Tiers

- 🔥 **HOT** (`memory/hot/HOT_MEMORY.md`) — Active session state, pending actions
- 🌡️ **WARM** (`memory/warm/WARM_MEMORY.md`) — Stable preferences, references
- ❄️ **COLD** (`MEMORY.md`) — Long-term milestones and distilled lessons

## Optional Plugin

**Lossless Claw** (`@martian-engineering/lossless-claw`) — compacts old context into
expandable summaries to prevent amnesia. Install separately:
`openclaw plugins install @martian-engineering/lossless-claw`

Related Skills

Agent Memory Architecture

3891
from openclaw/skills

Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.

memory-cache

3891
from openclaw/skills

High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents.

General Utilities

Memory

3891
from openclaw/skills

Infinite organized memory that complements your agent's built-in memory with unlimited categorized storage.

Memory Management

auto-memory

3891
from openclaw/skills

Indestructible agent memory — permanently stored, never lost. Save decisions, identity, and context as a memory chain on the Autonomys Network. Rebuild your full history from a single CID, even after total state loss.

AI Persistence & Memory

Triple-Layer Memory System

3880
from openclaw/skills

三层记忆系统 - 解决 AI Agent 长对话记忆丢失和上下文管理问题

Memory & Context Management

agent-memory-os

3891
from openclaw/skills

Stop agents from "forgetting, mixing projects, and rotting over time" by giving them a practical memory operating system: global memory, project memory, promotion rules, validation cases, and a maintenance loop.

benos-memory-core

3891
from openclaw/skills

Core runtime/volatile memory module for BenOS agent environment. Use to: store and retrieve active session state, open loops, decisions, and scratch notes at runtime.

elite-longterm-memory

3891
from openclaw/skills

Ultimate AI agent memory system with WAL protocol, vector search, git-notes, and cloud backup. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.

memory-agent

3891
from openclaw/skills

维护用户审美偏好与创作历史,为其他 Agent 提供可复用的风格参考。当开始新任务或用户表达喜好时触发。

bamdra-memory-upgrade-operator

3891
from openclaw/skills

Safely install, uninstall, reinstall, or upgrade the Bamdra OpenClaw memory suite when stale config, existing plugin directories, or partial installs break normal `openclaw plugins install` flows.

hierarchical-memory

3891
from openclaw/skills

Manage and navigate a multi-layered, branch-based memory system. This skill helps organize complex agent context into Root, Domain, and Project layers to prevent context bloat. It includes a helper script `add_branch.py` which creates local markdown files and directories to structure your memory.

agentmemory

3891
from openclaw/skills

End-to-end encrypted cloud memory for AI agents. 100GB free storage. Store memories, files, and secrets securely.