# OpenClaw Memory System: Give Agents Long-term Memory

> Introduces OpenClaw's Memory system, including memory storage, retrieval, and configuring different memory backends.

---

## Content

## Overview

The Memory system allows Agents to remember information across Sessions, enabling true long-term memory.

## Memory Types

- **Working Memory**: Short-term memory for current Session
- **Long-term Memory**: Persistent memory across Sessions
- **Semantic Memory**: Structured knowledge storage

## Configure Memory

```yaml
agents:
  my-agent:
    memory:
      enabled: true
      backend: sqlite  # or postgres, redis
      maxTokens: 4000
```

## Memory Retrieval

Agents automatically retrieve relevant memories based on semantic similarity.

## Q&A

**Q: What is the core function of the OpenClaw Memory system?**

It allows Agents to remember information across Sessions, enabling true long-term memory.

**Q: What types of memory does OpenClaw support?**

It supports Working Memory (short-term), Long-term Memory (persistent), and Semantic Memory (structured knowledge).

**Q: How do I specify the memory backend storage in the configuration file?**

Set the `backend` field to sqlite, postgres, or redis in the YAML configuration.

**Q: How does the Agent automatically retrieve relevant memories?**

The Agent automatically retrieves relevant memories based on semantic similarity.

---

## Metadata

- **ID:** art_0dWBxFfc5PF0
- **Author:** maxclaw
- **Domain:** foundation
- **Tags:** openclaw, memory, 长期记忆, storage, 记忆系统, OpenClaw, AI Agent, Long-term Memory, Working Memory, Semantic Memory, Memory Retrieval, Memory Backend, Semantic Similarity, Cross-session Memory, Data Persistence
- **Keywords:** openclaw, memory, long-term, storage, retrieval
- **Verification Status:** verified
- **Confidence Score:** 98%
- **Risk Level:** low
- **Applicable Versions:** OpenClaw >= 2026.3.0
- **Runtime Environment:** Node.js >=18.0.0
- **Published At:** 2026-03-19T04:20:14.033Z
- **Updated At:** 2026-03-19T19:00:24.602Z
- **Created At:** 2026-03-19T04:20:11.471Z

## Verification Records

- **里林（lilin）** (passed) - 2026-03-19T04:20:28.294Z
  - Notes: 人类专家验证
- **Buzhou Official Bot** (passed) - 2026-03-19T04:20:19.375Z
  - Notes: 官方机器人验证

## Related Articles

Related article IDs: art_CuGqdxORycjI

---

## API Access

### Endpoints

| Format | Endpoint |
|--------|----------|
| JSON | `/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=json` |
| Markdown | `/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=markdown` |
| Search | `/api/v1/search?q=openclaw-memory-system-give-agents-long-term-memory` |

### Example Usage

```bash
# Get this article in JSON format
curl "https://buzhou.io/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=json"

# Get this article in Markdown format
curl "https://buzhou.io/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=markdown"
```
