Skip to Content
FeaturesMemory & Context

Memory & Context

OpenClaw maintains context within conversations and can remember information across sessions.

Conversation Context

Within a Session

OpenClaw remembers everything discussed in the current conversation:

  • Previous questions and answers
  • Files you’ve uploaded
  • Topics you’ve mentioned
  • Decisions you’ve made

This context is used to provide relevant, coherent responses.

Context Window

The context window determines how much history OpenClaw can reference:

Model ProfileContext WindowApproximate Messages
Fast200K tokens~500 messages
Balanced200K tokens~500 messages
Reasoning200K tokens~500 messages

When conversations exceed the context window, older messages are summarized to preserve key information.

Long-Term Memory

Preferences

OpenClaw remembers your preferences:

  • Communication style (formal, casual, technical)
  • Preferred response length
  • Topics you work on frequently
  • Tools and technologies you use

Facts About You

You can tell OpenClaw things to remember:

You: Remember that I prefer Python over JavaScript OpenClaw: Got it! I'll prioritize Python in my code suggestions.
You: My company's main product is called "Acme Widget" OpenClaw: Noted! I'll remember that for future context.

Retrieving Memories

Ask OpenClaw what it remembers:

You: What do you know about my preferences? OpenClaw: Based on our conversations: - You prefer Python over JavaScript - You work at a company that makes "Acme Widget" - You like concise responses - You're interested in AI and automation

Memory Storage

Cloudflare Workers

Memories stored in Durable Objects:

  • Persistent across sessions
  • Encrypted at rest
  • Automatically replicated

VPS Deployment

Memories stored in local database:

  • SQLite by default
  • PostgreSQL optional
  • Full control over data

Local Deployment

Memories stored on your machine:

  • SQLite database
  • Easy to backup
  • Complete privacy

Managing Memory

Clear Conversation Context

Start fresh within a conversation:

You: /clear OpenClaw: Context cleared. Starting fresh!

Clear All Memories

Remove all stored information:

You: /forget everything OpenClaw: Are you sure? This will delete all memories. Reply "yes" to confirm.

Export Memories

Download your stored data:

You: /export memories OpenClaw: Here's your memory export: [download link]

Privacy

Your memories are:

  • Stored only on your infrastructure
  • Never shared with third parties
  • Not used for AI training
  • Deletable at any time

See Privacy & Security for more details.