# How to teach OpenClaw your knowledge

OpenClaw [stores memory in Markdown files](https://www.knowman.io/guides/openclaw-memory) in its agent workspace, including `USER.md` for stable preferences and `MEMORY.md` for durable facts and decisions. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory) KnowMan separately saves articles and links, [answers questions](https://www.knowman.io/guides/ai-knowledge-base) with citations, and keeps memories such as claims, decisions, and playbooks. [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base)

## Put instructions in OpenClaw's workspace

OpenClaw stores memory as Markdown files in its agent workspace, which defaults to `~/.openclaw/workspace`. It remembers content saved to disk, with [no hidden memory state](https://www.knowman.io/guides/ai-agent-memory). [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Write stable preferences in USER.md

Use `USER.md` for stable preferences, communication style, relationships, and active-project context. Write profile facts as imperative directives, with observed-date and active or superseded metadata. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

When a preference changes, supersede its earlier active directive instead of keeping contradictory active instructions. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Keep durable decisions in MEMORY.md

`MEMORY.md` holds durable non-profile facts and decisions, and loads at session start. Keep it curated with short summaries rather than using it as a transcript or exhaustive archive. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Use daily notes for changing context

Store running context and observations in dated files such as `memory/YYYY-MM-DD.md`. Today's and yesterday's notes load automatically after a bare `/new` or `/reset`. Daily notes are indexed for `memory_search` and `memory_get`, but are not injected into the bootstrap prompt on every turn. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

The default dreaming sweep can distill useful daily-note material into `MEMORY.md`. If that file exceeds its bootstrap budget, OpenClaw keeps it on disk but truncates the copy injected into context. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Ask OpenClaw to remember something

You can ask OpenClaw to remember information, and it writes the note to an appropriate file. For action-sensitive memories, record when the instruction applies, when it expires or what unlocks action, what to avoid, and who owns the instruction. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Search or read a specific memory

`memory_search` finds relevant notes with [semantic search](https://www.knowman.io/guides/rag-vs-personal-knowledge-base), even when your query wording differs from the note. With an embedding provider configured, it combines semantic vector similarity with exact-term keyword matching. `memory_get` reads a specific file or line range. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Where KnowMan fits

KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories such as claims, decisions, and playbooks. Its MCP server runs locally with npx -y @knowman/mcp and as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key. [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base)

KnowMan documents tools named `kb_search`, `kb_get_item`, `kb_ask`, and `kb_save`. [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base) See [a guide to knowledge bases for AI agents](https://www.knowman.io/guides/knowledge-base-for-ai-agents) for more on [personal knowledge](https://www.knowman.io/guides/personal-knowledge-base) bases.

## Connect OpenClaw to the hosted KnowMan server

OpenClaw can use KnowMan without a local install by pointing a remote MCP server at https://api.knowman.io/mcp. In clients that support remote MCP servers you add the server URL and sign in: OAuth opens a KnowMan consent page where you approve the knowman.read and knowman.write scopes, and access tokens last one hour and refresh automatically.

The other route is an API key: create one in your KnowMan settings and send it as an Authorization: Bearer <key> header. If you prefer to stay local, the open-source client at https://github.com/Essatt/knowman-mcp runs with npx -y @knowman/mcp.

## Questions

### Where should I put stable instructions for OpenClaw?

Use `USER.md` for stable preferences, communication style, relationships, and active-project context. Write these as imperative directives. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

### Does OpenClaw remember everything from daily notes automatically?

Daily notes are indexed for `memory_search` and `memory_get`, but are not injected into the bootstrap prompt on every turn. Today's and yesterday's dated notes load automatically after a bare `/new` or `/reset`. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

### Can KnowMan connect to OpenClaw?

KnowMan has a local stdio MCP server. [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base) OpenClaw's memory documentation describes its own Markdown memory files. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

### Does memory enforce approval rules?

No. OpenClaw's documentation says memory can preserve approval context but does not enforce policy. It points to approval settings, sandboxing, and scheduled tasks for hard operational controls. [OpenClaw memory documentation](https://docs.openclaw.ai/concepts/memory)

## Related guides

- [What Is a Knowledge Base for AI Agents?](https://www.knowman.io/guides/knowledge-base-for-ai-agents)

- [How to Give Your AI Context from What You Read](https://www.knowman.io/guides/give-your-ai-context)

- [Connect your knowledge base through KnowMan's MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base)

## More in this topic

- [How to teach opencode your knowledge](https://www.knowman.io/guides/teach-opencode-your-knowledge)
- [How to teach Qwen Code your knowledge](https://www.knowman.io/guides/teach-qwen-code-your-knowledge)
- [How to teach Roo Code your knowledge](https://www.knowman.io/guides/teach-roo-code-your-knowledge)

## More for OpenClaw

- [Connect KnowMan to OpenClaw](https://www.knowman.io/integrations/openclaw)
- [How to give OpenClaw better memory](https://www.knowman.io/guides/openclaw-memory)

## Keep your saved reading useful

Try KnowMan Pro for 14 days with no credit card. [Create your account](https://app.knowman.io/signup)

[Start free](https://app.knowman.io/signup)

Every new account starts with 14 days of Pro. No credit card.

Source: https://www.knowman.io/guides/teach-openclaw-your-knowledge
