docs/en/knowledge/index.mdx
The personal knowledge base is the Agent's long-term structured knowledge store, saved in the knowledge/ directory within the workspace. Unlike memory, which is organized by timeline, the knowledge base organizes content by topic — articles, conversation insights, and learning materials are structured into interlinked Markdown pages, forming a continuously growing knowledge network.
| Dimension | Knowledge Base (knowledge/) | Long-term Memory (memory/) |
|---|---|---|
| Organization | By topic, interlinked | By timeline, dated files |
| Writing | Agent actively structures content | Auto-summarized on context trimming |
| Content | Refined, structured knowledge | Raw conversation summaries |
| Use cases | Study notes, tech docs, project knowledge | Conversation history, event records |
~/cow/knowledge/
├── index.md # Knowledge index, entry point for all pages
├── log.md # Change log, records each write
├── concepts/ # Conceptual knowledge
│ └── machine-learning.md
├── entities/ # Entity knowledge (people, orgs, tools)
│ └── openai.md
└── sources/ # Source knowledge (articles, papers)
└── llm-wiki.md
The directory structure is flexible — the Agent automatically creates appropriate category directories based on actual content. Users can also customize the organization.
Knowledge writing is an autonomous Agent behavior, triggered in these scenarios:
Each knowledge page includes cross-reference links to related pages, gradually building a knowledge graph.
<Frame> </Frame>The Agent can retrieve knowledge during conversation through:
knowledge/index.mdmemory_search toolmemory_get toolThe web console provides a dedicated "Knowledge" module with:
Manage the knowledge base with the /knowledge command:
| Command | Description |
|---|---|
/knowledge | Show knowledge base statistics |
/knowledge list | Display file directory as a tree |
/knowledge on | Enable the knowledge base feature |
/knowledge off | Disable the knowledge base feature |
| Parameter | Description | Default |
|---|---|---|
knowledge | Whether to enable the personal knowledge base | true |
agent_workspace | Workspace path; knowledge is stored under the knowledge/ subdirectory | ~/cow |