Skip to main content
The memory system enables the Agent to remember important information over time, continuously accumulating experience, understanding user preferences, and truly achieving autonomous thinking and continuous growth.

How It Works

The Agent proactively stores memory in the following scenarios:
  • When user shares important information — Automatically identifies and stores preferences, decisions, facts, and other key information
  • When conversation reaches a certain length — Automatically extracts summaries to prevent information loss
  • When retrieval is needed — Intelligently searches historical memory, combining context for responses

Memory Types

Core Memory

Stored in ~/cow/memory/core.md, containing long-term user preferences, important decisions, key facts, and other information that doesn’t fade over time.

Daily Memory

Stored in ~/cow/memory/daily/ directory, organized by date, recording daily conversation summaries and key events.

First Launch

On first launch, the Agent will proactively ask the user for key information and save it to the workspace (default ~/cow):
FileDescription
system.mdAgent system prompt and behavior settings
user.mdUser identity information and preferences
memory/core.mdCore memory
memory/daily/Daily memory directory

Memory Retrieval

The memory system supports hybrid retrieval modes:
  • Keyword retrieval — Match historical memory based on keywords
  • Vector retrieval — Semantic similarity search, finds relevant memory even with different wording
The Agent automatically triggers memory retrieval during conversation as needed, incorporating relevant historical information into context.

Configuration

{
  "agent_workspace": "~/cow",
  "agent_max_context_tokens": 40000,
  "agent_max_context_turns": 30
}
ParameterDescriptionDefault
agent_workspaceWorkspace path, memory files stored under this directory~/cow
agent_max_context_tokensMax context tokens, affects short-term memory capacity40000
agent_max_context_turnsMax context turns, oldest conversations discarded when exceeded30