Harrison Chase · LangChain · 2026/10/29

Open Source Building Evidence-Grounded Agent Memory with OpenWiki and

Open Source Building Evidence-Grounded Agent Memory with OpenWiki and Graphs Eugene Liu October 28, 2026 8 min Go back to blog Create agents Create agents Share Key Takeaways A compiled wiki gives agents domain context that retrieval alone must reconstruct. On

Open Source Building Evidence-Grounded Agent Memory with OpenWiki and Graphs Eugene Liu October 28, 2026 8 min Go back to blog Create agents Create agents Share Key Takeaways A compiled wiki gives agents domain context that retrieval alone must reconstruct. On questions spanning multiple sources, an agent using OpenWiki as a memory layer was 5x more accurate than one using grep tools alone. Adding an evidence graph helps agents follow the wiki back to supporting evidence. We turned citations and document references into explicit graph edges agents could follow. Compared with the wiki alone, this doubled how consistently the agent cited the same evidence, improved accuracy by 27%, and cut cost per correct answer by 58%. Save compiled memory for repeated cross-source reasoning. The wiki captures domain knowledge and complex relationships. Adding an evidence graph improves accuracy and retrieval consistency. For simple lookups, however, the agent without memory was just as accurate and faster. Agents working across an organization’s policies, manuals, wikis, tickets, and code must navigate knowledge scattered across systems and teams. Finding a relevant passage is only the start. They also need to determine which rules apply, what has changed, and how one source affects another. A persistent memory layer preserves knowledge and relationships for agents to reuse across tasks. Without it, agents often have to reconstruct that understanding on every question, making their work expensive and error-prone. This is especially challenging in banking and insurance, where policies and guidelines frequently amend or supersede one another. We tested OpenWiki , our open-source wiki compiler, as this memory layer. On questions requiring connections across sources, the wiki made the agent roughly 5x more accurate than search alone. Adding an evidence graph that connects wiki statements to supporting passages and links related sources improved accuracy a further 27% and doubled citation consistency. Why a compiled wiki? RAG pipelines often use semantic or hybrid search to retrieve isolated chunks, leaving agents to piece together how those chunks relate. We’ve explored improving retrieval with agentic RAG and graph-based metadata filtering , but finding relevant passages is only part of the work. Cross-source questions require tracing references, resolving conflicting rules, and understanding dependencies. Memory preserves that understanding so agents don’t have to rebuild it on every question. A compiled wiki provides that memory layer by synthesizing source material into linked pages that explain key concepts and their relationships. The wiki is updated as sources change, giving agents context they can reuse. OpenWiki , our open-source CLI built on Deep Agents , creates these wikis with citations back to the sources. We originally built it so coding agents wouldn’t have to rediscover architecture and code behavior on every task. Every OpenWiki statement rests on a claim , an assertion linked to supporting source lines and their hash. When those lines change, the hash changes, allowing OpenWiki to flag affected claims without a model call, saving on token costs and making staleness detection more deterministic. Only those claims go to a model for confirmation, revision, or retraction, allowing the memory layer to self-correct as its sources change. We explain this in Building self-correcting memory in OpenWiki . Building the test document library We built a synthetic insurance document library of 111 long-form documents . We chose insurance because policies and endorsements frequently reference, amend, and override one another; this is exactly the kind of cross-document dependency that makes retrieval hard. To score the benchmark, we created a ledger of 972 facts and controlled where each fact should appear, how documents referenced each other, and what changed between versions. We generated the surrounding prose with an LLM and ran automated checks to ensure the required facts were present. Finally, we made the corpus intentionally messy, mixing in outdated versions, contradictions, indirect reference chains, varied wording, and very long documents to better match what agents face in real enterprise libraries. How we configured our experiment We evaluated the same retrieval agent under two conditions: Search (keyword search over the original documents) and Wiki (the same agent with access to an OpenWiki-compiled, source-linked wiki). The underlying model, instructions, documents, and questions were held constant — only the agent’s access to compiled memory changed. We tested 80 simple lookup questions and 50 connected questions that require following dependencies across documents (e.g., identifying what depends on a provision or is affected when it changes). We asked each question three times to measure run-to-run variation. Metrics (what “better” means): Accuracy (0–1): a grader checked answers and quoted evidence against a checklist from the 972-fact ledger (rewarding required facts and penalizing contradictions). Consistency (0–1): overlap of cited evidence across the three runs (average pairwise Jaccard similarity of citation sets). This measures whether the agent reliably grounds its answers in the same sources, not whether the answers are correct. Cost + latency: model spend (USD) and wall-clock time per question. Where the wiki helped, and where it struggled OpenWiki compiled the 111-document library into a wiki roughly one-tenth its original size for $4.15. Adding 17 documents later cost about $0.09 each. The analysis below excludes compilation and update costs, reporting only retrieval and answering costs. We used simple lookups as a control. These single-passage questions require little cross-document insurance context, so we didn’t expect the wiki to help much. Results were similar for search and wiki, respectively (0.84 vs 0.83 accuracy; 0.72 vs 0.74 citation overlap; $0.020 vs $0.021 per correct answer), while latency increased from 9 to 12 seconds. Connected questions required reasoning across sources using domain-specific relationships. Here, the wiki improved accuracy roughly 5x, from 0.10 with search alone to 0.52. Its compiled context helped the agent apply domain knowledge and find relevant relationships with fewer tool calls, cutting cost per correct answer from about $0.55 to $0.19. Despite these accuracy and cost gains, the wiki agent’s evidence retrieval remained inconsistent. Citation overlap dropped from 0.74 on simple lookups to 0.25 on connected questions. Citation stability doesn’t measure correctness, but changing evidence can change an answer, especially when sources conflict. For critical business functions, teams need answers they can reproduce and audit, not just better average accuracy. The wiki helped the agent apply domain knowledge across sources. The remaining challenge was making the path to supporting evidence more repeatable. Adding an evidence graph To make retrieval more consistent, we added a lightweight evidence graph: a map that turns wiki citations into explicit, typed edges between claims, wiki pages, paragraphs, and topics. OpenWiki citations are text references in Markdown files. The graph makes them durable by materializing them as typed edges. That gives the agent a stable path to follow instead of rediscovering the same links with search. We built this graph in two steps: Store every paragraph as a new primitive. A deterministic process splits each document into paragraphs and assigns each a unique identifier. These paragraphs become atomic units of information, linking claims to exact supporting passages rather than entire documents. Connect the passages with typed edges. We linked paragraphs, claims, and wiki pages with typed edges: claims cite paragraphs, newer documents supersede older ones, and sections refers_to other documents. Each edge identifies the relationship, not just the connection. We built edges two ways. Some are extracted deterministically from document references. Because wiki claims already carry text citations, we can materialize typed edges like refers_to and supersedes without another model call. The graph took under a second to build and resolved every explicit cross-reference in the test library, so the agent could follow links instead of rediscovering connections on each question. The graph’s job is evidence navigation, not modeling everything the organization knows. The wiki still provides the synthesis. Unlike an extraction-heavy knowledge graph pipeline, this layer reuses existing references and citations rather than extracting and reconciling entities with a model. Construction requires no additional model calls, though edges derived from the wiki still depend on the accuracy of its model-generated citations. Two tools let the agent navigate the map: locate finds a starting point that matches the question, and expand follows its connections to supporting passages

FDE 判断

这条信息对 FDE 的直接价值在于提醒交付人员持续关注模型、智能体与企业流程之间的变化。面对类似项目,应先确认客户的真实业务目标、数据边界、权限条件和验收指标,再选择工具并用最小场景验证结果,避免只追逐功能更新。