Skip to main content
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.

Core Concepts

Knowledge vs Memory

DimensionKnowledge Base (knowledge/)Long-term Memory (memory/)
OrganizationBy topic, interlinkedBy timeline, dated files
WritingAgent actively structures contentAuto-summarized on context trimming
ContentRefined, structured knowledgeRaw conversation summaries
Use casesStudy notes, tech docs, project knowledgeConversation history, event records

Directory Structure

~/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.

Automatic Organization

Knowledge writing is an autonomous Agent behavior, triggered in these scenarios:
  • User shares an article or document — The Agent automatically extracts key information and creates a structured knowledge page
  • Conversation produces valuable conclusions — The Agent organizes insights into knowledge pages and links them to existing knowledge
  • User explicitly requests organization — Users can guide the Agent to organize and update knowledge through conversation
Each knowledge page includes cross-reference links to related pages, gradually building a knowledge graph.

Knowledge Retrieval

The Agent can retrieve knowledge during conversation through:
  • Index lookup — Quickly locate relevant pages via knowledge/index.md
  • Semantic search — Search knowledge content via the memory_search tool
  • Direct read — Read specific knowledge files via the memory_get tool

Web Console

The web console provides a dedicated “Knowledge” module with:
  • Document browsing — Tree-style directory structure, searchable and collapsible, click to view content
  • Knowledge graph — D3.js force-directed graph visualizing relationships between knowledge pages
  • Chat integration — Knowledge document links referenced in Agent replies are clickable for direct navigation

CLI Commands

Manage the knowledge base with the /knowledge command:
CommandDescription
/knowledgeShow knowledge base statistics
/knowledge listDisplay file directory as a tree
/knowledge onEnable the knowledge base feature
/knowledge offDisable the knowledge base feature

Configuration

ParameterDescriptionDefault
knowledgeWhether to enable the personal knowledge basetrue
agent_workspaceWorkspace path; knowledge is stored under the knowledge/ subdirectory~/cow