Stop guessing: give your AI agents a map of your systems
AI coding agents keep getting your architecture wrong for a simple reason: nobody ever gave them a map. The knowledge lives in your senior engineers’ heads and in docs that went stale months ago. A small, queryable knowledge graph fixes that, and it matters more than which model you pick.
More and more teams now hand real work to AI coding agents. Not just autocomplete, but actual changes across real systems. And more and more of them keep hitting the same wall: the agent does not know their systems. It has no idea which service owns what, what talks to what, or where the data actually lives.
So it infers. And inference at scale means confident, well-written, wrong answers. The frustrating part is that the knowledge the agent needs already exists in the company. It just is not in a form anything can use. It lives in the heads of a few senior engineers, and in documentation that went stale the week after it was written.
We built a small template to fix exactly this, and we open-sourced it under an MIT license: github.com/deniz-adbeam/agent-knowledge-base. If you want to skip ahead and start mapping your own systems, that is where to look. The rest of this piece explains why it works and how to think about it.
An AI agent is only as good as the map you give it. Most organizations never drew the map. They just assumed everyone already had it in their head.
What a “map” actually is
When I say map, I do not mean another wiki. I mean something much smaller and much more useful: a structured, queryable graph of your systems. Each service or component is a node. Each relationship between them is a typed link. This service calls that one, this one depends on that library, this one publishes events to that topic, this one stores its data here.
In practice, a good map captures things like:
- Ownership: which team or service is responsible for what
- Dependencies: what breaks if this component changes
- Data stores: where each piece of data actually lives
- Event flows: who publishes and who consumes
- Infrastructure: how and where each piece gets deployed
The important part: this map is generated from the code and configuration that already exist. It reflects reality, not someone’s memory of reality, and not the way the system looked two reorganizations ago.
A concrete picture
Let me make this tangible with a deliberately simplified, composite example. Picture a very typical enterprise platform, stripped down to its essentials:
- A handful of backend services that call each other over HTTP
- A Kafka event backbone they publish to and consume from
- A MongoDB datastore holding the shared state
- Terraform-provisioned cloud infrastructure they all deploy onto
When you render that as a graph, the shape of the system becomes obvious in seconds. The interactive map at the top of this article is a live version of exactly that composite. Drag the nodes around, hover to highlight what connects to what, and click any node to see its connections.
Even at this toy scale you can already read the structure. The one component half of everything depends on. The event backbone sitting in the middle. The single points of failure that nobody had ever drawn on a whiteboard, because everyone “just knew” they were there.
The real value is not that the picture looks nice for humans. It is that an agent can traverse it: follow the links, answer “what depends on this?”, and act on facts instead of guessing.
Why this matters to the business
You do not need to care about graphs or edges to care about what this unlocks. The business case is straightforward:
- Faster, safer AI-assisted work. Agents act on facts instead of guesses, which means fewer wrong changes and less time spent cleaning up after them.
- Better onboarding and less key-person risk. The map outlives the people who drew it, so critical knowledge stops walking out the door when a senior engineer leaves.
- Confidence when things change. You can see the blast radius before anyone touches a shared component.
- Cheaper knowledge upkeep. You regenerate the map from source instead of paying people to maintain a wiki that is wrong by lunchtime.
None of this is exotic. It is the difference between an organization where the answers live in a few people’s heads, and one where the answers are written down in a form that both humans and machines can actually use.
For the curious: how it is built
You can safely skip this section if you just wanted the business picture. For anyone who likes to know how the sausage is made, it is refreshingly boring, and that is the point.
The map is a set of plain-text knowledge notes: Markdown files in a lightweight open format, one per concept, with typed links between them. A small script reads those notes, validates them, and regenerates an interactive graph you can open in a browser. No new platform, no server to run.
The notes themselves do not have to be written by hand. A short extractor reads the build files, service configuration and infrastructure definitions that already exist, and writes the notes automatically. The map is generated first and reviewed by a human afterwards, rather than drawn from scratch in a meeting.
And because it is all just text, it lives in Git right next to the code. It is versioned, diffable, and reviewed like any other change. Continuous integration keeps it honest, so it cannot silently rot.
No new platform, no server, no vendor lock-in. It is text files and a graph, which is exactly why it survives contact with a real engineering organization.
We have open-sourced the template we use for exactly this. If you want to see how it fits together or start mapping your own systems, it is on GitHub under an MIT license: github.com/deniz-adbeam/agent-knowledge-base. Copy it into your repo and go.
Where it helps, and where it does not
I am not going to pretend this is magic, because the fastest way to lose trust is to oversell it. Here is the honest version.
- Auto-extraction is best-effort. It gets you eighty percent of the map fast; the last mile is human review and judgement.
- It is a map, not a wiki. It captures structure and decisions, not long-form prose documentation. You still need words somewhere.
- It needs machine-readable sources. If your systems live in Git with build and config files, the structure can be extracted. If they only live in people’s heads, there is nothing to read.
- It needs light maintenance. Regenerate it as the systems evolve, or it drifts out of date like anything else.
The honest framing is that this is leverage, not a miracle. In a small illustrative run of a dozen services and around a hundred links, the first draft of the map comes together in minutes. But the lasting value does not come from that first draft. It comes from keeping the map alive.
The bigger shift: agent-native organizations
Step back and this stops being a documentation story. As agents take on more of the work, what separates companies will not be which model they picked. Everyone will have access to roughly the same models. The real differentiator will be whether their knowledge is available to those agents as infrastructure.
Companies that treat their architecture, their decisions and their data flows as a queryable resource give every agent, and every new hire, the same reliable map. Everyone starts from the same facts. That is the shift worth preparing for now, before the map you never drew becomes the bottleneck you cannot explain.
Related reading
If you are wrestling with the underlying question of where your knowledge should live in the first place, our piece on moving documentation from Confluence to Markdown in GitLab covers the foundation this builds on.
FAQ
Frequently asked questions
Answers to the most important questions on this topic.