Wink Pings

Build a Knowledge Factory for Agents: Less Context Stuffing, More Knowledge Maintenance

LangChain's Harrison Chase breaks the knowledge factory into three parts: skills, domain knowledge, and data access guidance. The key role is a background curator agent that reads agent flags and traces and continuously improves the knowledge base. Start by running a closed loop on one repetitive workflow.

Where agents get stuck in production is often knowledge. The models are already strong enough, but the company's practices, standards, and data entry points are still scattered across documents and in the heads of experienced colleagues.

hims posted a set of handwritten notes on X titled 'How to build a Knowledge Factory.' The notes run five pages. In a reply, he said he had originally brainstormed half of it on paper, then just posted it. What is really worth reading is the original article the notes point to: 'How to build a knowledge factory' by LangChain's Harrison Chase.

Tweet link: https://x.com/himanshutwtxs/status/2129281943942693271

Original article link: https://www.langchain.com/blog/knowledge-factory

image

image

image

img

img

Harrison Chase opens with a blunt judgment: for AI to do real work inside a company, what is missing is not a better model, and not just more context, but better knowledge. Knowledge includes how the company operates, what the operating standards are, where data lives, and how to access it.

He separates context and knowledge. Context is the information an agent has at hand while doing a task. Knowledge is reusable understanding, such as what a metric actually means, which data source to trust, and what rule applies to a certain kind of situation. What a knowledge factory does is turn scattered documents and experience into context that future tasks can use.

This framing makes it easy to think that building another vector store is all there is to it. The original article's focus is not storage. It borrows the software factory idea: the best engineers do not directly write all the software themselves; they build systems that let other people in the company deliver software efficiently. Knowledge work is heading down the same path. Agents can already make demos, post videos, and do outreach, but to complete those tasks they first need the tacit, scattered knowledge.

So the place to invest resources is in building a factory that continuously collects, curates, and maintains knowledge.

三类知识

Harrison divides knowledge into three categories.

The first is skills. These are the processes, instructions, and scripts for 'how things should be done' in a company. Many skills were never written down before and were passed along by word of mouth among colleagues. A knowledge factory needs to write them down.

The second is domain knowledge. This is core information that does not go stale often, such as people, products, competitors, and organizational rules. This kind of information is usually already written down somewhere, but it is often incomplete or out of date.

The third is data access guidance. A company should have a data strategy; Snowflake and Databricks are the foundation. If source data is already complete and timely, there is no need to maintain another copy. What needs to be maintained is clear guidance on what data is where and how to query it.

All three kinds of knowledge are needed, but do not maintain them by hand. Manual maintenance is grunt work, and it rots quickly. In the factory structure the original article lays out, two roles are critical.

知识工厂循环

The first role is the agent that uses knowledge. It needs to be able to flag missing knowledge while doing work. When it cannot find information, or finds that information is wrong, it should report it. Ideally, it should also suggest the correct update. That way, the work process itself exposes knowledge gaps.

The second role is the curator agent, which runs in the background on a schedule and is responsible for updating, curating, and maintaining knowledge. This role cannot be skipped. The original article is clear: do not have the agents that use knowledge maintain knowledge themselves. They are good at flagging problems, but fixing problems requires understanding the underlying knowledge and multiple data sources. If you let them maintain the knowledge base while pursuing their own goals, the result will spiral out of control, and contradictions will pile up.

The curator agent needs permission to read raw data sources such as Notion and Slack; it needs to be able to look at agent traces to understand how people use the agent, so it can codify processes into skills; and it also needs to be able to see the errors agents flag.

Storage, by contrast, matters less. Knowledge can live in GitHub's skill format, in a single Notion file, in LangSmith Context Hub's OKF format, or in a Neo4j knowledge graph. The curator agent needs to know how to work with these formats. The original article also acknowledges that the field of memory and knowledge representation is still early; do not rush to set standards, and do not make formats too complex.

收入报告例子

At the end, the original article gives a revenue report example. The agent needs raw revenue data, stored in BigQuery and Salesforce. It also needs knowledge: skills for making reports in LangChain style, stored in GitHub; long-lived knowledge such as how ARR is calculated, stored in the company wiki; and how to access rapidly changing data, also written as skills and placed in Context Hub.

When the agent runs, it discovers that a column in BigQuery has been renamed. In the process, it finds the correct column name and uses a tool to flag the issue, suggesting that it be changed to the correct column name. After the report is done, the finance lead syncs with the agent and fixes a few formatting issues, including a request to use a new document header.

That night, the curator agent sees the flag, also checks the agent trace, and notices the back-and-forth revisions between the finance lead and the agent. It updates two skills: use the new column name when pulling data, and use the new header when drafting reports.

This closed loop is more realistic than 'first write the whole company knowledge base.' The original article's conclusion is that the goal is not to wait until everything is documented before letting agents start work. The goal is to make the work itself a process of discovering knowledge gaps, resolving them, and making the next round of work better. Start with one repetitive workflow, see where the agent struggles, and close the loop.

This approach has similarities to the Toyota Production System. TPS has two pillars, jidoka and just-in-time. Jidoka emphasizes stopping when an abnormality occurs so defects do not flow downstream; just-in-time emphasizes making what is needed, in the needed quantity, at the needed time. A knowledge factory does something similar: when an agent encounters missing knowledge, it flags it; the curator fills it in as needed, so incorrect knowledge does not keep flowing. The original Toyota article is here: https://global.toyota/en/company/vision-and-philosophy/production-system/

One commenter replied that he had Claude build a knowledge factory in his organization, got it set up in an hour, could ask about project details based on the codebase, and even shipped a feature along the way, using Sonnet 5.5 high, not Opus. It is hard to judge whether the claim is true, but it at least shows one thing: the toolchain can already turn 'building a knowledge factory' into an executable action; the hard part is the knowledge itself and the closed loop of continuous maintenance.

If you are currently stuffing a huge CLAUDE.md into an agent, pause for a moment. Separate what should be known every time as rules, what is reference material used occasionally, and what is knowledge that should be maintained by a background curator. Claude Code's extension docs explain clearly how CLAUDE.md, skills, subagents, hooks, and MCP are loaded and what they cost in context: https://code.claude.com/docs/en/features-overview.md

The storage format of a knowledge factory can be debated, but the flagging mechanism and the curator role are hard to omit. Start by running one repetitive workflow, let the agent call out what it does not know, and then have another agent fill the knowledge back in overnight.

References:

发布时间: 2026-12-06 10:30