WikiKB: a fast, repository-native knowledge base for people and agents WikiKB:一款面向个人和智能体的快速、原生于代码仓库的知识库

WikiKB is an efficient, transparent, and explicitly curated knowledge base layer for humans and agents, built on the GitHub repository wiki. WikiKB 是一款构建于 GitHub 仓库 Wiki 之上的高效、透明且经过明确整理的知识库层,旨在服务于人类和智能体。

Russell Horton Russell Horton Russell Horton

Agentic memory is incredibly useful. We want our agents to grow their understanding of a domain over the life of a project. But the knowledge an agent accumulates passively can be haphazard and opaque. Projects and topics bleed over into each other, amplifying and muddying the model’s context.智能体记忆极其有用。我们希望智能体能在项目生命周期内不断加深对特定领域的理解。然而,智能体被动积累的知识往往杂乱且不透明。项目和主题之间相互交织,不仅放大了模型上下文,还使其变得模糊不清。

WikiKB is an efficient, transparent and explicitly curated knowledge base layer, for humans and agents, built on the GitHub repository wiki. Yes, every repo comes with a wiki! Most of them go unused, making it the perfect landing place for a human-readable, agent-addressable memory. WikiKB content can be ingested and queried from the command line, through GitHub issues, or agentically using the provided skill definition.WikiKB 是一款构建于 GitHub 仓库 Wiki 之上的高效、透明且经过明确整理的知识库层,旨在服务于人类和智能体。没错,每个仓库都自带 Wiki!但大多数 Wiki 都处于闲置状态,这使其成为存放人类可读、智能体可访问记忆的理想之地。WikiKB 的内容可以通过命令行、GitHub Issues 或利用提供的技能定义(以智能体方式)进行摄取和查询。

Because the knowledge base lives in the repository’s wiki, everything ingested can be viewed in the rendered wiki or in the raw Markdown files behind it. You can install WikiKB alongside an existing project, or create a dedicated repository to hold knowledge about any topic.由于知识库驻留在仓库的 Wiki 中,所有摄取的内容均可在渲染后的 Wiki 页面或其背后的原始 Markdown 文件中查看。你可以将 WikiKB 安装到现有项目中,也可以创建一个专门的仓库来存储任何主题的知识。

Try it!试一试吧!

Tell your agent:告诉你的智能体:

Install WikiKB using https://github.com/githubnext/wikikb/blob/main/INSTALL.md

Implementation实现方式

WikiKB is fast and efficient, leveraging Self-Organizing Memory for Agents (SOMA) from the GraphRAG Zero project at Microsoft Research. SOMA uses a small, static, local embedding model running on the CPU for efficient indexing and retrieval. No LLM provider is required to add documents to the knowledge base or search it. For RAG operations such as summarization and question answering, you can configure WikiKB to use an LLM provider.WikiKB 快速且高效,它利用了微软研究院 GraphRAG Zero 项目中的智能体自组织记忆(SOMA)技术。SOMA 使用在 CPU 上运行的小型静态本地嵌入模型,以实现高效的索引和检索。向知识库添加文档或进行搜索时,无需使用任何 LLM 提供商。对于摘要和问答等 RAG 操作,你可以配置 WikiKB 以使用 LLM 提供商。

For example:例如:

wkb ai-research query \
  "How does graph-based retrieval differ from vector search?"

This retrieves relevant entries from the knowledge base and sends them to the configured AI provider to produce a synthesized, source-backed answer.这会从知识库中检索相关条目,并将其发送给配置的 AI 提供商,以生成带有来源引用的综合答案。

Run the same command with --no-ai to return the relevant entries without generating new content:使用 --no-ai 参数运行相同的命令,即可返回相关条目而不生成新内容:

wkb ai-research query \
  "How does graph-based retrieval differ from vector search?" \
  --no-ai

You can also use search, which is always retrieval-only:你也可以使用 search 命令,该命令始终仅执行检索操作:

wkb ai-research search "hybrid retrieval methods" --top 5

Add knowledge from files, URLs, and GitHub issues从文件、URL 和 GitHub Issues 中添加知识

WikiKB can ingest a local document or a public URL:WikiKB 可以摄取本地文档或公共 URL:

wkb ai-research ingest ./notes/retrieval-design.md --tag retrieval,design
wkb ai-research ingest https://example.com/research-paper --tag research

It can also archive GitHub issues, optionally including their comments:它还可以归档 GitHub Issues,并可选择包含其中的评论:

wkb ai-research.sources.discussions ingest-issues \
  owner/repository \
  --state all \
  --limit 50 \
  --comments

Ingested material is normalized into Markdown pages with provenance, metadata, and tags. Namespaces let you organize larger knowledge bases and search only the relevant section:摄取的材料会被规范化为带有来源、元数据和标签的 Markdown 页面。命名空间允许你组织大型知识库,并仅搜索相关部分:

wkb ai-research.papers.transformers search "positional encoding"

WikiKB design principlesWikiKB 设计原则

Install WikiKB安装 WikiKB

Tell your agent:

Install WikiKB using https://github.com/githubnext/wikikb/blob/main/INSTALL.md

Keep in touch保持联系

Please reach out on the GitHub Next Discord and let us know how WikiKB is working for you.请在 GitHub Next Discord 上与我们联系,并让我们了解 WikiKB 的使用体验。