コーディングエージェント向けのオープンソースリポジトリドキュメント「OpenWiki」を公開
LangChain は、コーディングエージェントがリポジトリのドキュメントを効率的に検索・利用するためのオープンソースプロジェクト「OpenWiki」を発表した。
キーポイント
コーディングエージェント向けドキュメント基盤の提供
LangChain が開発した OpenWiki は、大規模なコードリポジトリからドキュメントを抽出・構造化し、AI エージェントが迅速に情報を取得できる環境を整える。
オープンソースによるエコシステム拡大
このプロジェクトはオープンソースとして公開され、開発者コミュニティが拡張や改善に参加することで、汎用的なドキュメント検索インフラとしての成長を目指す。
自律型開発ワークフローの強化
従来のコード生成に加え、リポジトリ全体の文脈を理解する能力を付与することで、より高度で正確な自律的なコーディング支援を実現する。
影響分析・編集コメントを表示
影響分析
この発表は、AI エージェントが単なるコード生成だけでなく、既存プロジェクトの複雑なドキュメント構造を深く理解し、自律的に開発タスクを遂行する能力を飛躍的に高める契機となります。特に大規模なオープンソースプロジェクトや企業内システムにおいて、情報の非対称性を解消し、開発効率と品質を向上させる基盤技術として注目されます。
編集コメント
コーディングエージェントの進化において、コードそのものだけでなく、関連するドキュメントや文脈をいかに正確に取得できるかが鍵となります。OpenWiki はこの課題に対する LangChain の明確な回答であり、実務での活用が期待されます。
本日、コードベースのドキュメント生成と維持のためのオープンソースエージェントおよび CLI である OpenWiki をリリースいたします。
エージェントは、自分が作業しているリポジトリを理解することで、より良いコードを書けるようになります。重要なロジックがどこに存在するか、ファイル間の接続関係、そしてコードベースが期待するパターンを知る必要があります。優れたドキュメントは、その文脈を提供し、より情報に基づいたコード変更と、回避可能なミスの減少につながります。
問題は、ドキュメントを最新の状態に保つことが難しいことです。初期のドキュメント作成には時間がかかりますが、コードの変更ごとに更新するのはさらに困難です。頻繁なプルリクエスト(PR)が行われる大規模なリポジトリでは、ドキュメントはすぐに古くなってしまいます。
OpenWiki はこの作業を自動的に処理します。リポジトリ用のウィキを作成し、そのウィキをコーディングエージェントに接続し、コードが変更されるたびに自動で更新し続けます。
エージェントのためのウィキについて
私たちは、既存のコードベース用ウィキに関する取り組み、例えば DeepWiki、AutoWiki、そして Karpathy の LLM Wiki(LLM ウィキ)コンセプトに触発されました。共通する考え方はシンプルです。ウィキは、すべてのコンテキストを一つの巨大なファイルに押し込むことなく、人間とエージェントがコードベースを理解するための構造化された手段を提供します。
それが重要なのは、ほとんどのコーディングエージェントがすでに AGENTS.md や CLAUDE.md といったファイルを読み込んで指示に従っているからです。これらのファイルは有用ですが、数百ページにわたるリポジトリのドキュメントを保存する適切な場所ではありません。これらはエージェントに対して正しいコンテキストへと誘導し、必要な情報を取得させるべきです。
OpenWiki はそのモデルに従っています。リポジトリ用のウィキを生成し、その後、そのウィキへの参照を含むエージェントの指示ファイルを更新します。そこから、コーディングエージェントはドキュメントを自動的に発見して利用できるようになります。
始め方
OpenWiki はコマンドラインから簡単に実行できるように設計されています。
npm を使ってインストールしてください:
npm install -g openwiki
その後、以下を実行します:
openwiki --init
image.png)
init コマンドはモデルプロバイダーと API キーの入力を求め、その後リポジトリのドキュメントを生成します。
OpenWiki は OpenRouter、Fireworks、Baseten、OpenAI、Anthropic を含む、オープンおよびクローズド型の両方のモデルプロバイダーをサポートしています。デフォルトではオープンなモデルを持つ OpenRouter が使用されますが、設定に合わせて最適なプロバイダーを構成することも可能です。
OpenWiki は DeepAgents をベースに構築されているため、LangSmith へのトレーシングもサポートしています。LangSmith の API キーを提供すれば、OpenWiki は実行を LangSmith プロジェクトにトレースし、ドキュメントの生成や更新中にエージェントが何を行ったかを詳細に確認できるようになります。
OpenWiki がコーディングエージェントにどのように接続するか
ウィキを生成した後、OpenWiki はリポジトリのエージェント設定ファイルを更新します。リポジトリが AGENTS.md または CLAUDE.md(またはその両方)を使用している場合、OpenWiki は生成されたウィキへの参照を追加し、エージェントがいつそれを使用すべきかを説明します。
このアプローチを選んだのは、ウィキ全体を指示ファイル内に配置するとコンテキスト量が膨大になりすぎるからです。大規模なリポジトリでは、ウィキは数百のファイルにまたがることもあります。そのようなすべてをすべてのエージェント実行時に読み込むのは非効率的であり、維持管理も困難です。
短い参照の方が効果的です。コーディングエージェントはすでに指示ファイルを読み込んでいます。OpenWiki が参照を追加すれば、エージェントはリポジトリのコンテキストが必要になった際にウィキを検出でき、ワークフローを変更する必要はありません。
ウィキを最新の状態に保つ
ドキュメントを一度生成するだけでは有用ですが、それらを最新の状態に保つことで OpenWiki の価値がさらに高まります。
OpenWiki には スケジュール実行可能な GitHub Action が含まれており(例:1 日 1 回など)、このアクションは更新フラグを指定して OpenWiki を実行します。OpenWiki は前回の実行以降にマージされたコミットを確認し、git の差分(diff)を使用して変更箇所を理解した上で、関連するコンテキストでウィキを更新します。
つまり、このワークフローはバックグラウンドで実行可能です。コードベースが変化するにつれて OpenWiki がドキュメントを更新し、既存の指示ファイル経由での参照を通じて、コーディングエージェントは常に最新のウィキを把握し続けます。
コードベースを第一に設計
今回の最初のリリースは、コードベース向けのウィキ機能に焦点を当てています。開発者が手動で詳細なドキュメントを作成・維持する必要なく、エージェントが作業対象のリポジトリを理解しやすくすることを目指しています。
将来的には、OpenWiki の概念はより広範な分野にも適用できると考えています。エージェントはコーディングだけでなく、さまざまな種類の業務において永続的な文脈を必要とします。コードベースのドキュメンテーションは最初のユースケースですが、同じパターンは他のワークフローにおいても、エージェントが有用な文脈を維持する手助けとなります。
試してみる
OpenWiki はオープンソースであり、現在利用可能です。
インストールして openwiki --init を実行すれば、数分でリポジトリ用のウィキを生成できます。
リポジトリはこちらで確認できます:https://github.com/langchain-ai/openwiki
原文を表示
Today we're releasing OpenWiki, an open source agent and CLI for generating and maintaining documentation for codebases.
Agents write better code when they understand the repo they're working in. They need to know where key logic lives, how files connect, and which patterns the codebase expects. Good documentation gives agents that context, which leads to more informed code changes and fewer avoidable mistakes.
The problem is that documentation is hard to keep current. Writing the initial docs takes time, and updating them every time the code changes is even harder. In large repos with frequent PRs, docs can fall out of date quickly.
OpenWiki handles that work automatically. It creates a wiki for your repo, connects that wiki to your coding agent, and keeps it updated as your code changes.
Why wikis for agents
We were inspired by existing work around codebase wikis, including DeepWiki, AutoWiki, and Karpathy’s LLM Wiki concept. The shared idea is simple. A wiki gives humans and agents a structured way to understand a codebase without forcing all context into one giant file.
That matters because most coding agents already read files like AGENTS.md or CLAUDE.md for instructions. Those files are useful, but they’re not the right place to store hundreds of pages of repo documentation. They should point the agent toward the right context, then let the agent retrieve what it needs.
OpenWiki follows that model. It generates a repo wiki, then updates your agent instruction files with a reference to that wiki. From there, your coding agent can discover and use the docs automatically.
Getting started
OpenWiki is designed to be easy to run from the command line.
Install it with npm:
npm install -g openwiki
then run:
openwiki --init
.png)
The init command asks for a model provider and API key, then generates documentation for your repo.
OpenWiki supports both open and closed model providers, including OpenRouter, Fireworks, Baseten, OpenAI, and Anthropic. By default, it uses OpenRouter with an open model, but you can configure the provider that works best for your setup.
Because OpenWiki is built on top of DeepAgents, it also supports tracing to LangSmith. If you provide a LangSmith API key, OpenWiki will trace runs to a LangSmith project so you can inspect exactly what the agent did while generating or updating your docs.
How OpenWiki connects to your coding agent
After generating the wiki, OpenWiki updates your repo’s agent instruction files. If your repo uses AGENTS.md, CLAUDE.md, or both, OpenWiki adds a reference to the generated wiki and explains when the agent should use it.
We chose this approach because putting the entire wiki inside an instruction file would add too much context. In a large repo, the wiki can span hundreds of files. Loading all of that into every agent run would be wasteful and hard to maintain.
A short reference works better. Your coding agent already reads the instruction file. Once OpenWiki adds the reference, the agent can find the wiki when it needs repo context, without requiring you to change your workflow.
Keeping the wiki up to date
Generating docs once is useful. Keeping them current is where OpenWiki becomes more valuable.
OpenWiki includes a GitHub Action that can run on a schedule, for example once a day. The action runs OpenWiki with the update flag. OpenWiki checks which commits landed since the last run, uses git diffs to understand what changed, then updates the wiki with the relevant context.
That means the workflow can run in the background. As your codebase changes, OpenWiki updates the documentation. Your coding agent keeps picking up the latest wiki through the existing instruction file reference.
Built for codebases first
This first release focuses on wikis for codebases. The goal is to make it easier for agents to understand the repos they work in, without asking developers to manually write and maintain detailed docs.
Over time, we think the OpenWiki concept can apply more broadly. Agents need durable context for many kinds of work, not just coding. Codebase documentation is the first use case, but the same pattern can help agents maintain useful context across other workflows too.
Try it
OpenWiki is open source and available now.
You can install it, run openwiki --init, and generate a wiki for your repo in a few minutes.
Check out the repo here: https://github.com/langchain-ai/openwiki
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み