@yibie: LangChain 开源了 OpenWiki——一个专门给 agent 用的 CLI,自动为你的代码库写文档并持续维护。不是让你手写文档,是让 agent 写、agent 维护、agent 参考。 OpenWiki:LangChain 开…
摘要
LangChain 开源了 OpenWiki,一个专为 AI agent 设计的 CLI 工具,可自动为代码库生成并持续维护文档,支持多种模型和持续集成。
查看缓存全文
缓存时间: 2026/07/02 12:22
LangChain 开源了 OpenWiki——一个专门给 agent 用的 CLI,自动为你的代码库写文档并持续维护。不是让你手写文档,是让 agent 写、agent 维护、agent 参考。
OpenWiki:LangChain 开源的 Agent 自维护文档系统
LangChain 昨天发了个新项目,477 star,MIT 开源。OpenWiki 是一个 CLI,专门为 agent 设计——自动给代码库生成文档并持续更新。
安装: npm install -g openwiki
怎么用: openwiki –init 配置模型和 API key → openwiki 生成文档到 openwiki/ 目录 → 之后自动在 AGENTS.md / CLAUDE.md 里追加提示,让 coding agent 知道参考这个 wiki
关键设计: • 支持 GLM 5.2、Kimi K2.6、Sonnet 5 等,默认预配好的模型列表 • 支持 OpenRouter、Fireworks、Baseten、OpenAI、Anthropic • GitHub Action 集成——每天自动开 PR 更新文档 • 文档目录存在就做增量更新,不存在就从头创建
跟我们今天翻译的主题全部呼应: • Karpathy 的 LLM Knowledge Base(同样的概念,这次做成了自动化工具) • EXM7777 的 Agent OS 原则“keep memory in files“ • 20 个 Loop 模式里的 Memory Update Loop
这个工具把“让 AI 记住你的代码库“这件事从概念推进到了 npm install 一步。LangChain 说它 built specifically for agents——不是为人类写的 wiki。477 star 说明这件事正好是痛点。
原文:https://github.com/langchain-ai/openwiki…
#OpenWiki #LangChain #Agent文档
langchain-ai/openwiki
Source: https://github.com/langchain-ai/openwiki
OpenWiki
OpenWiki is a CLI that writes and maintains documentation for your codebase, built specifically for agents.

Install
npm install -g openwiki
Quick Start
Initialize OpenWiki, configure your model and API key, then generate documentation
openwiki --init
Then to ensure your documentation stays up-to-date, add the GitHub action to your repository to automatically open a PR once a day with documentation updates: openwiki-update.yml
Copy the contents of that file into .github/workflows/openwiki-update.yml in your repository.
Usage
Start the interactive CLI:
openwiki
Start OpenWiki with an initial request:
openwiki "Please generate documentation for this repository"
Run a single command and exit:
openwiki -p "Summarize what you can do"
Initialize OpenWiki:
openwiki --init
Update existing documentation:
openwiki --update
Show help:
openwiki --help
openwiki creates initial documentation in openwiki/ when no wiki exists. If openwiki/ already exists, it refreshes that documentation from repository changes. By default, the CLI stays open after each run so you can send follow-up messages. Use -p or --print for a one-shot non-interactive run that prints the final assistant output.
openwiki will automatically append prompting to your AGENTS.md and/or CLAUDE.md files to instruct your coding agent to reference it when searching for context. If the file does not already exist in your repository, OpenWiki will create it for you.
On the first interactive run, OpenWiki will have you configure your inference provider, API key, and LLM. You will also be able to set a LangSmith API key to trace your OpenWiki runs to a LangSmith tracing project named “openwiki” (optional).
These configuration options and secrets will be saved to ~/.openwiki/.env on your local machine.
Customizing
OpenWiki supports OpenRouter, Fireworks, Baseten, OpenAI and Anthropic out of the box. By default, there are a few models pre-defined (GLM 5.2, Kimi K2.6, Sonnet 5, etc) but for each inference provider, OpenWiki will allow you to specify your own custom model ID.
If there’s an inference provider or model you’d like to see added, please open a PR!
相似文章
OpenWiki:CLI工具,用于为你的代码库编写和维护代理文档
OpenWiki是LangChain的一个CLI工具,可自动生成和维护代码库的文档,专为AI代理设计。它支持多个推理提供商,并可与GitHub Actions集成以实现每日更新。
@GitHub_Daily: 用 AI 处理长周期复杂任务,随着上下文越来越长,模型容易出现「忘事」,输出质量也直线下降。 LangChain 官方团队开源了一套教程:Deep Agents from Scratch,从零拆解主流 Agent 的核心设计模式,讲得很透…
LangChain 官方团队开源了教程 'Deep Agents from Scratch',从零拆解主流 Agent 的核心设计模式,涵盖任务规划、上下文卸载到文件系统以及子代理隔离等思路,共 5 个渐进式 Notebook,可上手搭建完整深度研究 Agent。
@BraceSproul: https://x.com/BraceSproul/status/2072375136368660515
OpenWiki 是一个开源代理和命令行工具,能够自动生成并维护代码库的文档,帮助编码代理理解仓库结构和逻辑。
@DashHuang: https://x.com/DashHuang/status/2057323152758480955
这篇文章探讨了为什么在AI agent时代,GitHub比传统文档系统更适合作知识协作的基础,因为它具有开放协作、AI模型熟悉、本地完整上下文和结构化原始数据等优势。
@mylifcc: 最近在搞 Agent 记忆和个人知识系统的时候,发现了这个项目 obsidian-wiki,太对味了! 把 Andrej Karpathy 的 LLM Wiki 模式落地到 Obsidian 上: 让 AI Agent 能自主 inges…
该推文介绍了 obsidian-wiki 项目,它将 Andrej Karpathy 的 LLM Wiki 模式落地到 Obsidian 上,使 AI Agent 能自主 ingest 多源知识并组织成 wikilink 互联的 markdown 知识库,支持 Delta 增量更新和来源归因,内置查询、审计、图表导出等功能,目前已有 2k stars。