Your agent hates walking your knowledge graph. So stop making it walk.

September 1, 2026·IWE Team

There is a criticism of knowledge graphs as agent memory that is going around, and it is correct.

It goes like this. You have a store of hyperlinked markdown, the Roam and Obsidian lineage. The agent reads a page, finds links, decides from the link text which ones look relevant, reads those pages, finds more links, repeats. If the fact it needs is N hops deep, that is N+1 tool calls, each one a pause of a couple of seconds while the model round-trips. The agent judges relevance from a link title alone, so it guesses wrong, reads pages it did not need, and comes back with a context window full of noise. The deeper and better-connected your graph, the worse this gets. A well-tended graph is a genuine pleasure for a human reader and a genuine tax on an agent.

All of that is true. We build a markdown knowledge graph tool, and we would not dispute a word of it.

The conclusion usually drawn from it is where we get off. The argument continues: since agents are bad at traversing graphs, drop the graph. Flatten memory into a pile of pages, put an embedding index next to it, and let semantic search jump straight to the relevant ones. No links to follow, no hops, at most two tool calls.

That fixes the traversal cost by throwing away the structure. The links between your documents are not decoration. A decision that links to the component it affects, a gotcha that links to the release it shipped in, a page whose children are its evidence, that is information, and it is exactly the information that tells a reader which other pages matter once one page has been found relevant. Semantic search is good at “find pages that sound like the question.” It has nothing to say about “and bring what those pages depend on.” You get relevance without context, which in practice means the agent finds the decision but not the constraint that motivated it, and confidently works from half the picture.

There is an older version of this problem, and it was not solved by deleting the indexes.

A database client does not fetch rows by walking B-tree pages over the network, one page per round trip, guessing from a node header whether the subtree is worth descending into. That would be slow and unreliable for precisely the reasons agent link-hopping is slow and unreliable. But nobody concluded that trees were the wrong data structure. The traversal moved into the engine. The client sends a query, the engine walks whatever it has to walk, locally, in microseconds, and one response comes back with the assembled result.

That is the whole fix here too. The N+1 problem is real, but it is not a property of graphs. It is a property of doing traversal in the agent loop.

Traversal belongs in the tool

IWE keeps memory as plain markdown files with links between them, the same graph a human reads in an editor. The difference is that the agent never walks it. It sends a query; the engine follows the links; one call returns the assembled context.

Concretely. iwe squash <key> -d 2 takes a document, follows its links two levels deep, and returns one consolidated markdown document, the page plus everything it depends on, inlined. What would have been five or six serial tool calls with the agent guessing at link text each time is one call, resolved by the engine in milliseconds, with no guessing, because the engine does not have to predict what is behind a link. It just reads it.

iwe retrieve -k <key> -d 2 -b does the same with more control: children to a chosen depth, backlinks if you want what points at the page, parents if you want where it sits. And retrieval does not have to start from a known page. iwe find queries the graph’s frontmatter and structure directly: every open gotcha, every decision touching this component, everything under this hub that changed since a date. The agent goes from a question to assembled, structured context in one or two calls, which is the same budget the semantic-search side advertises. The difference is what comes back: not the K nearest chunks, but a subgraph with its relationships intact.

The retrieval itself is deterministic. Same store, same query, same result, every time, and you can run the identical command in a terminal to see exactly what the agent saw. When retrieval returns something odd, you debug it the way you debug a query, not the way you appease an embedding.

If your instinct at this point is “the tool is called bash and the optimized API is grep,” we are mostly on your side. The storage here is the file system, the format is plain markdown, and grep works on it exactly as well as it ever did; nothing about the store needs iwe to be readable. The engine earns its place at the step grep stops at: grep finds the lines that match, and then you are back to walking links by hand to gather what those lines depend on. squash is what you would build the day you got tired of doing that, a grep whose result comes back with its context already attached. Same files, same determinism, one layer up.

What we concede

There is no embedding index in this design, and that is a real boundary, not a hidden strength. Lexical search fused with graph expansion is very good at “the note about the normalize scope” and honestly weaker at “the note about that thing, phrased completely differently.” If your memory is thousands of loosely related fragments with no structure worth preserving, semantic search over a flat pile is probably the right tool, and the critics are right about your case.

But if you are already keeping structured notes, or you want your agent’s memory to be something a human can also read, navigate, and correct, then the graph was never your problem. Making the model act as the query engine was. Keep the graph. Move the walking.

Search

Loading pages…